From b3f8783440c8d8f299e2f69e882ef478923b8e54 Mon Sep 17 00:00:00 2001 From: ru Date: Mon, 30 Sep 2002 07:46:54 +0000 Subject: Support for FreeBSD releases 4.6, 4.6.2, 4.7 and 4.8. From ChangeLog: : 2002-09-27 Ruslan Ermilov : : * tmac/doc-common (ds-operating-system-FreeBSD-4.*): New version : strings. --- contrib/groff/tmac/doc-common | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'contrib') diff --git a/contrib/groff/tmac/doc-common b/contrib/groff/tmac/doc-common index 3c58840..56a604c 100644 --- a/contrib/groff/tmac/doc-common +++ b/contrib/groff/tmac/doc-common @@ -418,6 +418,10 @@ .ds doc-operating-system-FreeBSD-4.3 4.3 .ds doc-operating-system-FreeBSD-4.4 4.4 .ds doc-operating-system-FreeBSD-4.5 4.5 +.ds doc-operating-system-FreeBSD-4.6 4.6 +.ds doc-operating-system-FreeBSD-4.6.2 4.6.2 +.ds doc-operating-system-FreeBSD-4.7 4.7 +.ds doc-operating-system-FreeBSD-4.8 4.8 .ds doc-operating-system-FreeBSD-5.0 5.0 . .de Os -- cgit v1.1 From 737a9b93ec94c55fd85de176c9de9302f1a9f95f Mon Sep 17 00:00:00 2001 From: ru Date: Wed, 9 Oct 2002 08:39:59 +0000 Subject: From the ChangeLog: : 2002-10-07 Werner LEMBERG : : * tmac/doc-common (Ss): Add final `.ns' (similar to `.Sh') to : suppress additional whitespace after the header. : : 2002-10-07 Ruslan Ermilov : : * tmac/doc-common (doc-volume-operating-system-ateol): New flag. : (Dt): Use it to improve language localization (especially Russian : and French). --- contrib/groff/tmac/doc-common | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'contrib') diff --git a/contrib/groff/tmac/doc-common b/contrib/groff/tmac/doc-common index 56a604c..62a9d42 100644 --- a/contrib/groff/tmac/doc-common +++ b/contrib/groff/tmac/doc-common @@ -231,6 +231,7 @@ .\" an alternative, more detailed scheme for naming the manual sections .\" .ds doc-volume-operating-system BSD +.nr doc-volume-operating-system-ateol 0 .ds doc-volume-ds-1 General Commands Manual .ds doc-volume-ds-2 System Calls Manual .ds doc-volume-ds-3 Library Functions Manual @@ -305,13 +306,20 @@ . ds doc-section \$2 . ie \B\$2 \{\ . if ((\$2 >= 1) & (\$2 <= 9)) \{\ -. ds doc-volume "\*[doc-volume-operating-system] -. if \A\$3 \{\ -. if d doc-volume-as-\$3 \ -. as doc-volume "/\*[doc-volume-as-\$3] -. \} -. as doc-volume " \*[doc-volume-ds-\$2] -. \}\} +. ie \n[doc-volume-operating-system-ateol] \{\ +. ds doc-volume "\*[doc-volume-ds-\$2] \*[doc-volume-operating-system] +. if \A\$3 \{\ +. if d doc-volume-as-\$3 \ +. as doc-volume "/\*[doc-volume-as-\$3] +. \}\} +. el \{\ +. ds doc-volume "\*[doc-volume-operating-system] +. if \A\$3 \{\ +. if d doc-volume-as-\$3 \ +. as doc-volume "/\*[doc-volume-as-\$3] +. \} +. as doc-volume " \*[doc-volume-ds-\$2] +. \}\}\} . el \{\ . ie "\$2"unass" .ds doc-volume DRAFT . el \{ .ie "\$2"draft" .ds doc-volume DRAFT @@ -884,6 +892,7 @@ . if !\n[cR] \ . ne 2 . br +. ns . \} .. . -- cgit v1.1 From 127e61728bacf1fb90edd8be1b0c406619e78bc8 Mon Sep 17 00:00:00 2001 From: ru Date: Fri, 11 Oct 2002 08:52:17 +0000 Subject: Virgin import of FSF groff v1.18.1 --- contrib/groff/ChangeLog | 3841 +++++++- contrib/groff/INSTALL | 7 +- contrib/groff/INSTALL.gen | 117 +- contrib/groff/MANIFEST | 152 + contrib/groff/MORE.STUFF | 30 +- contrib/groff/Makefile.ccpg | 2 +- contrib/groff/Makefile.comm | 79 +- contrib/groff/Makefile.cpg | 2 +- contrib/groff/Makefile.in | 194 +- contrib/groff/Makefile.man | 2 +- contrib/groff/Makefile.sub | 27 +- contrib/groff/NEWS | 598 +- contrib/groff/PROBLEMS | 790 +- contrib/groff/README | 2 +- contrib/groff/REVISION | 2 +- contrib/groff/VERSION | 2 +- contrib/groff/aclocal.m4 | 199 +- contrib/groff/configure | 4330 ++++++--- contrib/groff/configure.ac | 29 +- contrib/groff/contrib/eqn2graph/Makefile.sub | 19 + contrib/groff/contrib/eqn2graph/eqn2graph.man | 97 + contrib/groff/contrib/eqn2graph/eqn2graph.sh | 74 + contrib/groff/contrib/groffer/ChangeLog | 460 + contrib/groff/contrib/groffer/Makefile.sub | 47 + contrib/groff/contrib/groffer/TODO | 53 + contrib/groff/contrib/groffer/groffer.man | 2836 ++++++ contrib/groff/contrib/groffer/groffer.sh | 4419 +++++++++ contrib/groff/contrib/mm/ChangeLog | 96 +- contrib/groff/contrib/mm/Makefile.sim | 12 +- contrib/groff/contrib/mm/Makefile.sub | 19 +- contrib/groff/contrib/mm/README | 8 +- contrib/groff/contrib/mm/groff_mm.man | 591 +- contrib/groff/contrib/mm/groff_mmse.man | 4 +- contrib/groff/contrib/mm/m.tmac | 148 +- contrib/groff/contrib/mm/mm.tmac | 3 + contrib/groff/contrib/mm/mmroff.man | 7 +- contrib/groff/contrib/mm/mmroff.pl | 9 +- contrib/groff/contrib/mm/mmse.tmac | 3 + contrib/groff/contrib/mom/BUGS | 76 + contrib/groff/contrib/mom/ChangeLog | 390 + contrib/groff/contrib/mom/Makefile.sub | 125 + contrib/groff/contrib/mom/NEWS | 183 + contrib/groff/contrib/mom/TODO | 21 + contrib/groff/contrib/mom/copyright | 24 + contrib/groff/contrib/mom/examples/README.mom | 56 + contrib/groff/contrib/mom/examples/elvis_syntax | 130 + contrib/groff/contrib/mom/examples/letter.mom | 34 + contrib/groff/contrib/mom/examples/macros.mom | 668 ++ contrib/groff/contrib/mom/examples/penguin.ps | 461 + contrib/groff/contrib/mom/examples/typeset.mom | 534 ++ contrib/groff/contrib/mom/examples/typewrite.mom | 233 + contrib/groff/contrib/mom/groff_mom.man | 95 + contrib/groff/contrib/mom/mom.tmac | 3 + contrib/groff/contrib/mom/momdoc/appendices.html | 185 + contrib/groff/contrib/mom/momdoc/cover.html | 49 + contrib/groff/contrib/mom/momdoc/definitions.html | 653 ++ contrib/groff/contrib/mom/momdoc/docelement.html | 2320 +++++ .../groff/contrib/mom/momdoc/docprocessing.html | 1799 ++++ contrib/groff/contrib/mom/momdoc/goodies.html | 926 ++ contrib/groff/contrib/mom/momdoc/headfootpage.html | 1305 +++ contrib/groff/contrib/mom/momdoc/inlines.html | 595 ++ contrib/groff/contrib/mom/momdoc/intro.html | 386 + contrib/groff/contrib/mom/momdoc/letters.html | 316 + contrib/groff/contrib/mom/momdoc/rectoverso.html | 257 + contrib/groff/contrib/mom/momdoc/reserved.html | 1044 ++ contrib/groff/contrib/mom/momdoc/toc.html | 208 + contrib/groff/contrib/mom/momdoc/typemacdoc.html | 169 + contrib/groff/contrib/mom/momdoc/typesetting.html | 3744 ++++++++ contrib/groff/contrib/mom/momdoc/using.html | 223 + contrib/groff/contrib/mom/om.tmac | 9265 ++++++++++++++++++ contrib/groff/contrib/pic2graph/Makefile.sub | 19 + contrib/groff/contrib/pic2graph/pic2graph.man | 123 + contrib/groff/contrib/pic2graph/pic2graph.sh | 83 + contrib/groff/doc/Makefile.in | 136 + contrib/groff/doc/Makefile.sub | 202 + contrib/groff/doc/fdl.texi | 403 + contrib/groff/doc/gnu.eps | 1018 ++ contrib/groff/doc/gnu.png | Bin 0 -> 7260 bytes contrib/groff/doc/gnu.xpm | 198 + contrib/groff/doc/grnexmpl.me | 2 - contrib/groff/doc/groff | 297 + contrib/groff/doc/groff-1 | 1386 +++ contrib/groff/doc/groff-10 | 208 + contrib/groff/doc/groff-11 | 1536 +++ contrib/groff/doc/groff-2 | 1683 ++++ contrib/groff/doc/groff-3 | 1374 +++ contrib/groff/doc/groff-4 | 1316 +++ contrib/groff/doc/groff-5 | 1185 +++ contrib/groff/doc/groff-6 | 1415 +++ contrib/groff/doc/groff-7 | 1608 ++++ contrib/groff/doc/groff-8 | 1268 +++ contrib/groff/doc/groff-9 | 931 ++ contrib/groff/doc/groff.texinfo | 9991 ++++++++++++++------ contrib/groff/doc/pic.ms | 1529 +-- contrib/groff/doc/texinfo.tex | 1134 ++- contrib/groff/doc/webpage.ms | 969 ++ contrib/groff/font/devX100-12/CB | 104 +- contrib/groff/font/devX100-12/CBI | 104 +- contrib/groff/font/devX100-12/CI | 104 +- contrib/groff/font/devX100-12/CR | 104 +- contrib/groff/font/devX100-12/HB | 140 +- contrib/groff/font/devX100-12/HBI | 114 +- contrib/groff/font/devX100-12/HI | 110 +- contrib/groff/font/devX100-12/HR | 110 +- contrib/groff/font/devX100-12/NB | 120 +- contrib/groff/font/devX100-12/NBI | 114 +- contrib/groff/font/devX100-12/NI | 110 +- contrib/groff/font/devX100-12/NR | 108 +- contrib/groff/font/devX100-12/S | 11 +- contrib/groff/font/devX100-12/TB | 156 +- contrib/groff/font/devX100-12/TBI | 110 +- contrib/groff/font/devX100-12/TI | 110 +- contrib/groff/font/devX100-12/TR | 110 +- contrib/groff/font/devX100/CB | 108 +- contrib/groff/font/devX100/CBI | 104 +- contrib/groff/font/devX100/CI | 108 +- contrib/groff/font/devX100/CR | 106 +- contrib/groff/font/devX100/HB | 108 +- contrib/groff/font/devX100/HBI | 108 +- contrib/groff/font/devX100/HI | 108 +- contrib/groff/font/devX100/HR | 114 +- contrib/groff/font/devX100/NB | 118 +- contrib/groff/font/devX100/NBI | 108 +- contrib/groff/font/devX100/NI | 106 +- contrib/groff/font/devX100/NR | 110 +- contrib/groff/font/devX100/S | 9 +- contrib/groff/font/devX100/TB | 108 +- contrib/groff/font/devX100/TBI | 110 +- contrib/groff/font/devX100/TI | 108 +- contrib/groff/font/devX100/TR | 110 +- contrib/groff/font/devX75-12/CB | 106 +- contrib/groff/font/devX75-12/CBI | 106 +- contrib/groff/font/devX75-12/CI | 106 +- contrib/groff/font/devX75-12/CR | 106 +- contrib/groff/font/devX75-12/HB | 110 +- contrib/groff/font/devX75-12/HBI | 106 +- contrib/groff/font/devX75-12/HI | 108 +- contrib/groff/font/devX75-12/HR | 112 +- contrib/groff/font/devX75-12/NB | 114 +- contrib/groff/font/devX75-12/NBI | 114 +- contrib/groff/font/devX75-12/NI | 112 +- contrib/groff/font/devX75-12/NR | 108 +- contrib/groff/font/devX75-12/S | 9 +- contrib/groff/font/devX75-12/TB | 108 +- contrib/groff/font/devX75-12/TBI | 114 +- contrib/groff/font/devX75-12/TI | 108 +- contrib/groff/font/devX75-12/TR | 136 +- contrib/groff/font/devX75/CB | 108 +- contrib/groff/font/devX75/CBI | 106 +- contrib/groff/font/devX75/CI | 106 +- contrib/groff/font/devX75/CR | 106 +- contrib/groff/font/devX75/HB | 106 +- contrib/groff/font/devX75/HBI | 108 +- contrib/groff/font/devX75/HI | 108 +- contrib/groff/font/devX75/HR | 108 +- contrib/groff/font/devX75/NB | 116 +- contrib/groff/font/devX75/NBI | 112 +- contrib/groff/font/devX75/NI | 110 +- contrib/groff/font/devX75/NR | 116 +- contrib/groff/font/devX75/S | 11 +- contrib/groff/font/devX75/TB | 110 +- contrib/groff/font/devX75/TBI | 108 +- contrib/groff/font/devX75/TI | 106 +- contrib/groff/font/devX75/TR | 110 +- contrib/groff/font/devascii/R.proto | 1 + contrib/groff/font/devcp1047/R.proto | 99 +- contrib/groff/font/devdvi/CW | 24 +- contrib/groff/font/devdvi/CWEC | 280 + contrib/groff/font/devdvi/CWI | 24 +- contrib/groff/font/devdvi/CWIEC | 281 + contrib/groff/font/devdvi/CWITC | 139 + contrib/groff/font/devdvi/CWTC | 138 + contrib/groff/font/devdvi/DESC.in | 7 +- contrib/groff/font/devdvi/HB | 36 +- contrib/groff/font/devdvi/HBEC | 1578 ++++ contrib/groff/font/devdvi/HBI | 296 + contrib/groff/font/devdvi/HBIEC | 1579 ++++ contrib/groff/font/devdvi/HBITC | 139 + contrib/groff/font/devdvi/HBTC | 138 + contrib/groff/font/devdvi/HI | 36 +- contrib/groff/font/devdvi/HIEC | 1579 ++++ contrib/groff/font/devdvi/HITC | 139 + contrib/groff/font/devdvi/HR | 295 + contrib/groff/font/devdvi/HREC | 1578 ++++ contrib/groff/font/devdvi/HRTC | 138 + contrib/groff/font/devdvi/MI | 4 +- contrib/groff/font/devdvi/Makefile.sub | 12 +- contrib/groff/font/devdvi/S | 19 +- contrib/groff/font/devdvi/SA | 4 +- contrib/groff/font/devdvi/TB | 346 + contrib/groff/font/devdvi/TBEC | 1706 ++++ contrib/groff/font/devdvi/TBI | 352 + contrib/groff/font/devdvi/TBIEC | 1768 ++++ contrib/groff/font/devdvi/TBITC | 139 + contrib/groff/font/devdvi/TBTC | 138 + contrib/groff/font/devdvi/TI | 353 + contrib/groff/font/devdvi/TIEC | 1768 ++++ contrib/groff/font/devdvi/TITC | 139 + contrib/groff/font/devdvi/TR | 429 + contrib/groff/font/devdvi/TREC | 1706 ++++ contrib/groff/font/devdvi/TRTC | 138 + contrib/groff/font/devdvi/generate/CompileFonts | 2 +- contrib/groff/font/devdvi/generate/Makefile | 115 +- contrib/groff/font/devdvi/generate/ec.map | 206 + contrib/groff/font/devdvi/generate/msam.map | 4 +- contrib/groff/font/devdvi/generate/tc.map | 58 + contrib/groff/font/devdvi/generate/texb.map | 24 +- contrib/groff/font/devdvi/generate/texi.map | 26 +- contrib/groff/font/devdvi/generate/texmi.map | 2 +- contrib/groff/font/devdvi/generate/texr.map | 24 +- contrib/groff/font/devdvi/generate/texsy.map | 12 +- contrib/groff/font/devdvi/generate/textt.map | 16 +- contrib/groff/font/devhtml/DESC.proto | 2 +- contrib/groff/font/devhtml/Makefile.sub | 2 +- contrib/groff/font/devhtml/R.proto | 478 +- contrib/groff/font/devlatin1/R.proto | 99 +- contrib/groff/font/devlbp/CB | 61 +- contrib/groff/font/devlbp/CI | 61 +- contrib/groff/font/devlbp/CR | 61 +- contrib/groff/font/devlbp/EB | 61 +- contrib/groff/font/devlbp/EI | 61 +- contrib/groff/font/devlbp/ER | 61 +- contrib/groff/font/devlbp/HB | 100 +- contrib/groff/font/devlbp/HBI | 100 +- contrib/groff/font/devlbp/HI | 100 +- contrib/groff/font/devlbp/HNB | 100 +- contrib/groff/font/devlbp/HNBI | 100 +- contrib/groff/font/devlbp/HNI | 100 +- contrib/groff/font/devlbp/HNR | 100 +- contrib/groff/font/devlbp/HR | 100 +- contrib/groff/font/devlbp/Makefile.sub | 5 +- contrib/groff/font/devlbp/TB | 100 +- contrib/groff/font/devlbp/TBI | 100 +- contrib/groff/font/devlbp/TI | 100 +- contrib/groff/font/devlbp/TR | 100 +- contrib/groff/font/devlj4/ALBB | 295 +- contrib/groff/font/devlj4/ALBR | 295 +- contrib/groff/font/devlj4/AOB | 289 +- contrib/groff/font/devlj4/AOI | 292 +- contrib/groff/font/devlj4/AOR | 288 +- contrib/groff/font/devlj4/CB | 281 +- contrib/groff/font/devlj4/CBI | 281 +- contrib/groff/font/devlj4/CI | 281 +- contrib/groff/font/devlj4/CLARENDON | 281 +- contrib/groff/font/devlj4/CORONET | 281 +- contrib/groff/font/devlj4/CR | 281 +- contrib/groff/font/devlj4/GB | 292 +- contrib/groff/font/devlj4/GBI | 295 +- contrib/groff/font/devlj4/GI | 294 +- contrib/groff/font/devlj4/GR | 297 +- contrib/groff/font/devlj4/LGB | 281 +- contrib/groff/font/devlj4/LGI | 281 +- contrib/groff/font/devlj4/LGR | 281 +- contrib/groff/font/devlj4/MARIGOLD | 281 +- contrib/groff/font/devlj4/OB | 294 +- contrib/groff/font/devlj4/OBI | 295 +- contrib/groff/font/devlj4/OI | 297 +- contrib/groff/font/devlj4/OR | 297 +- contrib/groff/font/devlj4/TB | 299 +- contrib/groff/font/devlj4/TBI | 300 +- contrib/groff/font/devlj4/TI | 302 +- contrib/groff/font/devlj4/TR | 296 +- contrib/groff/font/devlj4/UB | 293 +- contrib/groff/font/devlj4/UBI | 292 +- contrib/groff/font/devlj4/UCB | 293 +- contrib/groff/font/devlj4/UCBI | 293 +- contrib/groff/font/devlj4/UCI | 295 +- contrib/groff/font/devlj4/UCR | 293 +- contrib/groff/font/devlj4/UI | 294 +- contrib/groff/font/devlj4/UR | 293 +- contrib/groff/font/devlj4/generate/Makefile | 4 +- contrib/groff/font/devlj4/generate/text.map | 99 +- contrib/groff/font/devps/AB | 544 +- contrib/groff/font/devps/ABI | 104 +- contrib/groff/font/devps/AI | 104 +- contrib/groff/font/devps/AR | 546 +- contrib/groff/font/devps/BMB | 546 +- contrib/groff/font/devps/BMBI | 104 +- contrib/groff/font/devps/BMI | 104 +- contrib/groff/font/devps/BMR | 546 +- contrib/groff/font/devps/CB | 535 +- contrib/groff/font/devps/CBI | 99 +- contrib/groff/font/devps/CI | 99 +- contrib/groff/font/devps/CR | 533 +- contrib/groff/font/devps/HB | 541 +- contrib/groff/font/devps/HBI | 103 +- contrib/groff/font/devps/HI | 131 +- contrib/groff/font/devps/HNB | 541 +- contrib/groff/font/devps/HNBI | 103 +- contrib/groff/font/devps/HNI | 131 +- contrib/groff/font/devps/HNR | 567 +- contrib/groff/font/devps/HR | 567 +- contrib/groff/font/devps/Makefile.sub | 4 +- contrib/groff/font/devps/NB | 537 +- contrib/groff/font/devps/NBI | 104 +- contrib/groff/font/devps/NI | 104 +- contrib/groff/font/devps/NR | 538 +- contrib/groff/font/devps/PB | 542 +- contrib/groff/font/devps/PBI | 102 +- contrib/groff/font/devps/PI | 103 +- contrib/groff/font/devps/PR | 540 +- contrib/groff/font/devps/S | 362 +- contrib/groff/font/devps/TB | 536 +- contrib/groff/font/devps/TBI | 103 +- contrib/groff/font/devps/TI | 104 +- contrib/groff/font/devps/TR | 540 +- contrib/groff/font/devps/ZCMI | 100 +- contrib/groff/font/devps/ZD | 372 +- contrib/groff/font/devps/ZDR | 372 +- contrib/groff/font/devps/generate/Makefile | 46 +- contrib/groff/font/devps/generate/dingbats.map | 3 + contrib/groff/font/devps/generate/dingbats.rmap | 3 + contrib/groff/font/devps/generate/lgreekmap | 3 + contrib/groff/font/devps/generate/symbolchars | 3 + contrib/groff/font/devps/generate/textmap | 104 +- contrib/groff/font/devps/prologue.ps | 25 +- contrib/groff/font/devps/symbolmap | 110 +- contrib/groff/font/devps/text.enc | 7 +- contrib/groff/font/devutf8/NOTES | 54 +- contrib/groff/font/devutf8/R.proto | 117 +- contrib/groff/man/Makefile.sub | 5 +- contrib/groff/man/ditroff.man | 199 + contrib/groff/man/groff.man | 3067 +++--- contrib/groff/man/groff_char.man | 939 +- contrib/groff/man/groff_diff.man | 3650 +++++++ contrib/groff/man/groff_font.man | 441 +- contrib/groff/man/groff_out.man | 2072 +++- contrib/groff/man/groff_tmac.man | 1124 +++ contrib/groff/man/roff.man | 1544 ++- contrib/groff/src/devices/grodvi/Makefile.sub | 4 +- contrib/groff/src/devices/grodvi/dvi.cc | 82 +- contrib/groff/src/devices/grodvi/grodvi.man | 239 +- contrib/groff/src/devices/grohtml/Makefile.sub | 11 +- contrib/groff/src/devices/grohtml/grohtml.man | 96 +- contrib/groff/src/devices/grohtml/html-table.cc | 687 ++ contrib/groff/src/devices/grohtml/html-table.h | 130 + contrib/groff/src/devices/grohtml/html-text.cc | 581 +- contrib/groff/src/devices/grohtml/html-text.h | 124 +- contrib/groff/src/devices/grohtml/html.h | 3 +- contrib/groff/src/devices/grohtml/output.cc | 56 +- contrib/groff/src/devices/grohtml/post-html.cc | 2441 +++-- contrib/groff/src/devices/grolbp/Makefile.sub | 4 +- contrib/groff/src/devices/grolbp/grolbp.man | 79 +- contrib/groff/src/devices/grolbp/lbp.cc | 1038 +- contrib/groff/src/devices/grolbp/lbp.h | 2 +- contrib/groff/src/devices/grolj4/Makefile.sub | 4 +- contrib/groff/src/devices/grolj4/grolj4.man | 21 +- contrib/groff/src/devices/grolj4/lj4.cc | 59 +- contrib/groff/src/devices/grops/Makefile.sub | 6 +- contrib/groff/src/devices/grops/TODO | 3 - contrib/groff/src/devices/grops/grops.man | 381 +- contrib/groff/src/devices/grops/ps.cc | 258 +- contrib/groff/src/devices/grops/ps.h | 3 +- contrib/groff/src/devices/grops/psrm.cc | 34 +- contrib/groff/src/devices/grotty/Makefile.sub | 4 +- contrib/groff/src/devices/grotty/grotty.man | 227 +- contrib/groff/src/devices/grotty/tty.cc | 319 +- contrib/groff/src/include/Makefile.sub | 5 +- contrib/groff/src/include/color.h | 87 + contrib/groff/src/include/config.hin | 150 + contrib/groff/src/include/driver.h | 8 +- contrib/groff/src/include/errarg.h | 7 +- contrib/groff/src/include/font.h | 6 +- contrib/groff/src/include/geometry.h | 27 + contrib/groff/src/include/getopt.h | 25 +- contrib/groff/src/include/html-strings.h | 6 +- contrib/groff/src/include/htmlhint.h | 37 + contrib/groff/src/include/lib.h | 57 +- contrib/groff/src/include/nonposix.h | 26 +- contrib/groff/src/include/paper.h | 37 + contrib/groff/src/include/posix.h | 14 +- contrib/groff/src/include/printer.h | 61 +- contrib/groff/src/include/stringclass.h | 5 +- contrib/groff/src/libs/libbib/Makefile.sub | 10 +- contrib/groff/src/libs/libbib/index.cc | 5 +- contrib/groff/src/libs/libbib/linear.cc | 6 +- contrib/groff/src/libs/libbib/map.c | 9 +- contrib/groff/src/libs/libbib/search.cc | 7 +- contrib/groff/src/libs/libdriver/Makefile.sub | 4 +- contrib/groff/src/libs/libdriver/input.cc | 2156 ++++- contrib/groff/src/libs/libdriver/printer.cc | 119 +- contrib/groff/src/libs/libgroff/Makefile.sub | 97 +- contrib/groff/src/libs/libgroff/color.cc | 363 + contrib/groff/src/libs/libgroff/errarg.cc | 20 +- contrib/groff/src/libs/libgroff/font.cc | 158 +- contrib/groff/src/libs/libgroff/fontfile.cc | 9 +- contrib/groff/src/libs/libgroff/geometry.cc | 286 + contrib/groff/src/libs/libgroff/getopt.c | 349 +- contrib/groff/src/libs/libgroff/getopt1.c | 16 +- contrib/groff/src/libs/libgroff/htmlhint.cc | 59 + contrib/groff/src/libs/libgroff/invalid.cc | 60 + contrib/groff/src/libs/libgroff/itoa.c | 17 +- contrib/groff/src/libs/libgroff/matherr.c | 6 +- contrib/groff/src/libs/libgroff/maxfilename.cc | 2 + contrib/groff/src/libs/libgroff/mksdir.cc | 34 + contrib/groff/src/libs/libgroff/mkstemp.cc | 34 + contrib/groff/src/libs/libgroff/nametoindex.cc | 9 +- contrib/groff/src/libs/libgroff/new.cc | 5 +- contrib/groff/src/libs/libgroff/paper.cc | 84 + contrib/groff/src/libs/libgroff/putenv.c | 6 +- contrib/groff/src/libs/libgroff/searchpath.cc | 8 +- contrib/groff/src/libs/libgroff/strerror.c | 6 +- contrib/groff/src/libs/libgroff/string.cc | 38 +- contrib/groff/src/libs/libgroff/strtol.c | 7 +- contrib/groff/src/libs/libgroff/tmpfile.cc | 157 +- contrib/groff/src/libs/libgroff/tmpname.cc | 116 + contrib/groff/src/preproc/eqn/Makefile.sub | 36 +- contrib/groff/src/preproc/eqn/box.cc | 26 +- contrib/groff/src/preproc/eqn/eqn.cc | 225 +- contrib/groff/src/preproc/eqn/eqn.h | 7 +- contrib/groff/src/preproc/eqn/eqn.man | 16 +- contrib/groff/src/preproc/eqn/lex.cc | 8 +- contrib/groff/src/preproc/eqn/limit.cc | 12 +- contrib/groff/src/preproc/eqn/main.cc | 58 +- contrib/groff/src/preproc/eqn/other.cc | 12 +- contrib/groff/src/preproc/eqn/over.cc | 13 +- contrib/groff/src/preproc/eqn/script.cc | 16 +- contrib/groff/src/preproc/eqn/sqrt.cc | 18 +- contrib/groff/src/preproc/grn/Makefile.sub | 10 +- contrib/groff/src/preproc/grn/README | 10 +- contrib/groff/src/preproc/grn/gprint.h | 2 + contrib/groff/src/preproc/grn/grn.man | 29 +- contrib/groff/src/preproc/grn/hdb.cc | 23 +- contrib/groff/src/preproc/grn/hgraph.cc | 30 +- contrib/groff/src/preproc/grn/main.cc | 6 +- contrib/groff/src/preproc/html/Makefile.sub | 6 +- contrib/groff/src/preproc/html/pre-html.cc | 1005 +- contrib/groff/src/preproc/html/pushback.cc | 333 + contrib/groff/src/preproc/html/pushback.h | 54 + contrib/groff/src/preproc/pic/Makefile.sub | 22 +- contrib/groff/src/preproc/pic/common.cc | 1 - contrib/groff/src/preproc/pic/common.h | 4 + contrib/groff/src/preproc/pic/lex.cc | 70 +- contrib/groff/src/preproc/pic/main.cc | 18 +- contrib/groff/src/preproc/pic/object.cc | 141 +- contrib/groff/src/preproc/pic/object.h | 9 +- contrib/groff/src/preproc/pic/output.h | 8 +- contrib/groff/src/preproc/pic/pic.cc | 5581 ++++++----- contrib/groff/src/preproc/pic/pic.h | 8 +- contrib/groff/src/preproc/pic/pic.man | 221 +- contrib/groff/src/preproc/pic/pic.y | 196 +- contrib/groff/src/preproc/pic/pic_tab.h | 33 +- contrib/groff/src/preproc/pic/tex.cc | 26 + contrib/groff/src/preproc/pic/troff.cc | 83 +- contrib/groff/src/preproc/refer/Makefile.sub | 14 +- contrib/groff/src/preproc/refer/command.cc | 7 +- contrib/groff/src/preproc/refer/label.cc | 13 +- contrib/groff/src/preproc/refer/refer.cc | 22 +- contrib/groff/src/preproc/refer/refer.h | 7 +- contrib/groff/src/preproc/soelim/Makefile.sub | 4 +- contrib/groff/src/preproc/soelim/soelim.cc | 5 +- contrib/groff/src/preproc/tbl/Makefile.sub | 6 +- contrib/groff/src/preproc/tbl/main.cc | 34 +- contrib/groff/src/preproc/tbl/table.h | 10 +- contrib/groff/src/preproc/tbl/tbl.man | 346 +- contrib/groff/src/roff/groff/Makefile.sub | 4 +- contrib/groff/src/roff/groff/groff.cc | 55 +- contrib/groff/src/roff/groff/groff.man | 1894 +++- contrib/groff/src/roff/groff/pipeline.c | 24 +- contrib/groff/src/roff/groff/pipeline.h | 5 +- contrib/groff/src/roff/grog/Makefile.sub | 9 +- contrib/groff/src/roff/grog/grog.man | 7 +- contrib/groff/src/roff/grog/grog.pl | 28 +- contrib/groff/src/roff/grog/grog.sh | 12 +- contrib/groff/src/roff/nroff/nroff.man | 20 +- contrib/groff/src/roff/nroff/nroff.sh | 15 +- contrib/groff/src/roff/troff/Makefile.sub | 20 +- contrib/groff/src/roff/troff/TODO | 3 - contrib/groff/src/roff/troff/charinfo.h | 38 +- contrib/groff/src/roff/troff/dictionary.cc | 2 +- contrib/groff/src/roff/troff/div.cc | 23 +- contrib/groff/src/roff/troff/div.h | 2 + contrib/groff/src/roff/troff/env.cc | 607 +- contrib/groff/src/roff/troff/env.h | 33 +- contrib/groff/src/roff/troff/input.cc | 1691 +++- contrib/groff/src/roff/troff/node.cc | 650 +- contrib/groff/src/roff/troff/node.h | 51 +- contrib/groff/src/roff/troff/number.cc | 9 +- contrib/groff/src/roff/troff/request.h | 10 +- contrib/groff/src/roff/troff/symbol.cc | 14 +- contrib/groff/src/roff/troff/symbol.h | 9 +- contrib/groff/src/roff/troff/token.h | 21 +- contrib/groff/src/roff/troff/troff.h | 18 +- contrib/groff/src/roff/troff/troff.man | 2629 +---- contrib/groff/src/utils/addftinfo/Makefile.sub | 6 +- contrib/groff/src/utils/addftinfo/addftinfo.cc | 5 +- contrib/groff/src/utils/afmtodit/afmtodit.man | 59 +- contrib/groff/src/utils/afmtodit/afmtodit.pl | 5 +- contrib/groff/src/utils/hpftodit/Makefile.sub | 4 +- contrib/groff/src/utils/hpftodit/hpftodit.cc | 23 +- contrib/groff/src/utils/indxbib/Makefile.sub | 6 +- contrib/groff/src/utils/indxbib/indxbib.cc | 26 +- contrib/groff/src/utils/indxbib/signal.c | 6 +- contrib/groff/src/utils/lkbib/Makefile.sub | 4 +- contrib/groff/src/utils/lkbib/lkbib.cc | 5 +- contrib/groff/src/utils/lookbib/Makefile.sub | 4 +- contrib/groff/src/utils/lookbib/lookbib.cc | 9 +- contrib/groff/src/utils/pfbtops/Makefile.sub | 4 +- contrib/groff/src/utils/pfbtops/pfbtops.c | 5 + contrib/groff/src/utils/tfmtodit/Makefile.sub | 4 +- contrib/groff/src/utils/tfmtodit/tfmtodit.cc | 5 +- contrib/groff/src/utils/tfmtodit/tfmtodit.man | 20 +- contrib/groff/src/xditview/ChangeLog | 50 + contrib/groff/src/xditview/DviChar.c | 1024 +- contrib/groff/src/xditview/Imakefile.in | 8 +- contrib/groff/src/xditview/parse.c | 27 +- contrib/groff/src/xditview/xditview.c | 4 +- contrib/groff/stamp-h.in | 1 + contrib/groff/test-groff | 13 +- contrib/groff/tmac/Makefile.sub | 12 +- contrib/groff/tmac/README | 20 + contrib/groff/tmac/X.tmac | 77 +- contrib/groff/tmac/Xps.tmac | 87 +- contrib/groff/tmac/an-old.tmac | 128 +- contrib/groff/tmac/andoc.tmac | 5 + contrib/groff/tmac/cp1047.tmac | 105 + contrib/groff/tmac/doc-common | 20 +- contrib/groff/tmac/doc-ditroff | 29 +- contrib/groff/tmac/doc-nroff | 29 +- contrib/groff/tmac/doc.tmac | 120 +- contrib/groff/tmac/dvi.tmac | 801 +- contrib/groff/tmac/e.tmac | 40 +- contrib/groff/tmac/ec.tmac | 57 + contrib/groff/tmac/groff_man.man | 62 +- contrib/groff/tmac/groff_mdoc.man | 104 +- contrib/groff/tmac/groff_ms.man | 1103 ++- contrib/groff/tmac/groff_trace.man | 546 ++ contrib/groff/tmac/groff_www.man | 415 + contrib/groff/tmac/html.tmac | 706 +- contrib/groff/tmac/hyphen.us | 21 +- contrib/groff/tmac/latin1.tmac | 196 +- contrib/groff/tmac/lbp.tmac | 4 + contrib/groff/tmac/lj4.tmac | 17 +- contrib/groff/tmac/ps.tmac | 605 +- contrib/groff/tmac/psold.tmac | 2 +- contrib/groff/tmac/pspic.tmac | 146 +- contrib/groff/tmac/s.tmac | 132 +- contrib/groff/tmac/trace.tmac | 54 +- contrib/groff/tmac/troffrc | 13 +- contrib/groff/tmac/troffrc-end | 10 +- contrib/groff/tmac/tty-char.tmac | 385 +- contrib/groff/tmac/tty.tmac | 104 +- contrib/groff/tmac/www.tmac | 626 +- contrib/groff/win32-diffs | 698 +- 544 files changed, 131917 insertions(+), 43870 deletions(-) create mode 100644 contrib/groff/MANIFEST create mode 100644 contrib/groff/contrib/eqn2graph/Makefile.sub create mode 100644 contrib/groff/contrib/eqn2graph/eqn2graph.man create mode 100644 contrib/groff/contrib/eqn2graph/eqn2graph.sh create mode 100644 contrib/groff/contrib/groffer/ChangeLog create mode 100644 contrib/groff/contrib/groffer/Makefile.sub create mode 100644 contrib/groff/contrib/groffer/TODO create mode 100644 contrib/groff/contrib/groffer/groffer.man create mode 100644 contrib/groff/contrib/groffer/groffer.sh create mode 100644 contrib/groff/contrib/mm/mm.tmac create mode 100644 contrib/groff/contrib/mm/mmse.tmac create mode 100644 contrib/groff/contrib/mom/BUGS create mode 100644 contrib/groff/contrib/mom/ChangeLog create mode 100644 contrib/groff/contrib/mom/Makefile.sub create mode 100644 contrib/groff/contrib/mom/NEWS create mode 100644 contrib/groff/contrib/mom/TODO create mode 100644 contrib/groff/contrib/mom/copyright create mode 100644 contrib/groff/contrib/mom/examples/README.mom create mode 100644 contrib/groff/contrib/mom/examples/elvis_syntax create mode 100644 contrib/groff/contrib/mom/examples/letter.mom create mode 100644 contrib/groff/contrib/mom/examples/macros.mom create mode 100644 contrib/groff/contrib/mom/examples/penguin.ps create mode 100644 contrib/groff/contrib/mom/examples/typeset.mom create mode 100644 contrib/groff/contrib/mom/examples/typewrite.mom create mode 100644 contrib/groff/contrib/mom/groff_mom.man create mode 100644 contrib/groff/contrib/mom/mom.tmac create mode 100644 contrib/groff/contrib/mom/momdoc/appendices.html create mode 100644 contrib/groff/contrib/mom/momdoc/cover.html create mode 100644 contrib/groff/contrib/mom/momdoc/definitions.html create mode 100644 contrib/groff/contrib/mom/momdoc/docelement.html create mode 100644 contrib/groff/contrib/mom/momdoc/docprocessing.html create mode 100644 contrib/groff/contrib/mom/momdoc/goodies.html create mode 100644 contrib/groff/contrib/mom/momdoc/headfootpage.html create mode 100644 contrib/groff/contrib/mom/momdoc/inlines.html create mode 100644 contrib/groff/contrib/mom/momdoc/intro.html create mode 100644 contrib/groff/contrib/mom/momdoc/letters.html create mode 100644 contrib/groff/contrib/mom/momdoc/rectoverso.html create mode 100644 contrib/groff/contrib/mom/momdoc/reserved.html create mode 100644 contrib/groff/contrib/mom/momdoc/toc.html create mode 100644 contrib/groff/contrib/mom/momdoc/typemacdoc.html create mode 100644 contrib/groff/contrib/mom/momdoc/typesetting.html create mode 100644 contrib/groff/contrib/mom/momdoc/using.html create mode 100644 contrib/groff/contrib/mom/om.tmac create mode 100644 contrib/groff/contrib/pic2graph/Makefile.sub create mode 100644 contrib/groff/contrib/pic2graph/pic2graph.man create mode 100644 contrib/groff/contrib/pic2graph/pic2graph.sh create mode 100644 contrib/groff/doc/Makefile.in create mode 100644 contrib/groff/doc/Makefile.sub create mode 100644 contrib/groff/doc/fdl.texi create mode 100644 contrib/groff/doc/gnu.eps create mode 100644 contrib/groff/doc/gnu.png create mode 100644 contrib/groff/doc/gnu.xpm create mode 100644 contrib/groff/doc/groff create mode 100644 contrib/groff/doc/groff-1 create mode 100644 contrib/groff/doc/groff-10 create mode 100644 contrib/groff/doc/groff-11 create mode 100644 contrib/groff/doc/groff-2 create mode 100644 contrib/groff/doc/groff-3 create mode 100644 contrib/groff/doc/groff-4 create mode 100644 contrib/groff/doc/groff-5 create mode 100644 contrib/groff/doc/groff-6 create mode 100644 contrib/groff/doc/groff-7 create mode 100644 contrib/groff/doc/groff-8 create mode 100644 contrib/groff/doc/groff-9 create mode 100644 contrib/groff/doc/webpage.ms create mode 100644 contrib/groff/font/devdvi/CWEC create mode 100644 contrib/groff/font/devdvi/CWIEC create mode 100644 contrib/groff/font/devdvi/CWITC create mode 100644 contrib/groff/font/devdvi/CWTC create mode 100644 contrib/groff/font/devdvi/HBEC create mode 100644 contrib/groff/font/devdvi/HBI create mode 100644 contrib/groff/font/devdvi/HBIEC create mode 100644 contrib/groff/font/devdvi/HBITC create mode 100644 contrib/groff/font/devdvi/HBTC create mode 100644 contrib/groff/font/devdvi/HIEC create mode 100644 contrib/groff/font/devdvi/HITC create mode 100644 contrib/groff/font/devdvi/HR create mode 100644 contrib/groff/font/devdvi/HREC create mode 100644 contrib/groff/font/devdvi/HRTC create mode 100644 contrib/groff/font/devdvi/TB create mode 100644 contrib/groff/font/devdvi/TBEC create mode 100644 contrib/groff/font/devdvi/TBI create mode 100644 contrib/groff/font/devdvi/TBIEC create mode 100644 contrib/groff/font/devdvi/TBITC create mode 100644 contrib/groff/font/devdvi/TBTC create mode 100644 contrib/groff/font/devdvi/TI create mode 100644 contrib/groff/font/devdvi/TIEC create mode 100644 contrib/groff/font/devdvi/TITC create mode 100644 contrib/groff/font/devdvi/TR create mode 100644 contrib/groff/font/devdvi/TREC create mode 100644 contrib/groff/font/devdvi/TRTC create mode 100644 contrib/groff/font/devdvi/generate/ec.map create mode 100644 contrib/groff/font/devdvi/generate/tc.map create mode 100644 contrib/groff/man/ditroff.man create mode 100644 contrib/groff/man/groff_diff.man create mode 100644 contrib/groff/man/groff_tmac.man create mode 100644 contrib/groff/src/devices/grohtml/html-table.cc create mode 100644 contrib/groff/src/devices/grohtml/html-table.h create mode 100644 contrib/groff/src/include/color.h create mode 100644 contrib/groff/src/include/config.hin create mode 100644 contrib/groff/src/include/geometry.h create mode 100644 contrib/groff/src/include/htmlhint.h create mode 100644 contrib/groff/src/include/paper.h create mode 100644 contrib/groff/src/libs/libgroff/color.cc create mode 100644 contrib/groff/src/libs/libgroff/geometry.cc create mode 100644 contrib/groff/src/libs/libgroff/htmlhint.cc create mode 100644 contrib/groff/src/libs/libgroff/invalid.cc create mode 100644 contrib/groff/src/libs/libgroff/mksdir.cc create mode 100644 contrib/groff/src/libs/libgroff/mkstemp.cc create mode 100644 contrib/groff/src/libs/libgroff/paper.cc create mode 100644 contrib/groff/src/libs/libgroff/tmpname.cc create mode 100644 contrib/groff/src/preproc/html/pushback.cc create mode 100644 contrib/groff/src/preproc/html/pushback.h create mode 100644 contrib/groff/stamp-h.in create mode 100644 contrib/groff/tmac/README create mode 100644 contrib/groff/tmac/cp1047.tmac create mode 100644 contrib/groff/tmac/ec.tmac create mode 100644 contrib/groff/tmac/groff_trace.man create mode 100644 contrib/groff/tmac/groff_www.man (limited to 'contrib') diff --git a/contrib/groff/ChangeLog b/contrib/groff/ChangeLog index 452d4fe..926b60b 100644 --- a/contrib/groff/ChangeLog +++ b/contrib/groff/ChangeLog @@ -1,3 +1,3793 @@ +2002-10-08 Werner LEMBERG + + * doc/webpage.ms, NEWS: Updated. + +2002-10-07 Werner LEMBERG + + * tmac/doc-common (Ss): Add final `.ns' (similar to `.Sh') to + suppress additional whitespace after the header. + + * tmac/doc-ditroff, tmac/doc-nroff (Am): New string to be in sync + with NetBSD. + + * src/preproc/grn/grn.man, tmac/groff_mdoc.man, NEWS: Updated. + +2002-10-07 Ruslan Ermilov + + * tmac/doc-common(doc-volume-operating-system-ateol): New flag. + (Dt): Use it to improve language localization (especially Russian + and French). + +2002-10-07 Daniel Senderowicz + + * src/preproc/grn/gprint.h (BSPLINE, BEZIER): New macros. + * src/preproc/grn/hdb.cc (DBGetType): Parse spline and bezier + drawing commands. + * src/preproc/grn/hgraph.cc (drawwig): Add parameter to control + curve type. + Call `picurve' for BSPLINE. + (HGPrintElt): Handle BSPLINE. + * src/preproc/grn/README: Document it. + +2002-10-03 Werner LEMBERG + + * src/roff/troff/node.cc (break_char_node::col): New variable. + Updated constructor. + (space_node::tprint, word_space_node::tprint): Call `fill_color' + unconditionally. + (space_node::space_node): Remove assertion. + (break_char_node::add_self): Pass color argument to space node. + * src/roff/troff/input.cc (token::add_to_node_list, token::process): + Ditto. + * src/roff/troff/env.cc (environment::do_break, + environment::add_padding): Ditto. + +2002-10-02 Werner LEMBERG + + Redesigning color support in troff. Colors are no longer + represented as separate nodes but are now part of glyph nodes and + friends. This fixes the current formatting misbehaviour due to the + changes introduced on 2002-09-20. Some extra code is necessary for + proper grotty support: Without adding color variables to + space-related nodes, the background color would be changed too late. + + * src/roff/troff/node.h, src/roff/troff/node.cc: + s/current_pagecolor/current_fill_color/. + s/current_glyphcolor/current_glyph_color/. + (glyph_color_node, fill_color_node): Removed. + (node::get_glyph_color, node::get_fill_color): New virtual member + functions. + (space_node::col): New variable. + Updated constructors of space_node and derived classes accordingly. + (hmotion_node::col): New variable. + Updated constructors of hmotion_node and space_char_hmotion_node + accordingly. + (vmotion_node::col): New variable. + Updated constructor accordingly. + (draw_node::gcol, draw_node::fcol): New variables. + Updated constructor accordingly. + (special_node::gcol, special_node::fcol): New variables. + Updated constructors accordingly. + (troff_output_file::put_char, troff_output_file::put_charwidth, + troff_output_file::draw): Set glyph and fill color. + (troff_output_file::start_special): Set glyph and fill color. + Always set current font. + (troff_output_file::fill_color, troff_output_file::glyph_color): + Don't call `do_motion'. + (glyph_node::gcol, glyph_node::fcol): New variables. + Updated constructors of glyph_node and ligature_node accordingly. + (glyph_node::get_glyph_color, glyph_node::get_fill_color): New + member functions. + (glyph_node::merge_glyph_node, + kern_pair_node::add_discretionary_hyphen, + node::add_discretionary_hyphen): Updated. + (break_char_node::merge_self): Updated. + (word_space_node::tprint, space_node::tprint, hmotion_node::tprint, + vmotion_node::tprint): Handle color. + (make_glyph_node, make_node, node::add_char): Updated. + + * src/roff/troff/env.cc (environment::space_newline, + environment::space, environment::output_line, environment::do_break, + environment::make_tab_node, environment::add_padding, title): + Updated. + (environment_switch, environment_copy): Don't add color nodes. + + * src/roff/troff/input.cc (do_glyph_color, do_fill_color): Return + nothing. + (token::next): Updated. + \m and \M now are as transparent as \s. + (process_input_stack, token::add_to_node_list, token::process, + read_draw_node): Updated. + (charinfo_to_node_list): Don't add color nodes. + + * doc/groff.texinfo: Updated. + +2002-09-27 Ruslan Ermilov + + * tmac/doc-common (ds-operating-system-FreeBSD-4.*): New version + strings. + +2002-09-27 Colin Watson + + * src/roff/troff/node.cc (bracket_node::copy): Check `list' != 0. + +2002-09-23 Werner LEMBERG + + * src/devices/grolbp/lbp.cc: Replace `300' with `font::res' where + appropriate. + (DEFAULT_LINEWIDTH_FACTOR): New macro. + (linewidth_factor): New global variable. + (lbp_printer::set_line_thickness): Fix case for size < 0, using + linewidth_factor. + (long_options): Add -w/--linewidth option. + (usage): Updated. + (main): Handle -w option to set linewidth_factor. + (lbp_printer::lbp_printer): Initialize req_linethickness, not + line_thickness. + + * src/devices/grolbp/grolbp.man, NEWS, doc/webpage.ms: Updated. + +2002-09-22 Paco Andrés Verdú + + Fixed a bug in the line thickness setting code. + + * src/devices/grolbp/lbp.cc (lbp_printer::req_linethickness): New + variable. + (lbp_printer::set_line_thickness): Pass environment as second + parameter. + Implement it actually. + (lpb_printer::set_char, lbp_printer::draw): Use `req_linethickness' + and `set_line_thickness, depending on the current font size. + +2002-09-21 Werner LEMBERG + + Some Debian patches. + + * src/roff/groff/pipeline.h (MAX_COMMANDS): Increase to 12. + * src/roff/troff/node.cc (bracket_node::copy): Initialize + `list->last'. + +2002-09-20 Werner LEMBERG + + * configure: Regenerated with autoconf 2.54. + +2002-09-20 Werner LEMBERG + + * src/roff/troff/env.h (environment): Rename cur_glyph_color to + glyph_color. + Rename cur_fill_color to fill_color. + * src/roff/troff/env.cc: Updated. + +2002-09-20 Werner LEMBERG + + * src/roff/troff/env.cc (title): Copy color status after processing + title. + * src/roff/troff/input.cc (charinfo_to_node_list): Emit glyph and + fill color nodes to reset colors properly. + + * tmac/www.tmac (DC): Fix color handling. + + * src/preproc/pic/pic.man, doc/pic.ms: Document some color issues. + * doc/groff.texinfo: Fixing documentation of `tl' request. + * doc/webpage.ms: Updated. + +2002-09-19 Werner LEMBERG + + * src/roff/troff/env.cc (environent_switch, environment_copy): + Emit glyph and fill color nodes to initialize colors properly. + +2002-09-17 Colin Watson + + * src/roff/troff/env.cc (environment::set_glyph_color, + environment::set_fill_color): Fix typo which prevented \m[] work + correctly. + +2002-09-17 Werner LEMBERG + + Add left and right italic correction to non-slanted PS fonts. This + is an experimental feature to improve image rendering of grohtml. + + * font/devps/generate/Makefile (RFLAG): New variable, set to `-i 0'. + ({T,H,C,P,N,BM,A,HN}{R,B}, ZD, S, ZDR): Use it. + * font/devps/*: All non-slanted fonts regenerated. + * NEWS: Updated. + +2002-09-16 Werner LEMBERG + + Add a site-specific font directory. + + * Makefile.in (localfontdir, legacyfontdir): New variables. + (fontpath): Use them. + (MDEFINES, uninstall_dirs): Updated. + * Makefile.comm (.man.n): Add `LOCALFONTDIR' and `LEGACYFONTDIR'. + Remove `FONTPATH' and `MACROPATH'. + + * src/roff/troff/troff.man, NEWS: Updated. + * doc/groff.texinfo (Font Directories): New section. + Other minor fixes. + + * src/devices/grodvi/grodvi.man, src/devices/grohtml/grohtml.man, + src/devices/grolbp/grolbp.man, src/devices/grolj4/grolj4.man, + src/preproc/grn/grn.man: Minor fixes. + + * src/devices/grohtml/post-html.cc (html_printer::do_tab_ts): + Remove unused variable. + +2002-09-11 Werner LEMBERG + + * doc/groff.texinfo, man/groff_font.man: Clarify argument of \N. + * man/groff_out.man: Fix documentation of 'N'. + +2002-09-09 Gaius Mulley + + * doc/Makefile.in (webpage.html): Depend on gnu.eps also. + * src/roff/troff/env.cc (indent): Emit html tag only if break_flag is + set. + * src/devices/grohtml/post-html.cc (text_glob::is_br_ni): Removed. + (text_glob::is_br, html_printer::lookahead_for_tables): Updated. + (html_printer::do_tab_ts): Call `emit_table_header' with `FALSE'. + * src/devices/grohtml/html-text.cc (html_text::start_tag) : Call `begin' with `FALSE'. + +2002-09-09 Ralph Corderoy + + * src/libs/libgroff/string.cc (string::extract): Fix position of + terminating null byte. + +2002-09-08 Werner LEMBERG + + Add global option `nospaces' to tbl so that leading and trailing + spaces in data items are ignored. + + * src/libs/libgroff/string.cc (string::remove_spaces): New member + function to remove leading and trailing spaces. + * src/include/stringclass.h: Updated. + + * src/preproc/tbl/table.h (table): Add flag `NOSPACES'. + + * src/preproc/tbl/main.cc (process_options): Handle `nospaces' + option. + Fix typo in error messages. + (process_data): Implement `nospaces' option. + * src/preproc/tbl/tbl.man, NEWS, doc/webpage.ms: Updated. + +2002-09-07 Werner LEMBERG + + * src/include/config.hin: Add `HAVE_ISATTY'. + * src/libs/libgroff/tmpfile.cc (xtmpfile_list): Drop `const' for + `fname' member. + * src/libs/libgroff/tmpname.cc: Include `time.h'. + * src/libs/libdriver/input.cc (Char): Add `operator==' and + `operator!=' for `char'. + * doc/groff.texinfo: Replace @ifnottex block for top node with + @ifhtml block. + +2002-09-06 Werner LEMBERG + + * doc/Makefile.in (.texinfo.html): Add -I switch. + * doc/groff.texinfo: Add @ifnottex block for top node to make + translation to HTML work. + +2002-09-05 Gaius Mulley + + * src/preproc/html/pre-html.cc (LETTER_LENGTH): Removed. + (get_papersize, determine_vertical_offset): Removed. + (char_buffer::do_image): Always specify letter size. + (main): Updated. + (imageList::createPage): Use -dDEVICEHEIGHTPOINTS instead of + -sPAPERSIZE. + +2002-09-05 Werner LEMBERG + + * doc/groff.texinfo, tmac/groff_man.man: Improve documentation of + default indentation. + +2002-09-04 Gaius Mulley + + * src/preproc/html/pre-html.cc (imageList::createPage): Use + -sPAPERSIZE for gs. + (generateImages): Clean up push-back buffer. + +2002-09-04 Ralph Corderoy + + * doc/groff.texinfo: Minor fixes. + +2002-08-21 Gaius Mulley + + * src/preproc/html/pre-html.cc (DEFAULT_LINE_LENGTH): New macro. + (MAX_WIDTH, A4_LENGTH, A4_OFFSET, LETTER_OFFSET): Removed. + (gsPaper): Removed. + (determine_vertical_offset): Use LETTER_LENGTH. + (createPage): Moved to ... + (imageList::createPage): This. + Call gs with -dDEVICEWIDTHPOINTS to avoid cropping. + (imageList::getMaxX): New function. + (createImage): Moved to ... + (imageList::createImage): This. + (imageList::createImages): New function. + (generateImages): Read `maxx' directly. + Updated. + (scanArguments): Don't specify `gsPaper' for `-o'. + (makeTempFiles): Call `xtmpfile' with the last argument set to + `TRUE'. + +2002-08-24 Werner LEMBERG + + * src/include/nonposix.h (mkdir, WAIT, creat) [_MSC_VER]: Define. + (WAIT, _WAIT_CHILD) [!_MSC_VER]: Define. + * src/preproc/html/pre-html.cc (waitForChild): Use WAIT. + * src/preproc/html/pushback.cc: Include nonposix.h. + * src/roff/groff/pipeline.c: Define strcasecmp and strncasecmp + conditionally. + +2002-08-23 Werner LEMBERG + + Use $(OBJEXT) for the object file extension. + + * Makefile.comm (.SUFFIXES): Add .obj. + (.cc.obj, .c.obj): New implicit rules. + * Makefile.in (OBJEXT): New variable, initialized from autoconf. + (MDEFINES): Add EXEEXT and OBJEXT. + * */Makefile.sub: s/.o/.$(OBJEXT)/. + +2002-08-22 Werner LEMBERG + + * INSTALL: Mention texinfo 4.2 as a prerequisite. + +2002-08-21 Gaius Mulley + + * src/devices/grohtml/post-html.cc (colType): Make enum global to + the file. + (html_printer::update_min_max, html_printer::add_table_end): New + methods. + (html_printer::lookahead_for_tables): Use them. + Reset page offset correctly. + (html_printer::~html_printer): Add creation of creator comment up. + +2002-08-20 Werner LEMBERG + + * tmac/an-old.tmac (T&): New dummy macro to avoid warning. + * man/groff_tmac.man: Fix typos. + * man/groff_font.man: Minor reordering. + * contrib/eqn2graph/eqn2graph.man (Tp): New macro. + * contrib/groffer/groffer.man: Fix typos. + +2002-08-18 Gaius Mulley + + Avoid endless loops while scanning for tables. + + * src/devices/grohtml/post-html.cc (list::insert): Set + ptr->right->left. + (html_printer::next_horiz_pos): Add `text_glob' argument; update + all callers. + Return immediately if that argument is NULL. + (html_printer::calc_nf): Don't test if `g' is NULL. + (html_printer::lookahead_for_tables): Use + `glyphs.move_right_get_data'. + Don't test if `g' is NULL. + +2002-08-18 Gaius Mulley + + A better fix, replacing fix 2002-08-15, for increasing SIZE. + + * src/devices/grohtml/post-html.cc (char_block): Make `buffer' + a pointer. + (char_block::char_block): Allocate `buffer'. + (char_buffer::add_string): Use it. + +2002-08-15 Werner LEMBERG + + * src/devices/grops/grops.man, src/devices/grolj4/grolj4.man, + src/devices/grodvi/grodvi.man: Document default line thickness. + +2002-08-15 Gaius Mulley + + * src/devices/grohtml/post-html.cc (char_block): Increase SIZE to + 8192. + +2002-08-14 Werner LEMBERG + + * doc/webpage.ms: Updated. + +2002-08-09 Werner LEMBERG + + * src/roff/troff/node.cc (node::add_char): Call `freeze_space' for + unbreakable space. + +2002-08-08 Aaron Campbell + + * src/preproc/pic/object.cc (object_spec::make_move): Fix typo + (&& -> &). + +2002-08-08 Werner LEMBERG + + * src/roff/troff/input.cc (read_rgb, read_cmy, read_cmyk): Call + tok.next(). + (read_gray): Ditto. + Don't push back a space but a newline onto the stack. + +2002-08-07 Gaius Mulley + + Add fonts `CI', `CB', and `CBI' to grohtml which have been omitted + inadvertently. + + * src/devices/grohtml/post-html.cc (html_printer::end_font, + html_printer::start_font): Handle them. + * src/devices/grohtml/html-text.cc (html_text::do_italic): Don't + reset bold and tt. + (html_text::do_bold): Don't reset italic and tt. + (html_text::do_tt, html_text::do_pre): Don't reset bold and italic. + * font/devhtml/DESC.proto: Add those fonts. + * font/devhtml/Makefile.sub (PROTOFONTS): Updated. + +2002-08-07 Werner LEMBERG + + * MORE.STUFF: Added gpresent. + + * tmac/trace.tmac: Show nesting level by a corresponding amount of + whitespace before printing the logging message. + +2002-07-31 Colin Watson + + * src/devices/grohtml/html-table.cc (html_table::finish_row): + Initialize `n' to zero. This fixes a segfault on ARM. + +2002-07-30 Werner LEMBERG + + * doc/grnexmpl.me: Remove calls to .st and .sc which are undefined. + +2002-07-29 Werner LEMBERG + + * src/preproc/pic/pic.y (print_arg, relative_path): Add missing + final semicolon. + +2002-07-28 Colin Watson + + * src/devices/grohtml/post-html (html_printer::troff_tag): Handle + `.ps'. + (html_printer::html_printer): Initialize `pointsize'. + +2002-07-26 Werner LEMBERG + + * doc/Makefile.sub (PROCESSEDEXAMPLEFILES): Remove gnu.eps and + gnu.png. + (CLEANNOTSRCDIRADD): Add gnu.eps and gnu.png. + (gnu.eps): Add -rle switch to pnmtops. + (distfiles): Add gnu.eps and gnu.png. + +2002-07-25 Petter Reinholdtsen + + * src/libs/libdriver/input.cc (Char): Add const to `operator=='. + Add `operator!='. + +2002-07-24 Werner LEMBERG + + * doc/Makefile.in, doc/Makefile.sub (groff_bin_path): Don't use + ' \+' but ' *' for sed. + (GROFF): Set GROFF_COMMAND_PREFIX to empty value. + +2002-07-23 Werner LEMBERG + + * doc/groff.texinfo: Document `papersize' keyword. + * NEWS, man/groff_font.man: Updated. + +2002-07-23 Colin Watson + + Extend papersize keyword to accept more than a single entry. The + first valid will be used. + + * src/libs/libgroff/font.cc (font::load_desc): Implement it. + (font::scan_papersize): Really skip final newline. + * src/preproc/html/pre-html.cc (get_papersize): Ditto. + +2002-07-23 Werner LEMBERG + + * configure.ac: Test for isatty. + * configure: Regenerated. + * src/include/posix.h: Check HAVE_ISATTY. + * src/roff/troff/input.cc [ISATTY_MISSING]: Removed. + * src/utils/lookbib/lookbib.cc: Include posix.h. + Don't declare isatty. + +2002-07-21 Werner LEMBERG + + * NEWS: Add `output' request. + + * REVISION: Increased to 1. + +Version 1.18.0 released +======================= + +2002-07-19 Gaius Mulley + + Allow internal glyph indices > 0xFF in grohtml for input characters. + + * src/devices/grohtml/post-html.cc (to_unicode): Use `unsigned int' + as parameter. + (html_printer::add_to_sbuf): Use `unsigned int' as first parameter. + Updated all callers. + (html_printer::sbuf_continuation, html_printer::overstrike): Ditto. + (html_printer): Updated. + +2002-07-19 Werner LEMBERG + + * font/devhtml/R.proto: Updated to HTML 4, adding many glyphs. + * font/devutf8/R.proto: Adding some missing glyphs. + * font/devutf8/NOTES: Updated. + + * tmac/dvi.tmac: Add more composite glyphs. + * tmac/html.tmac: Updated. + + * man/groff_char.man: Add `sum' and `product' entities. + + * NEWS: Updated. + +2002-07-18 Gaius Mulley + + Improved table, tab, and indenting support. + + * src/roff/troff/input.cc (file_iterator::suppress_newline_flag, + string_iterator::suppress_newline_flag): Removed. Updated all + function which have used it. + + * src/roff/troff/env.cc: Include `input.h'. + (environment::add_node): Accept 0 as parameter. + (environment::add_html_tag): Add `force' parameter. + Updated all callers. + (environment::add_html_tag_tabs): Ditto. + For the moment, support left-aligned tabs only. + (environment::make_html_tag): New function. + (fill, no_fill): Set .br html tag additionally. + (environment::newline): Emit `eol.ce' or `eol' tag for html. + (environment::add_html_tag_eol): Removed. + (tab_stops::distance_to_next_tab): Add variant for handling + nextpos'. + (environment::distance_to_next_tab): Ditto. + Updated all callers. + (environment::handle_tab): Handle tabs for html. + + * src/roff/troff/env.h: Updated. + + * src/roff/troff/div.cc: Updated all callers of + `environment::add_html_tag'. + + * src/devices/grohtml/html-table.cc, + src/devices/grohtml/html-table.h: New files. + + * src/devices/grohtml/html-text.cc (html_text): New members + `blank_para' and `start_space'. + (html_text::issue_tag): Don't emit TABLE_TAG. + Handle indentation for PRE_TAG and P_TAG. + (html_text::end_tag): Updated. + (html_text::table_is_void, html_text::issue_table_begin, + html_text::issue_table_end): Removed. + (html_text::do_push): Simplified. + [DEBUGGING]: Small fix. + (html_text::push_para): Add new parameter for indentation; updated + all callers. + Handle PRE_TAG. + (html_text::do_indent, html_text::do_table, html_text::done_table, + html_text::is_in_table): Removed. + (html_text::do_pre): Handle P_TAG also. + (html_text::shutdown): Handle p->indent. + (html_text::check_emit_text): Simplified. + (html_text::do_emittext): Reset `blank_para'. + (html_text::do_para): Add new parameter for indentation; updated + all callers. + (html_text::remove_indent): New function. + (html_text::do_space): Handle verbatim text properly. + (html_text::ever_emitted_text, html_text::starts_with_space, + html_text::remove_para_align): New functions. + (html_text::dump_stack_element, html_text::dump_stack): Updated. + + * src/devices/grohtml/html_text.h (HTML_TAG): Remove TABLE_TAG. + Updated. + + * src/devices/grohtml/post-html.cc: Include html-table.h. + (INDENTATION): Removed. + (text_glob): Added many `is_' functions. + Added table description `tab'. + Added `get_arg',`get_tab_args', `remember_table', and `get_table' + member functions. + (list): Add `insert' and `move_to' member functions. + (page): Add `insert_tag' member function. + (page::dump_page) [DEBUG_TABLES]: Improved. + (html_printer): Add `table' and `max_linelength' elements. + Add many `do_', `insert_', `next_horiz_pos', + `lookahead_for_tables', `shutdown_table', `calc_nf', `calc_po_in', + `remove_tabs', `remove_courier_tabs'. + (html_printer::emit_raw): Handle indentation. + (html_printer::do_center, html_printer::write_header): Updated. + (html_printer::is_courier_until_eol): Check for tag. + (html_printer::do_linelength): Handle max_linelength. + (html_printer::do_page_offset, html_printer::do_indentation): Handle + fill_on. + (html_printer::do_tempindent): Updated. + (html_printer::do_indentedparagraph): Removed. + (html_printer::do_indent): Simplified. + (html_printer::do_eol): Use `ever_emitted_text'. + (html_printer::do_flush, html_printer::do_links): Don't call + done_table. + (html_printer::do_break): Handle end_tempindent. + (html_printer::troff_tag): Get argument. + Don't handle `.ip'. + Handle `.tab-ts', `.tab-te', `.col', `tab', and `tab0' tags. + (html_printer::flush_page): Call `lookahead_for_tables'. + Don't call `done_table'. + (html_printer::add_to_sbuf): Always call do_indent. + + * src/devices/grohtml/Makefile.sub: Updated. + + * tmac/an-old.tmac (TP): Don't handle html device specially. + (an-do-tag-html): New function which will be used instead of + `an-do-tag' if html device is used. + + * tmac/html.tmac: Call .po to pass default page offset to grohtml. + + * tmac/s.tmac (@IP): Don't handle html device specially. + (@IP-html): New function which will be used instead of `@IP' if + html device is used. + + * tmac/www.tmac (HTML-NS, HTML-TAG-NS): New auxiliary macros -- this + is a hack which will eventually vanish again. + (PIMG): Handle `-C' option correctly if not html. + (HR): Use HTML-NS. + +2002-07-17 Werner LEMBERG + + * src/utils/afmtodit/afmtodit.pl: Don't use `-P-' for invoking perl. + +2002-07-14 Eric S. Raymond + + * contrib/pic2graph/pic2graph.*: Use convert(1). + * contrib/eqn2graph/eqn2graph.*: Minor fixes. + +2002-07-14 Bernd Warken + + * tmac/groff_trace.man: New file. + * tmac/Makefile.sub: Updated. + * NEWS: Updated. + +2002-07-13 Werner LEMBERG + + * src/roff/groff/groff.man: Add some cross references. + +2002-07-12 Werner LEMBERG + + * src/roff/troff/input.cc (substring_request): Add warnings for + string indices out of range. + +2002-07-11 Werner LEMBERG + + * font/devdvi/generate/ec.map: Fix typo (`(l' -> `/l'). + * font/devdvi/*EC: Regenerated. + +2002-07-10 Bernd Warken + + * man/groff_char.man: Updated and extended. + +2002-07-10 Werner LEMBERG + + * src/roff/troff/input.cc (length_macro): Renamed to... + (length_request): This. + Move call of `tok.next()' to the very end, otherwise the register + value hasn't been updated yet. + (init_input_requests): Updated. + +2002-07-09 Werner LEMBERG + + * src/roff/troff/input.cc (substring_macro): Renamed to... + (substring_request): This. + (init_input_requests): Updated. + * src/roff/troff/request.h: Updated. + +2002-07-08 Robert D. Goulding + + * src/roff/grog/grog.sh: Fix typo. + +2002-07-08 Werner LEMBERG + + * win32-diffs: Updated. + + Handle `papersize' keyword properly in DESC. + + * src/libs/libgroff/font.cc (font::scan_papersize): Fix argument + type. + Updated all callers. + * src/libs/libgroff/paper.cc: Add four more paper formats used by + grolj4. + * src/include/paper.h: Updated. + + * src/devices/grolbp/lbp.cc: Remove unnecessary semicolons. + Other minor C syntax fixes. + (papersize, paperlength, paperwidth): Renamed to `user_*'. + (lbp_printer): Add `papersize', `paperlength', and `paperwidth' + members. + (lbp_printer::lbp_printer): Pass three arguments. + Set paper dimensions properly. + (make_printer, main): Updated. + (handle_unknown_desc_command): Fix error messages. + (main): Handle papersize keyword in DESC properly. + + * src/devices/grolj4/lj4.cc (paper_size): Renamed to + `user_paper_size'. + (lbp_printer::lbp_printer): Pass an argument. + Set paper_size properly. + (handle_unknown_desc_command): Removed. + (make_printer, main): Updated. + * src/devices/grolj4/grolj4.man: Minor documentation fix. + + * man/groff_font.man, NEWS: Updated. + +2002-07-07 Werner LEMBERG + + Integrated eqn2graph, contributed by Eric S. Raymond. + + * contrib/eqn2graph/{Makefile.sub, eqn2graph.sh, eqn2graph.man}: New + files. + * Makefile.in, NEWS: Updated. + +2002-06-04 Werner LEMBERG + + Changing the substring request to make it fit better with other + string manipulation functions in other programming languages: + Index 0 is now the first character in the string, and index -1 + indicates the last character. Since this request didn't work + properly anyway in the last release, it doesn't harm too much to + change the syntax. + + * src/roff/troff/input.cc (substring_macro): Use loops to get + the real string length (ignoring COMPATIBLE_SAVE and + COMPATIBLE_RESTORE) and offsets. + Implement change described above. + + * man/groff_char.man, tmac/doc-common (doc-header), tmac/doc.tmac + (doc-do-Bd-args, doc-do-Bl-args: Changed accordingly. + + * NEWS, doc/groff.texinfo, man/groff_diff.man: Updated. + +2002-06-03 Werner LEMBERG + + Make .chop work with .de1 and friends. COMPATIBLE_SAVE and + COMPATIBLE_RESTORE are completely ignored. + + * src/roff/troff/input.cc (char_list::set, char_list::get): New + functions. + (macro): `length' field renamed to `len'. + Added new field `empty_macro' (1 if macro is empty), to be used + instead of checking `len'. + Updated all callers. + (macro::empty): Updated. + (macro::length, macro::set, macro::get): New functions. + (macro::append): Ignore COMPATIBLE_SAVE and COMPATIBLE_RESTORE. + Set `empty_macro'. + (chop_macro): Check and remove trailing COMPATIBLE_SAVE/ + COMPATIBLE_RESTORE pairs. + (asciify): Ignore COMPATIBLE_SAVE and COMPATIBLE_RESTORE. + * src/roff/troff/request.h: Updated. + + * doc/groff.texinfo: Document .chop's behaviour better. + +2002-06-02 Werner LEMBERG + + * doc/pic.ms: Fix documentation for the addition of positions. + + * tmac/doc.tmac, tmac/an-old.tmac: Need groff version 1.18. + +2002-06-29 Werner LEMBERG + + Implementation of string arguments of the form \*[foo arg1 arg2 ...] + + * src/roff/troff/input.cc (have_string_arg): New global variable. + (read_mode): New enumeration. + (read_escape_name): Use it. Update all calls. + (read_long_escape_name): Use it. Update all calls. + Set have_string_arg if appropriate. + (get_char_for_escape_name): Add parameter for handling space + character. + (interpolate_string_with_args, decode_string_args): New functions. + (get_copy, token::next): Call it if necessary. + (interpolate_string): Fix error message. + + * NEWS, doc/groff.texinfo, man/groff.man, man/groff_diff.man: + Document it. + +2002-06-24 Bernd Warken + + * man/groff_tmac.man: Updated and extended. + +2002-06-24 Werner LEMBERG + + * doc/pic.ms, src/preproc/pic/pic.man: Fix description of `:='. + +2002-06-23 Werner LEMBERG + + * doc/pic.ms: Improve documentation of composite block objects. + +2002-06-22 Werner LEMBERG + + * src/roff/troff/input.cc (init_registers): Add three registers + `seconds', `minutes', and `hours' to hold the current time. + + * NEWS, doc/groff.texinfo, man/groff.man, man/groff_diff.man: + Updated. + +2002-06-20 Werner LEMBERG + + Make \X accept both `\ ' and `\~', converting them to single space + characters. + + * src/roff/troff/token.h (token): Add TOKEN_UNSTRETCHABLE_SPACE. + (token::unstretchable_space): New inline function. + * src/roff/troff/input.cc (token::next, token::delimiter, + token::description, token::add_to_node_list, token::process): Handle + TOKEN_UNSTRETCHABLE_NODE. + (encode_char): Handle tok.stretchable_space and + tok.unstretchable_space. + + * NEWS, doc/groff.texinfo: Document it.. + +2002-06-19 Werner LEMBERG + + * src/devices/grops/ps.cc (ps_printer::special): Fix error message. + + * src/devices/grotty/tty.cc (tty_printer::special): Add `sgr' + keyword to enable/disable SGR output. + (tty_printer::change_fill_color): New function. + * NEWS, src/devices/grotty/grotty.man: Document `sgr' special. + + * src/roff/troff/input.cc (output_request): Add missing `tok.next()' + call. + +2002-06-18 Werner LEMBERG + + Add a `color' request and a `.color' register to control usage of + colours. + + * src/roff/troff/input.cc (disable_color_flag): Replaced with... + (color_flag): This (which is the inverse). + (activate_color): New function. + (main, init_input_requests): Updated. + * src/roff/troff/troff.h, src/roff/troff/node.cc + (troff_output_file::fill_color, troff_output_file::glyph_color): + Updated. + + * NEWS, doc/groff.texinfo, man/groff_diff.man, man/groff.man: + Document the changes. + +2002-06-17 Colin Watson + + Circumvent bug in autoconf 2.53 regarding top_builddir. + + * aclocal.m4 (GROFF_BUILDDIR): s/top_builddir/groff_top_builddir/. + * Makefile.in, doc/Makefile.in: + s/@top_builddir@/@groff_top_builddir@/. + * configure: Regenerated (with autoconf 2.53). + +2002-06-17 Werner LEMBERG + + * src/libs/libgroff/font.cc (font::load_desc): Fix computation of + `paperwidth' and `paperlength' for the `papersize' keyword. + +2002-06-16 P. Alejandro Lopez-Valencia + + * src/devices/grops/grops.man: Add info about Type 42 fonts. + +2002-06-15 Gaius Mulley + + * src/devices/grohtml/post-html.cc (html_printer::emit_raw, + html_printer::do_linelength, html_printer::do_pageoffset, + html_printer::do_indentation, html_printer::do_tempindent, + html_printer::do_break, html_printer::begin_page): Clear indented + text. + * tmac/html.tmac: Disable hyphenation. + +2002-06-15 Werner LEMBERG + + Don't produce HTML files if utility programs are missing. + + * Makefile.in (make_html, make_install_html): New variables. + (MDEFINES): Updated. + + * aclocal.m4 (GROFF_HTML_PROGRAMS): New function to test for HTML + utility programs. + * configure.ac: Use it. + * configure: Regenerated. + + * doc/Makefile.sub (PROCESSEDEXAMPLEFILES): Move webpage.html to... + (HTMLEXAMPLESFILES): This new variable. + (EXAMPLESIMAGEFILES): Renamed to... + (HTMLEXAMPLEIMAGEFILES): This. + (CLEANADD): Add HTMLEXAMPLEFILES. + (all): Use `make_html'. + (html): New target. + (install_data): Use `make_install_html'. + Move html stuff to... + (install_html): This new target. + (uninstall_sub): Updated. + +2002-06-14 Bernd Warken + + * src/roff/grog/Makefile.sub (grog): Renamed to... + (grog.old): This. + (grog): New rule to always install grog.sh as grog. + +2002-06-08 Bernd Warken + + * src/roff/grog/grog.pl: Fix typo. + +2002-06-07 Werner LEMBERG + + * doc/groff.texinfo: Add more info on .tr arguments. + +2002-06-05 Werner LEMBERG + + * NEWS, src/roff/grog/grog.man, doc/groff.texinfo: Updated. + + * aclocal.m4 (GROFF_MKSTEMP): Include unistd.h. + * configure: Regenerated. + +2002-06-05 Ralph Corderoy + + * src/roff/troff/symbol.cc (table_sizes): Add more values. + + * src/roff/grog/grog.pl, src/roff/grog/grog.sh: Recognize mom. + +2002-06-04 Werner LEMBERG + + * aclocal.m4 (GROFF_PAGE): Don't use `prefix' directly since it + is not initialized at the time we need it in case `--prefix' hasn't + been set. Check for `ac_default_prefix' also. + Test for `papersize' keyword also and generalize allowed whitespace. + * configure: Regenerated. + + * font/devps/Makefile.sub (DESC): Use `papersize' instead of + `paperlength'. + + * src/libs/libgroff/Makefile.sub (version, revision): Replaced + with... + (src_version, src_revision): New variables to avoid overwriting + from parent make process. + (version.cc): Updated. + + * src/preproc/html/pre-html.cc: Include paper.h and font.h. + (linebuf, linebufsize): New global variables. + (sys_fatal): Use `fatal' to abort properly. + (get_line): New function. + (get_resolution): Use it. + Improve error messages. + (get_papersize): Check `papersize' also. + Use `get_line'. + Improve error messages. + +2002-06-03 Werner LEMBERG + + * Makefile.comm (CLEANNOTSRCDIRADD): New target for files which + should be removed only if builddir is not srcdir. + (mostlyclean): Handle `CLEANNOTSRCDIRADD'. + (clean): Depend on `mostlyclean'. + (distclean): Depend on `clean'. + (realclean, extraclean): Depend on `distclean'. + (.y.cc, .y.o): Simplified. The output files are no longer written + to srcdir but to builddir. + * Makefile.in (MDEFINES): Add `version' and `revision'. + (uninstall_dirs): Fix order of directories. + * doc/Makefile.sub (version, revision): Removed. + (CLEANADD): Removed grnexmpl.g, groff, groff-*. + Added `HTMLDOCFILES'. + (CLEANNOTSRCDIRADD): New target for grnexmpl.h, groff, groff-*. + * src/preproc/eqn/Makefile.sub, src/preproc/pic/Makefile.sub, + src/preproc/refer/Makefile.sub (YTABC, YTABH): Don't use `srcdir' + as prefix. + + * doc/texinfo.tex (\authortt): New macro. + (\shortcontt): Define. + (\titlepage): Set \tt to \authortt while defining \authorfont. + (\appendixbox): New macro. + (\chapmacro, \appendixentry): Use \appendixbox to get even + indentation for letters. + (\summarycontents): Set \tt. + (\internalpagesize): Add two arguments for real paper width and + height as needed by pdfTeX. + (\letterpaper, \smallbook, \afourpaper, \afivepaper, \afourlatex): + Updated. + (\tempdima, \tempdimb): New temporary dimensions. + (\pagesizesyyy): Updated. + +2002-06-02 Werner LEMBERG + + Adding a new keyword `papersize' to the DESC file format (similar + but not completely identical to grolbp's extension). grops now has + a -p command line option to override `papersize'. Finally, grolbp + has been adapted to the new syntax. + + * src/libs/libgroff/paper.cc, src/include/paper.h: New files. It + defines and initializes the `papersizes[]' array with NUM_PAPERSIZES + elements. + * src/libs/libgroff/Makefile.sub (OBJS): Add `paper.o'. + (CCSRCS): Add `paper.cc'. + + * src/include/font.h (font): Add `papersize' element. + * src/libs/libgroff/font.cc (font::unit_scale): New helper function. + (font::scan_papersize): New function. + (font::load_desc): Use it for handling `papersize' keyword. + * src/libs/libgroff/fontfile.cc: Initialize `font::papersize'. + + * src/devices/grops/ps.cc: Include paper.h. + (user_paper_length): New global variable. + (ps_printer): Use paper length as initializer. + (make_printer): Updated. + (main): Handle new `-p' option. + * src/devices/grops/grops.man: Updated. + + * src/devices/grolbp/lbp.cc: Include paper.h. + s/papersizes/lbp_papersizes/. + (set_papersize): Use new `papersizes' array. + (handle_unknown_desc_command): Don't handle `papersize'. + (main): Use `font::scan_papersize' for handling `-p' option. + * src/devices/grolbp/grolbp.man: Updated. + + * man/groff_font.man: Document `papersize'. + * NEWS: Updated. + +2002-05-30 Werner LEMBERG + + * src/devices/grops/TODO: Updated. + * src/devices/grops/grops.man: More info on paper formats. + * man/groff_font.man: Document `paperheight' and `paperwidth'. + +2002-05-29 Werner LEMBERG + + * doc/Makefile.sub (CLEANADD): Add grnexmpl.g, groff, and groff-* + to list only if srcdir != currdir. + (distfiles): New target. + + * Makefile.in (EXTRADIRS): Add font/devlj4/generate. + (NOMAKEDIRS): New variable. + (DISTDIRS): Use it. + +2002-05-26 Werner LEMBERG + + Add .output request, similar to \! at top-level. + + * src/roff/troff/input.cc (transparent): Remove unused declaration. + (output_request): New function. + (init_input_requests): Add it. + Sorted. + * NEWS, doc/groff.texinfo, man/groff_diff.man, man/groff.man: + Document it. + + * Makefile.in (MDEFINES): Add INSTALL_INFO. + (prepare_examples): Fix typo. + * doc/groff.texinfo (@direntry): Fix it. + +2002-05-25 Werner LEMBERG + + Including the doc subdir into groff's Makefile system. + + * aclocal.m4 (GROFF_INSTALL_INFO): New function. + * configure.ac: Use it. + Generate `doc/Makefile'. + * configure: Regenerated. + + * Makefile.in (infodir, INSTALL_INFO): New variables. + (MDEFINES, uninstall_dirs): Updated. + (OTHERDIRS): Add `doc'. + * Makefile.comm (CLEANDIRADD): New variable. + (mostlyclean): Use it. + + * doc/Makefile.sub, doc/Makefile.in: New files. + * doc/Makefile: Removed. + + * NEWS, INSTALL: Updated. + +2002-05-24 Werner LEMBERG + + * doc/homepage.ms: Renamed to ... + * doc/webpage.ms: This. + Use `.NHR'. + +2002-05-23 Werner LEMBERG + + Integrating the `mom' macro package, contributed by Peter Schaffter + . + + * contrib/mom/*: New subdirectory tree. + * Makefile.in (docdir, exampledir, htmldocdir): New variables to + be used for documentation files. + (MDEFINES, uninstall_dirs): Use them. + (OTHERDIRS): Add contrib/mom. + * Makefile.comm (.man.n): Add @DOCDIR@, @EXAMPLEDIR@, and + @HTMLDOCDIR@. + * MANIFEST, NEWS: Updated. + +2002-05-22 Gaius Mulley + + Change syntax of \O: \O[0] suppresses output, \O[1] enables output + if at outer level; at start-up we are at outer level. + + * src/roff/troff/input.cc (do_suppress): Implement it. + Simplify \O[3]. + + Add option -p to show progress information. + pre-grohtml will now render only one page at a time, reducing the + size of needed disk resources enormously. + + * src/preproc/html/pre-html.cc (imagePageStem): Replaced with... + (imagePageName): New global variable. + (psPageName, show_progress, currentPageNo): New global variables. + (html_system): Close saved stderr and stdout handles. + (write_end_image): Accept a parameter to control \O escape. + (write_start_image): Adapted to new \O meaning. + (char_buffer::write_upto_newline): Updated. + (createAllPages): Replaced with... + (createPage): This new function to create a single page for images. + It uses `psselect' from the psutils package. + (removeAllPages): Removed. + (createImage): Updated. + Handle progress display. + (char_buffer::do_html, char_buffer::do_image) [DEBUGGING]: Removed. + (scanArguments): Add option -p. + (makeTempFiles): Updated to create temp files for psPageName and + imagePageName. + (removeTempFiles): Removed. + (main): Updated. + + * src/devices/grohtml/post-html.cc (header_desc::write_headings, + html_printer::write_header): Append `\0' to `buffer'. + (html_printer::do_eol): Depend on `current_paragraph->emitted_text'. + (main): Handle -p. + * src/devices/grohtml/html-text.cc (html_text::dump_stack_element): + Handle `text_emitted'. + (html_text::table_is_void): Slightly rewritten. + (stop): New external symbol. + (html_text::do_push) [DEBUGGING]: Use it and simplify. + (html_text::shutdown): Call `dump_stack'. + (html_text::do_space): Rewritten. + * src/devices/grohtml/grohtml.man: Document -p and the need of + `psselect'. + + * tmac/www.tmac (DC, HTML-DO-IMAGE, HTML-IMAGE-END): Updated to + new \O syntax. + Call \O[0] if `ps4html' is active. + * tmac/s.tmac (@EQ, @EN): Handle html better. + (@TS, TE): Ditto. + * tmac/html.tmac: Don't use black for background colour. + + * src/roff/troff/node.cc: Include `div.h'. + (troff_output_file::really_print_line): Don't use `is_on'. + (troff_output_file::word_marker, troff_output_file::flush_tbuf + troff_output_file::check_charinfo, + troff_output_file::put_char_width, troff_output_file::put_char, + troff_output_file::determine_line_limits, troff_output_file::draw, + real_output_file::begin_page, glyph_color_node::tprintf, + fill_color_node::tprint, hline_node::tprint, vline_node::tprint): + Use `is_on'. + (troff_output_file::really_on): Call `do_motion'. + (suppress_node::tprint): Use `get_page_number' instead of `%' + register. + Call `reset_output_registers' conditionally on `is_on'. + + * doc/groff.texinfo: Document new syntax of \O. + * NEWS, man/groff_diff.man: Updated. + +2002-05-22 Werner LEMBERG + + * MORE.STUFF: Add info about David Frey's deroff implementation. + Mention troff.org. + +2002-05-16 Werner LEMBERG + + Pic's `with' attribute now accepts positions. + + * src/preproc/pic/pic.y: Make `.', BOX, CIRCLE, ELLIPSE, ARC, LINE, + ARROW, SPLINE, and `[' left-associative tokens to fix shift/reduce + conflicts. + (object_spec): Add rule for `WITH' and `position'. + (relative_path): Give `corner' the precedence of `CHOP'. + * src/preproc/pic/object.h (path): New members `pos' and + `is_position'. + * src/preproc/pic/object.cc: Updated initializers of `path'. + (path::follow): Handle `is_position'. + + * doc/pic.ms: Completely updated grammar description. + Many typographical improvements. + +2002-05-15 Werner LEMBERG + + * src/roff/troff/env.cc(hyphen_trie::hpf_getc): Accept ^^x (char + code of x in range 0-127) also. + * doc/groff.texinfo, man/groff_diff.man: Updated. + + Added keywords `north', `south', `east', and `west' for corners + in pic. + + * src/preproc/pic/lex.cc (lookup_keyword): Add NORTH, SOUTH, EAST, + and WEST. + (yylex): Handle them. + * src/preproc/pic/pic.y: Add tokens NORTH, SOUTH, EAST, and WEST. + (corner): Handle them. + +2002-05-14 Werner LEMBERG + + * src/devices/grops/grops.man: Clarify handling of `download' file. + +2002-05-11 Werner LEMBERG + + Adding `warnscale' and `spreadwarn' requests, based on a patch from + Jeffrey Friedl . + + * src/roff/troff/input.cc (spread_limit, warn_scale, + warn_scaling_indicator): New global variables. + (warnscale_request, spreadwarn_requests): New functions. + (main): Initialize `warn_scale' and `warn_scaling_indicator'. + (init_input_requests): Updated. + (error_type): Add `OUTPUT_WARNING'. + (do_error): Handle it. + (output_warning): New warning function which shows output location. + * src/roff/troff/env.h (spread_limit): New external variable. + * src/roff/troff/env.cc (environment::choose_breakpoint): Use + `output_warning'. + (distribute_space): Emit warning if added space is larger than + `spread_limit'. + (environment::possibly_break_line): Emit warning if a line can't + be adjusted on both sides. + + * doc/groff.texinfo, man/groff_diff.man, man/groff.man: Document it. + +2002-05-08 Werner LEMBERG + + * src/roff/troff/node.cc (special_node::special_node): Use + env_definite_font(curenv) instead of curenv->get_font(). Otherwise + \X''\% crashes, for example. + + * doc/groff.texinfo: Document \! and \? used at top-level. + +2002-05-06 Werner LEMBERG + + * src/preproc/pic/pic.man: Fix some keyword syntax. + Other minor typographical fixes. + + * src/roff/groff/groff.man: Fix typos. + +2002-05-04 Werner LEMBERG + + * src/roff/groff/groff.man ([ShortOpt]): Renamed to... + (ShortOpt[]): This to avoid problems with refer. + + * doc/pic.ms: Fix typo. + Fix pic grammar description. + + * tmac/an-old.tmac (ne): Use de1, not de. + +2002-05-03 Werner LEMBERG + + * doc/groff.texinfo: Finished separation of glyphs and characters. + Don't use the string `Appendix' for appendix headers (both in + the text and the table of contents). + * man/groff_tmac.man, src/roff/troff/troff.man: Fix order of tmac + directories. + + Use registers LL and LT (similar to -ms) for controlling the + length of title and line, respectively, in the -man and -mdoc + macro packages. + + * tmac/doc-ditroff (doc-setup-page-layout), tmac/doc-nroff + (doc-setup-page-layout): Use \n[LL] and \n[LT]. + * tmac/an-old.tmac: Set \n[LL] and \n[LT] if not defined. + (TH): Use \n[LL]. + (an-header, an-p-footer): Use \n[LT]. + * NEWS, tmac/groff_man.man, tmac/groff_mdoc.man, + doc/groff.texinfo: Document it. + +2002-05-02 Werner LEMBERG + + * doc/fdl.texi: New file. + * doc/groff.texinfo: Include it. + Define and use @copying. + Starting with separating glyph, symbol, and character. + +2002-04-27 Werner LEMBERG + + * Makefile.in (EXEEXT): Set it. + * src/*/Makefile.sub (PROG): Add $(EXEEXT) for all non-script + programs. + + * src/include/nonposix.h: Define GS_NAME. + * src/preproc/html/pre-html.cc (createAllPages): Use GS_NAME. + + Some preliminary changes for EMX support under OS/2. + + * src/preproc/pic/main.cc (main), src/roff/groff/pipeline.c: Add + __EMX__ similar to __MSDOS__. + * src/utils/indxbib/indxbib.cc (main) [__EMX__]: Use `unlink'. + +2002-04-25 Werner LEMBERG + + * doc/groff.texinfo: Integrated groff_out.man. + Some macro fixes. + +2002-04-23 Werner LEMBERG + + * man/groff_out.man: Minor fixes. + +2002-04-23 Werner LEMBERG + + * doc/groff.texinfo: Moving @cindex entries after @Def* to get + correct page references. + Fixed many index entries. + +2002-04-23 Bernd Warken + + * man/roff.man: Enlarged. + +2002-04-22 Werner LEMBERG + + * doc/groff.texinfo: More examples, other fixes. + +2002-04-20 Werner LEMBERG + + * src/roff/troff/input.cc (pipe_output): Multiple calls to `pi' + will now form a chain, e.g. + + .pi foo + .pi bar + + is now the same as + + .pi foo | bar + + This is for compatibility with plan 9's troff. + + * tmac/tty.tmac: Set default tab values to 0.8i to be compatible + with UNIX troff. + * NEWS: Updated. + + * doc/groff.texinfo: Add documentation of remaining requests and + registers. + +2002-04-19 Werner LEMBERG + + * doc/groff.texinfo: Add documentation of remaining escapes. + + * font/devdvi/generate/tc.map: Remove entry for `sr'. + * font/devdvi/*TC: Regenerated. + +2002-04-18 Werner LEMBERG + + * src/roff/troff/input.cc (token::next): Make \H behave consistently + if not in compatibility mode, i.e., increment relative to the + previous height. + * doc/groff.texinfo: Updated accordingly. + +2002-04-17 Werner LEMBERG + + * doc/groff.texinfo: Document \\, \e, \E, \., and \c. + +2002-04-16 Bernd Warken + + * src/roff/groff/groff.man: Improve documentation of -P option. + Other minor fixes. + +2002-04-15 Werner LEMBERG + + Add new escape \F to switch font family. + + * src/roff/troff/input.cc (token::next): Handle \F. + * src/roff/troff/env.cc (environment::set_family): Handle + `interrupted' flag. + * NEWS, doc/groff.texinfo, man/groff_diff.man, man/groff.man: + Document it. + +2002-04-14 Werner LEMBERG + + * tmac/doc.tmac (doc-tag-list): Use \Z to avoid stretching of + spaces in tags. + +2002-04-13 Werner LEMBERG + + Implement \f[] as an alternative to \fP. Change \mP and \MP to + \m[] and \M[], respectively. + + * src/roff/troff/symbol.cc (EMPTY_SYMBOL): New global variable. + (symbol::symbol): Handle NULL string and empty string differently. + * src/roff/troff/symbol.h (symbol::is_empty): New inline function. + * src/roff/troff/input.cc (read_escape_name, read_long_escape_name): + Add optional parameter. + Updated calling functions. + (get_copy, do_glyph_color, do_fill_color, token::next): Use + `symbol::is_empty'. + * src/roff/troff/env.cc (environment::set_font): Ditto. + + * src/preproc/pic/troff.cc (troff_output::set_fill, + troff_output::reset_color: Updated. + + * tmac/www.tmac: Updated. + + * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo, + doc/homepage.ms, src/devices/grotty/grotty.man, tmac/groff_www.man: + Updated. + + * tmac/Xps.tmac: Remove some redundant code. + + * tmac/doc-common, tmac/doc-ditroff, tmac/doc-nroff, tmac/doc.tmac, + tmac/dvi.tmac, contrib/groffer/groffer.man, man/roff.man, + man/groff_out.man, man/groff.man, man/groff_diff.man, + src/roff/groff/groff.man: Replace \f[P] with \f[]. + +2002-04-13 Bernd Warken + + * src/include/printer.h, src/libs/libdriver/printer.cc + (printer::change_fill_color): New member function. + * src/libs/libdriver/input.cc (parse_D_command): Use it. + +2002-04-12 Werner LEMBERG + + * doc/groff.texinfo: Completed pass on gtroff reference. + +2002-04-11 Werner LEMBERG + + * doc/groff.texinfo: More fixes. + +2002-04-11 Bernd Warken + + * src/include/color.h: Decorate with `const'. + Use `size_t'. + Include `stddef.h'. + * src/libs/libgroff.color.cc: Decorate with `const'. + Use `size_t'. + (color::color): Initialize members. + * src/libs/libdriver/input.cc (parse_D_command): Handle `f' + command according to the documentation. + + * man/groff_out.man: Updated. + Minor fixes. + +2002-04-11 Gaius Mulley + + * src/preproc/html/pre-html.cc (write_start_image): Remove + redundant output. + * tmac/www.tmac (DC, HTML-DO-IMAGE): Ditto. + + * src/devices/grohtml/post-html.cc (page::add_and_encode): Using + \C'hy' caused an assertion failure. + + * src/roff/troff/env.cc (environment::environment): Initialize + `emitted_node'. + (environment::copy): Handle `ignore_next_eol' and `emitted_node'. + +2002-04-10 Werner LEMBERG + + * man/groff_diff.man, man/groff.man, NEWS, doc/groff.texinfo: + Document pvs request and .pvs register. + +2002-04-09 Werner LEMBERG + + * doc/groff.texinfo: Improve and fix documentation of diversions + and environments. + +2002-04-08 Werner LEMBERG + + * doc/groff.texinfo: Fix documentation of drawing functions. + Other minor fixes. + +2002-04-07 Werner LEMBERG + + * doc/groff.texinfo: Better documentation of double quotes as + arguments. + Other minor fixes. + +2002-04-06 Werner LEMBERG + + * man/groff_font.man: Document names of special characters better. + * doc/groff.texinfo: Minor improvements. + + * tmac/lbp.tmac: Load latin1.tmac. + * tmac/X.tmac, tmac/Xps.tmac: Load latin1.tmac or cp1047.tmac. + + * font/devX*/*: Regenerated (all chars > 0x80 removed). + +2002-04-05 Werner LEMBERG + + * tmac/tty.tmac: Don't use shc request. + * tmac/latin1.tmac, tmac/cp1047.tmac: Translate soft hyphen to `\%'. + * NEWS: Updated. + + * man/groff_diff.man: Minor fixes. + + * font/devlbp/*: Remove all `charXXX' entities. + + * src/libs/libgroff/font.cc (font::~font): Deallocate + `special_device_coding'. + (font::load): Use `new' for allocating `special_device_coding'. + * src/libs/libgroff/nametoindex.cc (character_indexer::lookup_char): + Removed unused member. + +2002-04-05 Werner LEMBERG + + * src/drivers/grops/psrm.cc (skip_possible_newline): New function. + (resource_manager::do_begin_binary, + resource_manager::do_begin_data): Use it. + + * doc/texinfo.tex: Updated to version 4.2. + + * src/roff/troff/token.h: Add TOKEN_ZERO_WIDTH_BREAK for `\:'. + (token::zero_width_break): New inline function. + * src/roff/troff/input.cc (token::next): Use it. + (token::description): Updated. + (encode_char): Ignore `\%', `\&', `\)', and `\:'. + (token::add_to_node_list, token::process): Use it. + * NEWS, doc/groff.texinfo: Updated. + + * src/preproc/eqn/over.cc (over_box::output): Fix typo. + * tmac/tty.tmac: Add missing backslash. + +2002-04-04 Tadziu Hoffmann + + * src/preproc/eqn/box.cc (set_script_size, box::top_level): Use + `.ps' register instead of `.s' to handle fractional point sizes. + * src/preproc/eqn/limit.cc (limit_box::compute_metrics, + limit_box::output): Ditto. + * src/preproc/eqn/other.cc (size_box::compute_metrics, + size_box::output): Ditto. + * src/preproc/eqn/over.cc (over_box::compute_metrics, + over_box::output): Ditto. + * src/preproc/eqn/script.cc (script_box::compute_metrics, + script_box::output): Ditto. + * src/preproc/eqn/sqrt.cc (sqrt_box::compute_metrics, + sqrt_box::output): Ditto. + +2002-04-03 Michael Selway + + * src/drivers/grops/psrm.cc (resource_manager::do_begin_binary): + Fix typo. + +2002-04-03 Werner LEMBERG + + * doc/homepage.ms: Reduce title size. + * doc/groff.texinfo: Fix documentation of .t register. + Fix handling of colon. + Fix `\' vs. `\\'. + + * src/roff/troff/input.cc (exit_troff): Emit LAST_PAGE_EJECTOR + only if page length is positive to avoid a loop. + + * tmac/an-old.tmac (ne): Increase page length to avoid problems with + tbl. + +2002-04-02 P. Alejandro Lopez-Valencia + + * src/include/nonposix.h, src/roff/groff/pipeline.c: + s/__CYGWIN32__/__CYGWIN__/. + +2002-03-28 Gaius Mulley + + * doc/gnu.xpm: New image contributed by Emily Mulley. + * doc/Makefile (gnu.eps, gnu.png): Use pnmdepth. + (homepage.html): Be dependent on gnu.eps. + * doc/homepage.ms: Updated to new image. + + * src/devices/grohtml/post-html.cc (html_printer): New member + `sbuf_prev_hpos'. + (html_printer::flush_sbuf, html_printer::set_char): Set it. + (html_printer::sbuf_continuation): Use it. + +2002-03-28 Werner LEMBERG + + * src/libs/libgroff/getopt.c: Updated to latest version. + + * tmac/README: More on hyphen.tex license. + +2002-03-26 Larry Kollar + + * doc/groff.texinfo: Add documentation of most missing requests. + +2002-03-25 Werner LEMBERG + + Add three glyphs `t+-', `tmu', and `tdi' which are textual variants + of `+-', `mu', and `di', respectively. + + * font/devascii/R.proto, font/devutf8/R.proto, + font/devlatin1/R.proto, font/devhtml/R.proto, + font/devcp1047/R.proto, font/devlpb/*: Add them. + * font/devps/generate/textmap: Ditto. + * font/devps/*: Regenerated. + * font/devlj4/generate/text.map: Add them. + * font/devlj4/*: Regenerated. + * font/devdvi/generate/tc.map: Use them. + * font/devdvi/generate/texsy.map: Add them. + * font/devdvi/*: Regenerated. + * font/devX*/*: Regenerated. + + * tmac/latin1.tmac, tmac/cp1047.tmac, tmac/tty.tmac, + tmac/tty-char.tmac: Updated. + + * NEWS, man/groff_char.man: Updated. + +2002-03-24 Werner LEMBERG + + * tmac/dvi.tmac, tmac/X.tmac, tmac/ps.tmac, tmac/html.tmac, + tmac/lj4.tmac, tmac/tty.tmac: Replace most `.char' with `.fchar'. + * tmac/ec.tmac: Remove `.rchar' calls (no longer necessary since + we use `.fchar' in dvi.tmac. + * tmac/dvi.tmac: Improve definition of \[Fo] and \[Fc]. + * tmac/Xps.tmac: Simplify some char definitions. + Add definition for \[f/]. + * man/groff_char.man: Updated for new X.tmac. + + * tmac/README: New file. + +2002-03-23 Phil Lobbes + + * Makefile.comm (.y.o): New rule for make on Solaris 2.5.1 -- the + internal .y.o rule took precendence over the .y.cc rule, compiling + the yacc files with gcc instead of g++. + +2002-03-23 Werner LEMBERG + + * tmac/dvi.tmac: Add replacement font for `CB'. + + * tmac/doc.tmac: s/request/macro/ in messages. + (doc-generic-macro): Improve error message. + * tmac/groff_mdoc.man: Minor improvements. + +2002-03-22 Werner LEMBERG + + * doc/groff.texinfo: Document possible conflict between `tr' and + `char' requests. + +2002-03-21 Werner LEMBERG + + Improve handling of hyphenation patterns. It is now possible to + use most of TeX's pattern files unmodified. To make the process + more flexible, a new request `hpfcode' has been added which + provides a character code mapping for the `hpf' request. See + comment before hpf_getc() for more details. + + * src/roff/troff/env.cc (insert_hyphenation, hpf_getc): New + functions. + (read_patterns_file): Additional parameter for exception dictionary. + Extended to recognize \pattern, \hyphenation, and \endinput. + (do_hyphenation_patterns_file): Updated. + * src/roff/troff/env.h (hpf_code_table): New extern. + + * src/roff/troff/input.cc (hpf_code_table): New array. + (init_hpf_code_table, hyphenation_patterns_file_code): New + functions. + (hyphenation_code): Handle translation from `trin' correctly. + (main, init_input_requests): Updated. + (charinfo::set_translation): Handle hyphenation code also. + + * src/roff/troff/charinfo.h (charinfo::get_translation_input): New + inline function. + + * src/roff/troff/env.cc (WORD_MAX): Reduced to 256 since `unsigned + char' is used for offsets in hyphenation exceptions. + + * tmac/hyphen.us: Replace with contents of unmodified `hyphen.tex'. + + * NEWS, man/groff_diff.man, man/groff.man: Document it. + +2002-03-20 Larry Kollar + + * doc/groff.texinfo: Add documentation for `hpfa' and `trin' + requests. + +2002-03-18 Werner LEMBERG + + * tmac/html.tmac: Fix serious typo. + +2002-03-17 Larry Kollar + + * doc/groff.texinfo: Add documentation for `writec' request. + +2002-03-17 Werner LEMBERG + + Added request `hpfa' to append hyphenation patterns. + + * src/roff/troff/env.cc (hyphen_trie::read_patterns_file): Add + parameter `append'. + (hyphenation_patterns_file): Renamed to... + (do_hyphenation_patterns_file): This. + (hyphenation_patterns_file, hyphenation_patterns_file_append): New + functions. + (init_hyphen_requests): Updated. + * NEWS, man/groff.man, man/groff_diff.man: Document it. + +2002-03-16 Werner LEMBERG + + Added request `writec' in analogy to `tmc'. + + * src/roff/troff/input.cc (write_request): Renamed to... + (do_write_request): This. + Added one parameter. + (write_request, write_request_continue): New functions. + (init_input_requests): Updated. + * NEWS, man/groff.man, man/groff_diff.man: Document it. + + * font/devdvi/DESC.in (sizes): Allow all sizes in the range + 5-10000pt. + * NEWS: Document it. + +2002-03-15 Werner LEMBERG + + * man/groff.man: Add writem request. + + Add request `trin' (translate input) to make `.asciify' work + correctly. This is necessary since `charXXX' entity names are no + longer hardcoded in font definition files. + + * src/roff/troff/charinfo.h (charinfo): Add `asciify_code' and + `translate_input' members. + (charinfo::set_asciify_code, charinfo::get_asciify_code, + charinfo::set_translation_input): New methods. + (charinfo::set_translation): Add third argument. + * src/roff/troff/input.cc (charinfo:set_translation): Set + `asciify_code'. + (do_translate): Add second argument. + (translate_input): New function. + (init_input_requests): Updated. + * src/roff/troff/node.cc (glyph_node::asciify, + composite_node::asciify): Use `get_asciify_code'. + + * tmac/cp1047.tmac, tmac/latin1.tmac: Use `trin'. + + * NEWS, man/groff.man, man/groff_diff.man: Updated. + +2002-03-14 Larry Kollar + + * doc/groff.texinfo: Improve documentation of .RS and .RE. + +2002-03-14 Werner LEMBERG + + Add a new request `sizes' similar to the `sizes' command in DESC + files. + + * src/roff/troff/env.cc (override_sizes): New function. + (init_env_requests): Use it. + * src/roff/troff/token.h: Export `read_string'. + * NEWS, man/groff_diff.man, man/groff.man: Document it. + +2002-03-12 Werner LEMBERG + + * doc/groff.texinfo: More fixes for texinfo 4.1 and higher. + +2002-03-10 Werner LEMBERG + + * tmac/pspic.tmac: Add support for -Tdvi. + * tmac/dvi.tmac: Include pspic.tmac. + * src/devices/grodvi/grodvi.man: Document it. + * NEWS: Updated. + + * font/devlj4/generate/Makefile: Fix URL of metric files. + +2002-03-09 Werner LEMBERG + + * PROBLEMS: The static constructor bug has been fixed in z/OS V1R3. + +2002-03-09 Larry Kollar + + * tmac/groff_ms.man: Add documentation for RS and RE macros. + +2002-03-08 Werner LEMBERG + + * doc/groff.texinfo: Fixes for texinfo 4.1. + +2002-03-07 Werner LEMBERG + + * src/include/lib.h: Include getopt.h if groff-getopt.h can't be + included. + Handle CYGWIN properly. + +2002-03-07 Paco Andrés Verdú + + * font/devlbp/Makefile.sub (DEVFILES): Add some missing fonts. + * tmac/lbp.tmac: Add some font translations. + +2002-03-02 Werner LEMBERG + + * font/devcp1047/R.proto, font/devlatin1/R.proto, + font/devhtml/R.proto: Remove `charXXX' entries. + * tmac/tty.tmac, tmac/html.tmac: Load latin1.tmac or cp1047.tmac + where appropriate. + + * font/devlj4/generate/text.map: Remove `charXXX' entries. + * font/devlj4/*: Regenerated all font definition files. + * tmac/lj4.tmac: Load latin1.tmac. + + * src/utils/hpftodit/hpftodit.cc (do_file): Partially undo change + from 2000-06-17: LJ4 metric files are *not* text files. + + * tmac/troffrc, tmac/dvi.tmac, tmac/ps.tmac: Don't use .T string + register to test for EBCDIC. + +2002-03-01 Werner LEMBERG + + * src/utils/afmtodit/afmtodit.pl: Skip comment lines in encoding + files (as grops already does). + * src/utils/afmtodit/afmtodit.man: Document comment lines in map + files. + * src/devices/grops/grops.man: Document comment lines in encoding + files. + + * tmac/cp1047.tmac: New file. + * tmac/dvi.tmac, tmac/tty-char.tmac: Use it. + * tmac/ps.tmac: Load latin1.tmac or cp1047.tmac. + * tmac/Makefile.sub (NORMALFILES): Updated. + + * tmac/ec.tmac: Don't load latin1.tmac again. + + * font/devps/generate/lgreekmap, font/devps/generate/symbolchars, + font/devps/generate/dingbats.map, + font/devps/generate/dingbats.rmap, font/devps/text.enc, + font/devps/generate/Makefile (symbolmap): Add header comment. + * font/devps/generate/textmap: Ditto. + Remove `charXXX' entries. + * font/devps/symbolmap: Regenerated. + * font/devps/*: Regenerated all font definition files. + +2002-02-28 Werner LEMBERG + + Add color support to grodvi (for drawing colors are currently + translated to gray values). + + * src/devices/grodvi/dvi.cc (FILL_MAX): Removed. + (dvi_printer): Add `cur_color' member. + (dvi_printer::set_color): New function. + (draw_dvi_printer): Remove `fill'. + (draw_dvi_printer::fill_next): Pass environment as parameter. + Update code for new color support translated to gray. + (dvi_printer::set_char): Updated. + (dvi_printer::begin_page, dvi_printer::end_page): Handle color + changes crossing the page border. + (dvi_printer::draw): Updated. + Remove cases `f' and `F'. + * tmac/dvi.tmac: Add color definitions. + * NEWS, src/devices/grodvi/grodvi.man: Updated. + + * tmac/an-old.tmac (R): Make this a macro to emit a warning if + used incorrectly. + + * aclocal.m4 (GROFF_NEED_DECLARATION): Use test similar to recent + versions of autoconf. + * configure: Updated. + + * doc/homepage.ms: Use `.blm'. + * tmac/www.tmac (www-depth): New auxiliary variable. + (www-pop-level): Don't issue HTML tag. + (ULS, ULE, LI): Use absolute indentation. + + * src/devices/grops/ps.cc (ps_printer::begin_page, + ps_printer::end_page): Switch forth and back to default color while + starting a new page. + +2002-02-27 Werner LEMBERG + + Add EC and TC fonts to devdvi. + + * src/utils/tfmtodit/tfmtodit.man: Document patching of exbase.mf. + * font/devdvi/generate/cork.map: Renamed to... + * font/devdvi/generate/ec.map: This. + Remove entry for `aq'. + * font/devdvi/generate/tc.map: New file. + * font/devdvi/generate/Makefile (*EC, *TC): New creation rules for + EC and TC fonts. + (FONTS): Updated. + * font/devdvi/*EC, font/devdvi/*TC: New font definition files. + * font/devdvi/Makefile.sub (DEVFILES): Updated. + * tmac/ec.tmac: New file. + * tmac/Makefile.sub (NORMALFILES): Updated. + * NEWS, src/devices/grodvi/grodvi.man: Updated. + * man/groff_char.man: Check `ECFONTS' register. + + * font/devdvi/{TR,TI,TB,TBI,HR}: Fix `name' field. + +2002-02-26 Werner LEMBERG + + * font/devdvi/generate/*.map: Remove all `charXXX' entries. + * font/devdvi/generate/cork.map: Add 'y and 'Y. + * font/devdvi/*: Updated. + * tmac/dvi.tmac: Formatting. + + Add font `HBI' for the dvi output. + Add support for font families `T' and `H'. + + * font/devdvi/HBI: New file. + * font/devdvi/B: Renamed to ... + * font/devdvi/TB: This. + * font/devdvi/BI: Renamed to ... + * font/devdvi/TBI: This. + * font/devdvi/I: Renamed to ... + * font/devdvi/TI: This. + * font/devdvi/R: Renamed to ... + * font/devdvi/TR: This. + * font/devdvi/H: Renamed to ... + * font/devdvi/HR: This. + * font/devdvi/Makefile.sub (DEVFILES): Updated. + * font/devdvi/generate/Makefile (HBI): New rule. + (FONTS): Updated. + (R, I, B, BI, H): Renamed to ... + (TR, TI, TB, TBI, HR): This, respectively. + (srcdir): Fixed. + * NEWS, src/devices/grodvi/grodvi.man: Updated. + * font/devdvi/DESC.in: Don't mount R, I, B, BI, and CWI. + Add `styles' and `family' keywords. + * tmac/dvi.tmac: Alias `H' to `HR'. + Add some fspecial requests for italic fonts. + Add TR and TI as special. + Add support for `_' with font CWI. + + * src/roff/troff/number.cc (parse_expr): Add missing `break' for + operator `:'. Until now, the expression `0:1' would return 2 + instead of 1. + +2002-02-25 Werner LEMBERG + + * man/groff_char.man: Added some missing PS glyph names (from the + Adobe Glyph List). + * font/devps/generate/textmap, font/devps/symbolmap: Add + `arrowupdn'. + + * doc/groff.texinfo: Minor additions and fixes. + * man/groff_diff.man: Remove documentation of fp request. This + is already covered in the original troff manual. + Updated to be consistent with other doc files. + * NEWS: Updated. + +2002-02-24 Werner LEMBERG + + * aclocal.m4 (GROFF_EBCDIC): Don't include `font/devutf8' in + TTYDEVDIRS. + Define new variable OTHERDEVDIRS (containing `font/devlj4 + font/devlbp' if not EBCDIC). + * Makefile.in (TTYDEVDIRS): Always include `font/devutf8'. + (OTHERDEVDIRS): New variable. + (MDEFINES, DEVDIRS, ALLDIRS, DISTDIRS): Updated. + * configure: Regenerated. + + * NEWS, src/devices/grotty/grotty.man: Updated. + +2002-02-23 Werner LEMBERG + + * src/roff/troff/input.cc (do_overstrike, do_bracket, + get_line_arg): Honour input level. + + Add new symbol `mc' corresponding to U+00B5 MICRO SIGN. + + * font/*/*: Implement it in all font files. + * font/devps/generate/textmap, font/devps/generate/symbolchars, + * font/devps/symbolmap: Updated. + * font/devlj4/generate/text.map: Updated. + * font/devdvi/generate/CompileFonts (sizes): Add LaTeX sizes. + * font/devdvi/generate/texmi.map: Updated. + + * font/devutf8/R.proto: Remove all `charXXX' entries. + * font/devutf8/NOTES: Updated. + + * font/devX*/*: Regenerated with xtotroff, using fonts from XFree86 + version 4.1.0. + + * tmac/latin1.tmac, tmac/psold.tmac, tmac/tty-char.tmac: Updated. + + * NEWS, man/groff_char.man: Updated. + +2002-02-21 Phil Lobbes + + * src/include/lib.h [HAVE_SNPRINTF]: Include stdarg.h. + +2002-02-20 Ralph Corderoy + + * src/roff/grog/grog.pl: Fix computation of $refer. + +2002-02-19 Werner LEMBERG + + * src/include/lib.h [!HAVE_SNPRINTF]: Add declarations for + `snprintf' and `vsnprintf'. + + * src/include/htmlindicate.h: Renamed to... + * src/include/htmlhint.h: This. + * src/include/Makefile.sub: Updated. + * src/preproc/eqn/main.cc: Updated. + +2002-02-18 Werner LEMBERG + + * man/roff.man, man/groff_out.man, man/groff.man, + man/groff_diff.man, man/ditroff.man, src/roff/groff/groff.man, + src/roff/troff/troff.man: Updated to latest changes in www.tmac. + + * win32-diffs: Updated. + +2002-02-17 Werner LEMBERG + + * doc/Makefile (clean): Add *.eps. + (MEMACROS): Removed. + (TFLAG): New variable. + (TROFF): Use it. + Add -ww. + (GROFF): Use TFLAG, FFLAG, -U, -p, -e, -t, and -ww. + (.me.dit): Fixed. + (.ms.html, .ms.ascii, .ms.ps, homepage.html): Simplify. + + * tmac/www.tmac: Use dummy diversion while resetting and disabling + `.tl'. + * tmac/e.tmac: Inserted some more `\"' to remove warnings if used + unstripped. + * src/roff/troff/troff.man: Fix order of parameter description. + + * NEWS: Updated. + +2002-02-16 Gaius Mulley + + Simplify image handling for grohtml. + Fix

bug. + + * src/devices/grohtml/html-text.cc (DEBUGGING): Don't undefine but + comment out. + (html_text::dump_stack): Don't emit newline while debugging. + (html_text::do_push) [DEBUGGING]: Print more info. + (html_text::check_emit_text): Fix handling of

. + * src/devices/grohtml/html.h: Updated. + * src/devices/grohtml/output.cc (FPUTC, FPUTS, PUTC): New macros, + replacing `fputc', `fputs', `putc'. If DEBUGGING is defined, they + send its data to stderr also. + Update all callers. + (simple_output::space_or_newline) [DEBUGGING]: Removed. + * src/devices/grohtml/post-html.cc (html_printer::do_links, + html_printer::html_printer): Remove `DEBUGGING' conditionals. + + * src/include/html-strings.h (HTML_IMAGE_{CENTERED,LEFT,RIGHT,END}): + Removed. + * src/libs/libgroff/htmlhint.cc (is_in_graphic_start, + is_inline_image): Removed. + (html_begin_suppress, html_end_suppress): Don't take a parameter. + (graphic_start, graphic_end): Removed. + * src/include/htmlindicate.h: Updated. + * src/preproc/html/pre-html.cc (DEBUG_HTML): Removed. + (macroset_template): New global variable. + (makeFileName): Use `macroset_template'. + (write_end_image): Don't take a parameter. + Don't emit newline. + (write_start_image: Don't emit newline. + (char_buffer::write_upto_newline): Updated. + (char_buffer::skip_to_newline): Renamed to ... + (char_buffer::skip_until_newline): This. + Fix code. + (char_buffer::write_file_troff, char_buffer::write_file_html): + Simplified. + (createAllPages, createImage) [DEBUGGING]: Handle `debug' flag. + (removeAllPages): Remove `DEBUGGING' conditionals. + (addRegDef, dump_args): New functions. + (char_buffer::do_html, char_buffer::do_image): Handle + `www-image-template' command line variable. + Add more debugging code. + (addps4html): Removed. + (removeTempFiles) [DEBUGGING]: Handle `debug' flag. + + * src/preproc/eqn/main.cc: Include `ctype.h'. + (suppress_html): Removed. + (do_file): Updated. + (inline_equation): Use `html_begin_suppress' and + `html_end_suppress'. + * src/preproc/pic/troff.cc: Don't include `htmlindicate.h'. + (troff_output::start_picture, troff_output::finish_picture): + Updated. + * src/preproc/tbl/main.cc: Don't include `htmlindicate.h'. + (process_input_file): Updated. + + * src/roff/troff/div.cc (page_number): Set page number only if the + `ps4html' register isn't defined. + * src/roff/troff/input.cc (image_no): New external variable. + (do_suppress): Use it. + * src/roff/troff/node.h (suppress_node::image_id): New member. + * src/roff/troff/node.cc (image_no): Remove `static' keyword. + (suppress_node::suppress_node): Initialize `image_id' member. + (suppress_node::same): Handle `image_id' also. + (suppress_node::copy): Updated. + (last_image_id): New global variable. + (suppress_node::tprint): Use it. + + * tmac/an-old.tmac (TS, TE, EQ, EN): Use HTML-IMAGE and + HTML-IMAGE-END. + * tmac/pspic.mac (PSPIC): Fix html support. + * tmac/s.tmac (@EQ, @EN, @TS, TE, PS, PE): Ditto. + * tmac/www.tmac (www-image-template): Set up. + (HTMLINDEX): Renamed to... + (HX): This. + (BODYCOLOR): Renamed to... + (BCL): This. + (BACKGROUND): Renamed to... + (BGIMG): This. + (URL): Change order of parameters for consistency. + (MAILTO): Renamed to... + (MTO): This. + (IMAGE, PNG-IMAGE, MARGIN-PNG-IMAGE): Renamed to... + (IMG, PIMG, MPIMG): This. + (HTML-H-BEGIN, HTML-H-END): Renamed to... + (HnS, HnE): This. + (LINKS): Renamed to... + (LK): This. + (LINE): Renamed to... + (HR): This. + (NO-AUTO-RULE): Renamed to... + (NHR): This. + (HTML-TL): Renamed to... + (HTL): This. + (UL-BEGIN, UL-END): Renamed to... + (ULS, ULE): This. + (DROPCAP): Renamed to... + (DC): This. + (TS, TE, EQ, EN): Provide default definitions. + (www-make-unique-name): Updated. + (HTML-IMAGE-INLINE): Fix typo. + * tmac/groff_www.man: Updated. + + * doc/Makefile (homepage.html): Add option -r to grohtml. + Use shortened image name. + * doc/groff.texinfo: Updated info on grohtml strings and macros. + * doc/homepage.ms: Updated and extended. + +2002-02-14 Werner LEMBERG + + Don't use `CSI 39 m' and `CSI 49 m' but `CSI 0 m'. + + * src/devices/grotty/tty.cc (SGR_DEFAULT_COLOR, + SGR_BACK_DEFAULT_COLOR): Replaced with ... + (tty_printer::put_color): Use it. + (ttr_printer::end_page): Simplify. + +2002-02-13 Werner LEMBERG + + * tmac/groff_tmac.man: Moved to... + * man/groff_tmac.man: This place. + * tmac/Makefile.sub, man/Makefile.sub: Updated. + +2002-02-12 Werner LEMBERG + + * src/libs/libgroff/Makefile.sub (snprintf.o): Don't use + $(COMPILE.c) to not include groff's assert.h. + + * src/drivers/grotty/tty.cc (main): Add GROFF_NO_SGR environment + variable. + * NEWS, src/drivers/grotty/grotty.man: Document it. + +2002-02-11 Werner LEMBERG + + * src/libs/snprintf/snprintf.c: Updated to latest version + (2002-02-11). + + * src/roff/grog/grog.pl (process): Fix handling of `.['. We now + test whether there is `.]' also. + Don't check for spaces after `.['. + * src/roff/grog/grog.sh: Do the same. + +2002-02-10 Werner LEMBERG + + Illegal -> Invalid. + + * src/libs/libgroff/illegal.cc: Renamed to ... + * src/libs/libgroff/invalid.cc: This. + (illegal_char_table): Renamed to ... + (invalid_char_table): This. + * src/libs/libgroff/Makefile.sub: Updated. + * win32-diffs: Updated. + + * doc/groff.texinfo, src/devices/grops/psrm.cc (ps_get_line), + src/libs/libdriver/input.cc (fatal_command, parse_color_command, + parse_x_command), src/libs/libgroff/font.cc (text_file::next, + font::load), src/preproc/eqn/main.cc (read_line, main), + src/preproc/eqn/lex.cc (file_input::read_line), + src/preproc/pic/lex.cc (file_input::read_line, + simple_file_input::get, simple_file_input::peek), + src/preproc/pic/main.cc (top_input::get, top_input::peek), + src/preproc/pic/pic.man, src/preproc/refer/main.cc + (input_stack::push_file), src/preproc/refer/refer.cc (do_file, + do_bib), src/preproc/tbl/main.cc (table_input::get), + src/preproc/grn/grn.man, src/preproc/grn/main.cc (interpret), + src/roff/troff/input.cc (file_iterator::fill, file_iterator::peek, + do_zero_width, read_request, encode_char, ps_get_line, + transparent_file, get_char_for_escape_name, transparent_translate, + asciify, input_char_description, read_string, set_string), + src/roff/troff/env.cc (environment::add_html_tag), + src/roff/troff/troff.man, tmac/e.tmac (`@(', `(f'): Do it. + + * src/include/lib.h: Updated. + + * src/preproc/eqn/eqn.cc: Removed. + + * NEWS: Updated. + + * src/preproc/grn/hdb.cc (DBRead): Fix fscanf() fields. + +2002-02-09 Werner LEMBERG + + * doc/gnu.xpm: New image. + * doc/Makefile (DOCS): Add homepage.ps. + Add rules for converting xpm->png and xpm->eps. + Use `gnu.{xpm,eps}' as image names. + * doc/homepage.ms: Updated. + +2002-02-09 Gaius Mulley + + * tmac/www.tmac (www-error): New macro, replacing calls to `@error'. + (IMAGE): Change image position parameters to `-L', `-R', and `-C'. + Remove calls to `B1' and `B2' + (PNG-IMAGE): New macro for inclusion of images in PNG format. + (www-left-ll-trap, www-left-po-trap, www-right-ll-trap): New + auxiliary variables for MARGIN-PNG-IMAGE. + (www-finish-left-po, www-finish-right-ll, www-finish-left-ll): New + auxiliary macros for MARGIN-PNG-IMAGE. + (MARGIN-PNG-IMAGE): New macro to put an image in PNG format into + the margin. + (www-heading-no): New auxiliary variable for HTML-H-{BEGIN,END}. + (HTML-H-BEGIN, HTML-H-END): New macros to begin and end a heading. + (DROPCAP): New macro to produce dropcap characters. + (www-do-image): Renamed back to... + (HTML-DO-IMAGE): This. + Updated all callers. + + * doc/Makefile (gnubw.eps): Updated. + * doc/homepage.ms: Updated. + +2002-02-08 Werner LEMBERG + + * doc/pic.ms: Fixed typos (\(*tx -> \*(tx). + Added `linethick' to table in section `Style Variables'. + +2002-02-08 Gaius Mulley + + * src/libs/libdriver/input.cc (get_extended_arg): Fix conditional. + +2002-02-07 Werner LEMBERG + + Adding options -C (compatibility mode) and -c (grotty's old output + scheme) to nroff. + + * src/roff/nroff/nroff.sh: Implement it. + Remove `-Wall'. + * NEWS, src/roff/nroff/nroff.man: Updated. + + * PROBLEMS: Document bison 1.32 bug. + + Some fixes to make groff compile on z/OS 1.2 UNIX (was OS/390). + + * src/roff/troff/node.cc (make_tfont): Define it earlier. + * src/roff/troff/div.h: Add prototype for `end_diversions'. + * src/roff/troff/input.cc: Add prototype for `process_input_stack'. + * src/roff/troff/env.h: Add prototype for `title'. + + Adding EBCDIC support to grotty. + + * src/devices/grotty/tty.cc (CSI): New macro. + (SGR_*, tty_printer::put_color): Use it. + +2002-02-06 Werner LEMBERG + + Implementing color support in grotty. The new switch -c activates + the old drawing scheme, disabling color at the same time. The new + switch `-i' selects italic instead of underlining (SGR only). + + * src/devices/grotty/tty.cc (putstring): New define instead of + `fputs'. Updated all callers. + (old_drawing_scheme): New global variable. + (COLOR_CHANGE): New enum value. + (SGR_*): New defines containing color handling escape sequences. + (TTY_MAX_COLORS, DEFAULT_COLOR_IDX): New defines. + (glyph): New members `back_color_idx' and `fore_color_idx'. + (glyph::order): Add COLOR_CHANGE. + (tty_printer): New members `cur_fore_idx', `curr_back_idx', + `is_underline', `is_bold', `cu_flag', `tty_colors'. + New methods `make_underline', `make_bold', `color_to_idx', + `change_color', `put_color'. + (cu_flag): Moved into `tty_printer' class. + (tty_printer::tty_printer): Initialize colors. + (tty_printer::add_char, tty_printer::set_char, tty_printer::special, + tty_printer::draw, tty_printer::end_page): Handle colors also. + (main): Add options `-c' and `-i'. + (usage): Updated. + * NEWS, src/devices/grotty/grotty.man: Updated. + + * src/include/errarg.h (errarg): Add support for `unsigned int'. + * src/libs/libgroff/errarg.c: Implement it. + + * src/include/printer.h (printer): Add `change_color' method + (currently used by grotty only). + * src/libs/libdriver/printer.cc: Implement it. + * src/libs/libdriver/input.cc (parse_D_command, do_file): Add + call to `pr->change_color'. + + * src/roff/troff/node.cc (troff_output_file::fill_color, + troff_output_file::glyph_color): Call `do_motion'. + + * tmac/tty.tmac: Add color definitions. + + * src/roff/groff/groff.man: Minor fixes. + +2002-02-05 Bernd Warken + + * src/libs/libdriver/input.cc: Introduce `EnvInt' typedef and use + it. This is a preparation for future changes. + +2002-02-05 Werner LEMBERG + + * src/roff/troff/input.cc (process_input_stack): Fix the case + where leading spaces are followed by \f or \s; previously, an + incorrect space width has been used. + + * doc/roff.man (quoted_char): Fix argument. + (comment): Define string. + +2002-02-04 Larry Kollar + + * doc/groff.texinfo: More fixes. + +2002-02-04 Werner LEMBERG + + * src/preproc/eqn/box.cc (output_string): Don't use \\*[...]. + * src/preproc/eqn/main.cc (do_file, inline_equation): Call + `restore_compatibility' before `output_string' -- the LINE_STRING + register now already contains proper switches from and to + compatibility mode. + + * man/groff_char.man: Add Euro symbol. + * man/groff_diff.man: Improve documentation of `.am1' and `.as1'. + * tmac/tty.tmac: Add `EUR' as replacement for `eu' and `Eu'. + * doc/groff.texinfo (Defstr*): Print strings with full syntax. + Other minor fixes. + + * doc/Makefile (.SUFFIXES, .texinfo.pdf, clean): Add support for + texinfo->pdf. + (.texinfo.html): Add support for texinfo->html. + +2002-02-03 Werner LEMBERG + + Added three new requests `ds1', `as1', and `ami'. The former two + are equivalent to `ds' and `as' with the difference that + compatibility mode is saved on entry, switched off during string + expansion, and restored on exit. The latter is the pendant to `dei' + for `am'. + + (do_define_string): Use `define_mode' and `calling mode'. + Insert COMPATIBLE_SAVE and COMPATIBLE_RESTORE at the beginning and + end of string, respectively. + (define_string, append_string): Use `calling_mode'. + (define_nocomp_string, append_nocomp_string, + define_string_indirect): New functions. + (init_input_requests): Updated. + * NEWS, man/groff_diff.man, man/groff.man: Document it. + + * src/preproc/eqn/box.cc (box::top_level, box::extra_space): Use + `as1' for assigning LINE_STRING (this is `10' usually). Sun's + mm macro package accesses this string register directly. + * src/preproc/eqn/main.cc (inline_equation): Use `as1'. + + * tmac/trace.tmac: Trace calls to `am' also. Make it work in + compatibility mode. + +2002-02-02 Larry Kollar + + * doc/groff.texinfo, tmac/groff_ms.man: More fixes. + +2002-01-31 Werner LEMBERG + + * tmac/an-old.tmac (I): Use \, and \/ to improve spacing. + +2002-01-31 Bernd Warken + + * src/devices/grolbp/lbp.cc (main): Delete `pr'. + * man/groff_out.man: Revised and updated. + +2002-01-30 Bernd Warken + + * src/libs/libdriver/input.cc [USE_ENV_STACK]: New macro to comment + out the unused `{' and `}' commands. Undefined by default. + (IntArray): Make `data' private. + (IntArray::operator[], IntArray::get_data, IntArray::len): Use these + new methods instead. + (skip_line_D, skip_to_end_of_line): New functions. + (get_D_fixed_args): Use `skip_line_D'. + Changed to handle dummy odd arguments by ... + (get_D_fixed_args_odd_dummy): This new function. + (get_D_variable_args): Split some code into ... + (get_possibly_integer_args): This new function. + (send_draw): Use more `const'. + (delete_current_env): New function. + (position_to_end_of_args): Use `size_t'. + Updated. + (send_draw): Updated. + (parse_D_command): Handle `c', `C', and `t' better. + Updated. + (do_file): Updated. + +2002-01-29 Werner LEMBERG + + * NEWS: Revised. + * doc/groff.texinfo: Introduce @Def...List, @Def...Item, and + @Def...ListEnd which replaces @Def...x. This is necessary to get + proper HTML output -- see the comment in the file for more + information. + Updated all calls. + +2002-01-29 Gaius Mulley + + Fixes to make color changes of 2002-01-21 work with grohtml. + + * src/devices/grohtml/post-html.cc (style): Updated. + (html_printer): Remove unused methods. + (html_printer::do_font, html_printer::draw, html_printer::set_char, + html_printer::special): Updated. + * src/devices/grohtml/html-text.cc (debugStack, turnDebug, + html_text::dump_stack_element, html_text::dump_stack) [DEBUGGING]: + Added some debugging code. + (html_text::start_tag): Updated. + (html_text::do_push): New method. + (html_text::push_para): Call it. + Add method for handling color. + (html_text::do_color): Updated. + (html_text::shutdown): Handle color. + * src/devices/grohtml/html-text.h (tag_definition): New member + `col'. + Updated. + +2002-01-28 Werner LEMBERG + + * tmac/ps.tmac, tmac/html.tmac: Fix compatibility mode issues. + +2002-01-27 Gaius Mulley + + Add two switches -a and -g to control the antialiasing bits for + text and graphics, respectively. + + * src/devices/grohtml/post-html.cc (main): Dummy code for `-a' and + `-g'. + * src/devices/grohtml/grohtml.man: Document them. + * src/preproc/html/pre-html.cc (MIN_ALPHA_BITS, MAX_ALPHA_BITS): + New macros. + (textAlphaBits, graphicAlphaBits, antiAlias): New global variables. + (setupAntiAlias): New function. + (createAllPages): Updated. + (scanArguments): Handle `-a' and `-g'. + (main): Call `setupAntiAlias'. + * NEWS: Updated. + +2002-01-27 Werner LEMBERG + + * doc/groff.texinfo (Def*): Call index function after deffn. + + * tmac/html.tmac: Call `nroff' request. + +2002-01-26 Larry Kollar + + * tmac/groff_ms.man: Add some omissions. + +2002-01-25 Larry Kollar + + * tmac/groff_ms.man: Typographical improvements. + +2002-01-25 Werner LEMBERG + + * doc/groff.texinfo: Updated version and copyright. + * src/devices/grops/grops.man: Updated. + + * tmac/groff_tmac.man: Fix `ig' macro. + + * tmac/an-old.tmac (ne): Redefine `ne' request to be a no-op in + nroff mode. + Use `.ne' unconditionally everywhere. + (TS): Only insert some vertical space. Doing a page break is no + longer necessary due to the redefinition of the `ne' request. + + * src/libs/libdriver/input.cc (parse_D_command): Don't emit a + warning for unknown subcommands but parse and pass them to the + device driver. + +2002-01-24 Werner LEMBERG + + * tmac/groff_www.man, NEWS: Fix typos. + +2002-01-21 Werner LEMBERG + + Complete revision of color support: + + Adapt programs to the new libdriver/input.cc. + + Color spaces are no longer converted to RGB but transferred as-is + in the troff intermediate output format. + + Handle default color gracefully. troff now supports a `default' + color (which can't be changed). + + grops will now use the proper color space functions if available. + + Update pic. + + Note that currently grohtml doesn't handle colors properly. This + has to be fixed. + + * src/libs/libgroff/itoa.c (UINT_DIGITS): New macro. + (ui_to_a): New function. + * src/include/lib.h: Updated. + + * src/include/color.h (color_scheme): Replace `NONE' with `DEFAULT'. + (color): Simplified; removed all `double' members and methods. + A new array `components' now holds the color parameters. + (color::is_default, color::get_components): New methods. + (color::operator==, color:operator!=): New. + (Red, Green, Blue, Cyan, Magenta, Yellow, Black, Gray): New macros + to make access to the `components' array more comprehensible. + * src/libs/libgroff/color.cc: Implement new color support. + (atoh): Small fixes. + (color::read_encoding): Simplified for new troff intermediate color + output format. + (default_color): New global variable. + + * src/roff/troff/input.cc (default_symbol): New global variable. + (lookup_color): Use it. + (default_black): Removed. + (do_glyph_color, do_fill_color): Simplified. + (define_color): Handle default color. + Improve warnings. + (do_if_request): Handle default color. + * src/roff/troff/env.cc (environment::environment): Initialize + colors with `default_color'. + * src/roff/troff/node.cc (troff_output_file::put): Add method + for `unsigned int'. + (troff_output_file::hex): Removed. + (troff_output_file::fill_color, troff_output_file::glyph_color): + Updated to include/color.h and libdriver/input.cc. + + * src/preproc/pic/object.cc (draw_arrow): New parameter to set + fill color properly (identically to the outline color). \D'f...' + doesn't work any more. + All function calls to it updated. + + * src/devices/grohtml/post-html.cc (html_printer::do_body, main): + Updated. + * src/devices/grohtml/html-text.cc (html_text::issue_color_begin): + Updated. + + * src/devices/grops/ps.cc (ps_output::put_color): New method. + (ps_printer::sbuf_color): Make a real member instead of pointer. + (ps_printer::fill_color, ps_printer::output_color): Removed. + (ps_printer::ps_printer): Updated. + (ps_printer::set_char): Ditto. + (ps_printer::set_color): Use various color schemes. + Use `put_color' method. + (ps_printer::flush_sbuf): Don't set color. + (ps_printer::fill_path): Take `environment' as parameter. + Simplify color handling. + (ps_printer::set_line_thickness): Renamed to ... + (ps_printer::set_line_thickness_and_color): This (and updated). + (ps_printer::set_color): Change second parameter from `complete' + to `fill' which better describes what it does. + (ps_printer::draw): Call `flush_sbuf' to output graphic commands + and text in the right order. + Updated. + Remove branches for `f' and `F'; this is handled by + libdriver/input.cc. + * src/devices/grops/ps.h: Updated. + * font/devps/prologue (FL): Redefined. + ({F,C}r,k,g: New color functions (with and without filling). + + * doc/pic.ms, src/preproc/pic/pic.man: Small fixes. + * man/groff_diff.man, man/groff.man, man/groff_out.man, + doc/groff.texinfo, NEWS: Updated. + +2002-01-20 Bernd Warken + + * src/libs/libdriver/input.cc: Completely rewritten. See comments + in this file for what has been changed. + +2002-01-19 Werner LEMBERG + + * test-groff: Fix GROFF_FONT_PATH. + * tmac/andoc.tmac: Add dummy macros for equation support -- eqnrc + is read before .TH or .Dd is parsed. + +2002-01-18 Gaius Mulley + + * src/libs/libgroff/geometry.cc (check_output_arc_limits): Fix + quadrant boundaries. + +2002-01-18 Werner LEMBERG + + * devices/grops/ps.cc: Aargh! Fix the fix of the incorrectly + applied last patch. + +2002-01-17 Ruslan Ermilov + + * tmac/doc.common: Initialize %I register for the %I macro to + avoid (harmless) warning. + * tmac/doc.tmac (Bd): There is no reason to enforce -compact + when in the SYNOPSIS section. + +2002-01-17 Bruno Haible + + * src/preproc/pic/lex.cc (get_token): Fix typo. + +2002-01-17 Werner LEMBERG + + * devices/grops/ps.cc: Fix incorrectly applied last patch. + +2002-01-17 Larry Kollar + + * tmac/groff_ms.man: Completely rewritten. + +2002-01-16 Werner LEMBERG + + * tmac/an-old.tmac (TS): Force break, inserting some vertical space. + +2002-01-15 Gaius Mulley + + * devices/grops/ps.cc (ps_printer::fill_path): Fix handling of + fill colors. + (ps_printer::draw): Ditto. + +2002-01-14 Ruslan Ermilov + + * tmac/groff_mdoc.man: Minor fixes. + +2002-01-13 Werner LEMBERG + + * man/groff_out.man: Some fixes. + +2002-01-13 Gaius Mulley + + * doc/pic.ms: Fix typos. + +2002-01-12 Werner LEMBERG + + * doc/groff.texinfo, doc/groff.man: More on a printable backslash. + +2002-01-10 Werner LEMBERG + + * font/devutf8/R.proto, font/devhtml/R.prot: Add `Eu' and `eu' + symbols. + * NEWS: Updated. + +2002-01-09 Bernd Warken + + * man/groff_out.man: Revised. + * man/roff.man: Minor fixes. + * src/roff/troff/troff.man: Some reordering. + +2002-01-09 Werner LEMBERG + + * tmac/an-old.tmac: Add dummy macros for equation support. + +2002-01-07 Werner LEMBERG + + doc/groff.texinfo: Fix documentation of glyph searching algorithm. + + * tmac/an-old.tmac: Revert change 2001-12-23. This breaks too many + man pages. + * tmac/groff_man.man: Small improvements. + +2002-01-07 Bernd Warken + + * man/groff_diff.man: Revised. + +2002-01-06 Werner LEMBERG + + * tmac/www.tmac: Remove extraneous backslash. + +2002-01-06 Bernd Warken + + * man/ditroff.man, src/roff/groff/groff.man, man/groff.man: Revised. + +2002-01-05 Werner LEMBERG + + Integrated groffer, contributed by Bernd Warken. + + * contrib/groffer/*: New. + * Makefile.in, NEWS: Updated. + +2002-01-04 Werner LEMBERG + + * doc/groff.texinfo: Added macros `@Defmpreg' and `@Defmpregx' for + registers defined in macro packages. + Revising the ms part. + +2002-01-04 Larry Kollar + + * doc/groff.texinfo: Add documentation for ms macros. + +2002-01-02 Werner LEMBERG + + First step in adding PS support for the Euro symbol. `eu' is the + official Euro logo, `Eu' is a font-specific glyph variant. + + * font/devps/text.enc: Add `Euro' at position 9. + * font/devps/generate/textmap: Add `Euro' as symbol `Eu'. + * font/devps/symbolmap: Regenerated. + + * NEWS: Updated. + +2002-01-02 Bernd Warken + + * man/roff.man: Revised. + +2002-01-01 Bernd Warken + + * src/roff/groff/groff.man: Completely rewritten. + +2001-12-31 Werner LEMBERG + + * doc/Makefile: Updated. + +2001-12-30 Werner LEMBERG + + * tmac/www.tmac: Make all names of internal macros/registers/strings + lowercase, and prepend `www-'. + Other minor changes. + * src/roff/troff/troff.man: Add preprocessor string at BOF. + +2001-12-30 Gaius Mulley + + Implement option `-b' in grohtml to set the HTML background colour. + + * src/devices/grohtml/post-html.cc (default_background): New global + variable. + (html_printer::html_printer): Initialize `background' to + `default_background'. + (main): Implement option `-b'. + (usage): Updated. + * src/preproc/html/pre-html.cc (scanArguments): Add dummy handling + of `-b' option. + * src/devices/grohtml/grohtml.man: Updated. + * doc/Makefile (.ms.html): Use `-b'. + * tmac/html.tmac: Don't set background color. + + Add new grohtml tag `.html-tl'. + + * src/devices/grohtml/post-html.cc (title_desc): Add `with_h1' + member variable. + (title_desc::title_desc): Updated. + (html_printer::troff_tag): Handle `.html-tl'. + (html_printer::write_title): Use `with_h1'. + * tmac/www.tmac (www-end-nowhere): New auxiliary macro. + (HTML-TL): New macro. + + Add support for unordered lists in HTML. + + * tmac/www.tmac (www-level): New auxiliary register. + (www-level1, www-level2, www-level3): New auxiliary strings. + (www-push-level, www-pop-level): New auxiliary macros + (UL-BEGIN, UL-END, LI): User macros for unordered lists. + + Miscellaneous. + + * src/preproc/html/pre-html.cc (DEFAULT_IMAGE_RES): Increase to 100. + (DEFAULT_VERTICAL_OFFSET): Removed. + (IMAGE_BOARDER_PIXELS): Set to 0. + (A4_LENGTH, A4_OFFSET, LETTER_LENGTH, LETTER_OFFSET): New macros. + (vertical_offset): Initialize with 0. + (gsPaper): New global variable. + (get_resolution): Scan for and return unsigned int. + (get_papersize): New function to get paper length from devps/DESC. + (determine_vertical_offset): New function. + (createAllPages): Produce gray-level images and use proper page + length. + (createImage): Use `-quiet' option of pnmcrop. + (addZ): Fix passing of `-Z'. + (scanArguments): Fix handling of `-o'. + (main): Call `determine_vertical_offset'. + * src/devices/grohtml/post-html.cc (html_printer::draw): Comment out + code for `l'. + + * src/libs/libgroff/tmpfile.cc (add_tmp_file): Fix buffer length. + * src/roff/troff/node.cc (troff_output_file::check_charinfo): Handle + glyph descenders properly. + + * doc/homepage.ms: Include `gnubw.eps'. + * doc/Makefile (gnubw.eps): New rule. + (homepage.html): Depend on `gnubw.eps'. + +2001-12-25 Werner LEMBERG + + * src/roff/troff/input.cc (default_black): Fix return value. + +2001-12-24 Ruslan Ermilov + + * tmac/doc-common (Dt): Change output of architecture strings. + Do some syntax cleanup. + * tmac/groff_mdoc.man: Updated. + +2001-12-23 Werner LEMBERG + + Adding an `itc' request (input line trap accepting \c). + + * src/roff/troff/env.h (environment): New member + `continued_input_trap'. + Make `do_input_trap' a friend function instead of `input_trap'. + * src/roff/troff/env.cc (environment::environment, + environment::copy): Updated. + (environment::newline): Implement it. + (do_input_trap): New function. + (input_trap): Call `do_input_trap'. + (input_trap_continued): New function. + (init_env_requests): Updated. + * src/roff/troff/TODO: Updated. + + * tmac/an-old.tmac (SH, SS, B, I, SM, SB, TP): Use `.itc' instead of + `.it'. + + * src/preproc/grn/hdb.cc (DBRead): Really chop after 127 characters. + +2001-12-22 Ruslan Ermilov + + * tmac/doc-common, tmac/doc-syms: Small updates. + +2001-12-22 Colin Watson + + * tmac/an-old.tmac (an-p-footer): Set title length in environment 1. + +2001-12-22 Bernd Warken + + * MANIFEST: New file. + +2001-12-22 Werner LEMBERG + + * src/preproc/grn/grn.man: Updated. + +2001-12-22 Solar Designer + + * src/preproc/grn/hdb.cc (MAXSTRING_S): New macro. + (DBRead): Use it. + +2001-12-19 Werner LEMBERG + + Implement a fallback character request `.fchar'. + + * src/roff/troff/charinfo.h (charinfo): New flag `fallback'. + (is_fallback): New inline function. + * src/roff/troff/input.cc (do_define_character): New function. + (define_character): Call `do_define_character'. + (define_fallback_character): New function. + (init_input_requests): Add `fchar'. + (charinfo::charinfo): Updated. + (charinfo::set_macro): New argument to set `fallback' flag. + * src/roff/troff/node.cc (make_glyph_node, make_node, + node::add_char): Check `fallback' flag. + * NEWS, man/groff_diff.man, man/groff_man: Updated. + +2001-12-16 Werner LEMBERG + + * groff.texinfo: Document exact search algorithm for glyphs. + +2001-12-15 Werner LEMBERG + + * Makefile.cpg, Makefile.ccpg, Makefile.man: Add dummy file to + the left side of $(MANPAGES) rule to make it always non-empty. + +2001-12-14 Werner LEMBERG + + * src/roff/troff/input.cc (default_black): Define default color + `black' if not yet defined. + +2001-12-13 Werner LEMBERG + + Implement new string-valued register `.fn' to return the current + real (internal) font name. + + * env.cc (environment::get_font_name_string): New function. + (init_env_requests): Add `.fn' register. + * env.h (environment): Updated. + * node.cc (font_info): Make `get_font_name' a friend. + (get_font_name): New function. + * node.h: Updated. + + * man/groff_diff.man, man/groff.man, NEWS: Updated. + +2001-12-12 Ralph Corderoy + + * src/preproc/eqn/main.cc (inline_equation): Fix typos. + +2001-12-12 Werner LEMBERG + + * tmac/groff_man.man, doc/groff.texinfo: There is no .R macro. + +2001-12-10 Gaius Mulley + + * man/groff_diff.man: Adding documentation for \O. + +2001-12-10 Werner LEMBERG + + * src/preproc/html/pre-html.cc (TROFF_COMMAND): Removed. + (scanArguments): Use PROG_PREFIX for the name of the troff binary. + +2001-12-09 Werner LEMBERG + + * man/roff.man: Revised. + * src/roff/groff/groff.man: Replace man page references with a + pointer to roff.man. + +2001-12-09 Bernd Warken + + * man/roff.man: Completely rewritten. + +2001-12-06 Ralph Corderoy + + * src/preproc/eqn/main.cc (inline_equation): Improve error message. + +2001-12-05 Werner LEMBERG + + * src/roff/troff/input.cc (get_delim_file_name): Removed since no + longer used. + * src/devices/grohtml/post-html.cc (html_printer::html_printer): Fix + order of initializers. + * NEWS: Updated. + +2001-12-05 Gaius Mulley + + * doc/groff.texinfo: Fix documentation of \O. + + * src/devices/grohtml/html-text.cc (html_text::do_indent, + html_text::do_table, html_text::do_emittext, html_text::do_para): + Use `const' for first argument. + (html_text::do_table): Use cast. + * src/devices/grohtml/html-text.h: Updated. + * src/devices/grohtml/output.cc (simple_output::put_string): Add + method for `const string &s'. + * src/devices/grohtml/html.h: Updated. + * src/devices/grohtml/post-html.cc (MAX_STRING_LENGTH): Removed. + (ANCHOR_TEMPLATE): Modified. + (manufacture_headings): New global variable to handle `-h' option. + (is_subsection): Removed. + (char_buffer::add_string): Add `const' to first argument. + Protect against invalid string argument. + Add method for `const string &s'. + (text_glob): Completely redesigned. + (page): Use `const' for strings and remove string length variable. + (page::add_html): Removed. + (page::add_end_encode): New member function. + (to_unicode): Moved upwards. + (title_desc, header_desc): Updated. + (header_desc::write_headings): Updated to new ANCHOR_TEMPLATE + definition. + (html_printer::is_bold, html_printer::make_bold): New member + functions. + (html_printer::end_of_line): Updated. + (generate_img_src, html_printer::do_auto_image, + html_printer::do_title, html_printer::write_header, + html_printer::determine_header_level, html_printer::do_heading, + html_printer::do_linelength, html_printer::do_pageoffset, + html_printer::do_indentation, html_printer::do_tempindent, + html_printer::do_indentedparagraph, html_printer::do_break, + html_printer::flush_sbuf, get_html_translation, + html_printer::begin_page, html_printer::special): Rewritten to get + rid of static string length limit. + (html_printer::troff_tag): Added `.no-auto-rule'. + (html_printer::flush_globs): Small fix. + (html_printer::determine_space): Don't compute `space_width'. + (html_printer::translate_to_html): Renamed to ... + (html_printer::emit_html): This (with updates). + (html_printer::write_header): Implement `-h' option. + (html_printer::draw): Remove commented-out code. Handle `F' + command. + (html_printer::add_char_to_sbuf): Removed. + (html_printer::add_to_sbuf): Rewritten. + (html_printer::sbuf_continuation): Fixed. + (html_printer::seen_backwards_escape, reverse, + html_printer::remove_last_char_from_sbuf): Removed. + (char_translate_to_html, str_translate_to_html): Removed. + (html_printer::overstrike): New function member. + (html_printer::set_char): Use it. + (html_printer::do_body): New function member. + (html_printer::~html_printer): Use it. + (main): Handle `-h' option. + (usage): Updated. + * src/devices/grohtml/grohtml.man: Document -h switch. + + * src/preproc/html/pre-html.cc: Include searchpath.h + Replace `POSTSCRIPTRES' macro with `postscriptRes' variable. + (get_resolution): New function. + (checkImageDir): Use `0777' permissions in mkdir() + (write_start_image): Rewritten to use `\O[5...]'. + (createImage, generateImages): Updated. + (main): Handle `F' and `h' options. + Use `get_resolution'. + + * src/roff/troff/input.cc (begin, end, image): Removed. + (do_suppress): Take parameter. + Handle modified syntax of `\O'. + (token::next): Updated. + (init_markup_requests): Removed. + (main): Updated. + + * src/roff/troff/div.h: Add declaration for begin_page(). + + * tmac/color-html.tmac: Removed. Contents moved to... + * tmac/html.tmac: Here. Set background color. + * tmac/color.tmac: Removed. Contents moved to... + * tmac/ps.tmac: Here. + * tmac/www.tmac: Remove the title command when generating images + for html. + (NO_AUTO_RULE): New macro. + (HTML_DO_IMAGE): Use revised `\O' escapes. + * tmac/Makefile.sub, tmac/groff_www.man, tmac/troffrc: Updated. + +2001-12-02 Werner LEMBERG + + * tmac/groff_mdoc.man: Fix typo. + +2001-12-01 Colin Watson + + * man/roff.man: Fix typo. + +2001-11-29 Werner LEMBERG + + * src/libs/libbib/map.c, src/utils/pfbtops/pfbtops.c: Include + stdlib.h. + + * src/roff/troff/input.cc (read_draw_node): Emit error message if + more than one argument to \D'f ...'. + + * tmac/Makefile.sub (NORMALFILES): Add lbp.tmac. + +2001-11-28 Werner LEMBERG + + * tmac/an-old.tmac, tmac/doc.tmac: Assure that the macro package is + loaded only once. + + * tmac/groff_man.man: Minor cosmetic fix. + +2001-11-27 Werner LEMBERG + + * src/roff/groff/groff.man, tmac/groff_tmac.man, + tmac/groff_www.man: s/mwww/www/. + +2001-11-26 Werner LEMBERG + + * aclocal.m4 (GROFF_MKSTEMP): Implement test using C++ linkage. + * configure: Regenerated. + * win32-diffs: Updated. + + * tmac/groff_mwww.tmac: Renamed to ... + * tmac/groff_www.tmac: This. + * tmac/mwww.tmac: Removed. + * NEWS, tmac/Makefile.sub: Updated. + +2001-11-21 Werner LEMBERG + + * doc/groff.texinfo: Improve documentation of the `\v' escape. + Fix explanation of `\D' and `rt'. + +2001-11-20 Werner LEMBERG + + * tmac/an-old.tmac (an-header): Set header length equal to page + width. + * doc/groff.texinfo: Improve documentation of `ne' request. Other + minor fixes. + * NEWS: Small fix. + +2001-11-19 Werner LEMBERG + + * NEWS, man/Makefile.sub: Updated. + +2001-11-19 Bernd Warken + + * man/ditroff.man: New file. + +2001-11-17 Werner LEMBERG + + * man/groff_differences.man: Renamed to ... + * man/groff_diff.man: This. Updated. + * man/Makefile.sub, src/roff/troff/troff.man, NEWS: Updated. + + * src/preproc/html/pushbackbuffer.cc: Renamed to ... + * src/preproc/html/pushback.cc: This. Updated. + * src/preproc/html/pushbackbuffer.h: Renamed to ... + * src/preproc/html/pushback.h: This. + * src/preproc/html/Makefile.sub, src/preproc/html/pre-html.cc: + Updated. + + * src/libs/libgroff/htmlindicate.cc: Renamed to ... + * src/libs/libgroff/htmlhint.cc: This. + * src/libs/libgroff/Makefile.sub: Updated. + + * tmac/an-old.tmac (an-end): Fix page length. + +2001-11-16 Werner LEMBERG + + * NEWS, man/groff_differences.man, doc/groff.texinfo: Updated. + * man/Makefile.sub: Include groff_differences.man. + * VERSION: Set to 1.18. + * REVISION: Set to 0. + +2001-11-16 Bernd Warken + + * src/roff/troff/input.cc (do_define_macro): Allow whitespace before + the second dot (or ending macro name) to end a macro. + * doc/groff.texinfo: Doc fix. + +2001-11-16 Ruslan Ermilov + + * tmac/doc-common (doc-header): Handle very long document titles + better. + +2001-11-16 Werner LEMBERG + + * tmac/doc.tmac (doc-do-Bl-args): Fix .substring requests. + +2001-11-15 Werner LEMBERG + + * src/roff/troff/troff.man: Revised and split into troff.man and... + * man/groff_differences.man: New file. + * NEWS: Updated. + +2001-11-13 Werner LEMBERG + + * tmac/an-old.tmac (TS, TE): New macros for table support. + +2001-11-12 Werner LEMBERG + + * src/include/lib.h: Provide a fix for emx to not include + groff-getopt.h. + +2001-10-27 Werner LEMBERG + + * src/roff/troff/input.cc (substring_macro): Fix computation of + boundary values. + +2001-10-20 Werner LEMBERG + + Undo change from 2001-08-28. + + * src/roff/troff/input.cc (have_input): New global variable. + (token::next): Set `have_input' for \f, \H, \R, \s, and \S if not + in compatibility mode. + (process_input_stack): Use it. + +2001-10-19 Ruslan Ermilov + + * tmac/doc.tmac (doc-flag-recursion): Protect arguments against + being handled as end-of-sentence characters, + +2001-10-10 Gaius Mulley + + * src/roff/troff/input.cc (file_iterator): New members + `suppress_newline_flag' and `seen_escape'. + (file_iterator::next_file): Updated. + (file_iterator::fill): Use it. + (string_iterator): New member `suppress_newline_flag'. + (string_iterator::fill): Set it. + (get_color_element): Use MAX_COLOR_VAL. + * src/roff/troff/env.cc (environment): Remove `need_eol'. + (no_fill): Don't set `env->ignore_next_eol'. + (environment::newline): Handle `eol' tag properly. + Emit `eol.ce'. + (environment::add_html_tag): Set `env->ignore_next_eol'. + Don't handle `.ce'. + * src/roff/troff/env.h (environment): Updated. + + * src/devices/grohtml/post-html.cc (text_glob::is_eol_ce): New + member function. + (html_printer::outstanding_eol): New member function. + (html_printer::do_title): Use new functions. + (html_printer::troff_tag): Test `id_eol_ce'. + +2001-10-10 Werner LEMBERG + + * tmac/color.tmac, tmac/color-html.tmac: Use `.do' to make those + files work with -C also. + +2001-10-05 Werner LEMBERG + + * doc/pic.ms: Minor fix. + * src/preproc/html/pre-html.cc (scanArguments): Don't handle `-?' + as a valid command line switch. + * src/devices/grohtml/post-html.cc (main): Ditto. + (usage): Updated. + * src/devices/grohtml/grohtml.man: Updated. + * src/roff/groff/groff.cc (main): Pass `-v' to predriver also. + +2001-10-04 Werner LEMBERG + + Implementing color support in troff, pic, grops, and grohtml. These + changes are based on a major patch provided by Gaius Mulley + . + + New request: `defcolor', supporting rgb, cmy, cmyk, and gray + definitions with both hex values and fractions. + + New escapes: \m and \M for drawing and background color, + respectively. This corresponds to the troff output commands `m' + and `DF'. + + groff and troff accept command line switch `-c' to disable color + output (which is automatically disabled in compatibility mode). + + New scaling indicator `f' for fractions (1f = 65536u). + + New conditional operator `m' to test for defined colors with `if' + and `ie'. + + New keywords `color' (or `colour', `colored', `coloured'), `outline' + (or `outlined'), and `shaded' added to pic. + + * src/include/color.h: New file. + * src/include/driver.h: Include it. + * src/include/printer.h: Include color.h. + (environment): New members `col' and `fill'. + (printer): Remove `adjust_arc_center' member function. + * src/include/Makefile.sub: Updated. + + * src/libs/libdriver/input.cc (do_file): Initialize `env.col' and + `env.fill'. + Handle `m' and `DF' troff commands. + * src/libs/libgroff/color.cc: New file. + * src/libs/libgroff/Makefile.sub: Updated. + + * src/preproc/html/pre-html.cc (IMAGE_BORDER_PIXELS): Set to 2. + (stop): Removed. + (createImage): Fix computation of `y2'. + Use `pnmcrop' also. + (buffer::write_file_html): Remove calls to `stop'. + + * src/preproc/pic/common.h (common_output): New abstract function + members `set_color', `reset_color', `get_last_filled', and + `get_outline_color'. + * src/preproc/pic/object.h: Add `IS_SHADED' and `IS_OUTLINED'. + (object_spec): Add members `shaded' and `outlined'. + * src/preproc/pic/output.h (output): `command' is now abstract. + New function members `set_color', `reset_color', `get_last_filled', + and `get_outline_color'. + * src/preproc/pic/lex.cc (lookup_keyword): Recognize `colo[u]r[ed]', + `outline[d]', and `shaded'. + * src/preproc/pic/object.cc (output::command): Removed. + (output::set_location): Moved to output.h. + (graphic_object): Add protected members `outline_color' and + `color_fill'. + Add member functions `set_outline_color', `get_outline_color', and + `set_fill_color'. + (closed_object): Add member function `set_fill_color'. + Add member `color_fill'. + (graphic_object::print_text): Use `out->set_color' and + `out->reset_color'. + (box_object::print, ellipse_object::print, circle_object::print, + line_object::print, spline_object::print, arc_object::print): Ditto. + (object_spec::make_object): Implement `IS_OUTLINED' and `IS_SHADED'. + * src/preproc/pic/pic.y: Add tokens `COLORED', `OUTLINED', and + `SHADED', making them `%left'. + Add rules `object_spec [SHADED|COLORED|OUTLINED] text'. + * src/preproc/pic/tex.cc (tex_output): New dummy function members + `set_color', `reset_color', `get_last_filled', and + `get_outline_color'. + * src/preproc/pic/troff.cc (simple_output): New abstract function + members `set_color', `reset_color', and `get_last_filled'. + (simple_output::polygon, simple_output::circle, + simple_output::ellipse): Use `get_last_filled'. + (troff_output): New members `last_filled' and `last_outlined'. + New function members `set_color', `reset_color', `get_last_filled', + and `get_outline_color'. + (troff_output::finish_picture): Use `reset_color'. + (troff_output::set_fill): Test `last_filled'. + * src/preproc/pic/pic.man: Updated. + + * src/roff/groff/groff.cc (main): Implement `-c' option. + (synopsis, help): Updated. + src/roff/groff/groff.man: Updated. + + * src/roff/troff/troff.h: Include color.h. + (warning_type): Add WARN_COLOR. + * src/roff/troff/env.h (environment): New members + `{cur,prev}_{glyph,fill}_color'. + New member functions `get_{prev_,}{glyph,fill}_color'. + * src/roff/troff/env.cc: Initialize and implement them. + * src/roff/troff/input.cc: New global variable `disable_color_flag'. + Replace `NULL' with `0' everywhere for consistency. + (lookup_color, default_black, do_glyph_color, do_fill_color, + get_color_element, read_rgb, read_cmy, read_cmyk, read_gray, + define_color): New functions. + (token::next): Implement \M and \m escapes. + (do_if_request): Implement `m' operator. + (usage): Updated. + (main): Implement `-c' option. + (init_markup_requests): Add `defcolor' request. + (warning_table): Add `color' warning. + * src/roff/troff/node.h (glyph_color_node, fill_color_node): New + classes. + * src/roff/troff/node.cc (troff_output_file): New members + `current_{page,glyph}color'. New member functions `put_hex', + `glyph_color', and `fill_color'. + (glyph_color_node::*, fill_color_node::*): Implement it. + * src/roff/troff/number.cc (SCALE_INDICATOR_CHARS): Add `f'. + (parse_term): Add support for `f'. + * src/roff/troff/troff.man: Updated. + + * src/devices/grodvi/dvi.cc (draw_dvi_printer::draw): Add dummy + entry for `F'. + * src/devices/grolbp/lbp.cc (lbp_printer::draw): Ditto. + * src/devices/grolj4/lj4.cc (lj4_printer::draw): Ditto. + + * src/devices/grohtml/html-text.h (HTML_TAG): Add COLOR_TAG. + (tag_definition): Use `void *' for arg1. + (html_text): New member functions `do_color' and `done_color'. + Use `void *' for second parameter of `push_para' member function. + New `push_para' member function with a single parameter. + Use `char *' for parameter of `issue_table_begin' member funtion. + New `issue_color_begin' member function. + * src/devices/grohtml/html-text.cc (html_text::end_tag): Handle + COLOR_TAG. + (html_text::issue_color_begin): New function. + (html_text::issue_table_begin): Use `char *' for parameter. + (html_text::start_tag, html_text::shutdown, + html_text::check_emit_text): Updated. + (html_text::push_para): Use `void *' for second parameter. + Add same function with only one parameter. + (html_text::do_*): Updated. + (html_text::do_color, html_text::done_color): New functions. + * src/devices/grohtml/post-html.cc (style): New member `col'. + Mew member `style' with 6 parameters. + (style::style, style::operator==): Updated. + (html_printer::do_font): Use it. + (html_printer::draw): Add dummy entry for `F'. + (html_printer::set_char): Updated. + * src/devices/grohtml/grohtml.man: Updated. + + * src/devices/grops/ps.cc (ps_output::put_float): Use `%g' to have + trailing zeroes removed. + (ps_printer): New members `sbuf_color', `fill_color', and + `output_color'. + Removed member `fill'. + New member function `set_color'. + (ps_printer::ps_printer, ps_printer::set_char): Updated. + (ps_printer::flush_sbuf, ps_printer::set_line_thickness, + ps_printer::fill_path, ps_printer::draw): Use `set_color'. + + * tmac/color-html.tmac, tmac/color.tmac: New files. + * tmac/troffrc: Include them. + * tmac/www.tmac (URL, FTP, MAILTO): Use blue color. + * tmac/Makefile.sub: Updated. + + * NEWS, doc/groff.texinfo, doc/pic.ms, man/groff_out.man, + man/groff.man: Updated. + * font/devps/prologue.ps: Define FC and CO functions. + +2001-10-04 Gaius Mulley + + Fix incorrect cropping of images and incorrect handling of special + characters. Fix handling of file names in \O. + + * src/include/geometry.h: New file. + * src/libs/libgroff/geometry.cc: New file. + * src/libs/libdriver/printer.cc (printer::adjust_arc_center): Moved + to `geometry.cc'. + * src/roff/troff/input.cc (get_delim_file_name): Fixed problem with + initial spaces. + (do_suppress): Updated. + * src/roff/troff/node.cc: Include geometry.h. + (troff_output_file::flush_tbuf): Fixed parameters to + `check_output_limits'. + (troff_output_file::check_charinfo): Ditto. + (troff_output_file::determine_line_limits): Add support for `Da' + and `Dl' commands. + + * src/devices/grohtml/post-html.cc (str_translate_to_html): + Add new parameter `is_special' to decode special characters from + escape sequences. + (html_printer::do_title, html_printer::do_heading, + html_printer::do_indentedparagraph, + html_printer::translate_to_html, html_printer::special): Updated. + +2001-10-03 Werner LEMBERG + + * Makefile.sub (DISTCLEANFILES): Add stamp-h. + Fix entry for config.h. + * test-groff (GROFF_BIN_PATH): Add $builddir/roff/groff. + * tmac/troffrc: Translate nonbreakable space character to `\~'. + * src/preproc/eqn/eqn.man: Document -d command line option. + +2001-09-27 Werner LEMBERG + + * man/groff.man: Use + + .ev xxx + .na + .nh + + .ev + + instead of the old code (`.ad .hy' after the table) to suppress + incorrect hyphenation for grohtml output. + +2001-09-22 Werner LEMBERG + + * man/groff_font.man, man/groff_out.man: Minor fixes. + +2001-09-20 Werner LEMBERG + + * PROBLEMS: Updated, reordered. Improved EPS section (thanks to + Arnold Robbins ). + +2001-09-09 Werner LEMBERG + + * configure: Regenerated with autoconf 2.52. + + * doc/groff.texinfo: Complete revision of indices. + +2001-09-07 Werner LEMBERG + + * doc/Makefile (clean): Updated to delete all indices. + +2001-09-05 Werner LEMBERG + + * src/roff/troff/troff.man: Remove superfluous line. + + * tmac/s.tmac: Enable all warnings only if no -W or -w option is + given on the command line (or rather, if only the default warnings + are set). + +2001-09-03 Werner LEMBERG + + * man/groff.man, src/preproc/eqn/eqn.man, tmac/groff_mdoc.man: Don't + use .ne for TTY devices. + +2001-08-31 Werner LEMBERG + + * src/roff/troff/token.h, src/roff/troff/input.cc: + s/TOKEN_TRANSPARENT_ESCAPE/TOKEN_OPAQUE_ESCAPE/. + +2001-08-28 Werner LEMBERG + + * src/roff/troff/token.h (token_type): Add TOKEN_TRANSPARENT_ESCAPE. + * src/roff/troff/input.cc (token::next): Return + TOKEN_TRANSPARENT_ESCAPE for \f, \H, \R, \s, and \S if not in + compatibility mode. + (token::description): Updated. + (process_input_stack): Reset `bol' for TOKEN_TRANSPARENT_ESCAPE. + (token::add_to_node_list, token::process): Ignore + TOKEN_TRANSPARENT_ESCAPE. + +2001-08-27 Werner LEMBERG + + * tmac/an-old.tmac: Fix `S' string. + +2001-08-26 Werner LEMBERG + + * src/roff/troff/troff.man: Don't use .ne for TTY devices. + +2001-08-25 Werner LEMBERG + + * doc/pic.ms: Replace `\\' with `\e' (and fixing some single + backslashes). + Many other minor fixes. + + * configure.ac: Add message at end to inform how to compile + xditview. + * configure: Regenerated. + +2001-08-24 Werner LEMBERG + + * src/include/getopt.h, src/libs/libgroff/{getopt.c, getopt1.c}: + Updated to latest version of libc. + +2001-08-23 Werner LEMBERG + + * configure.ac: Don't create subdirectories before AC_CONFIG_FILES. + Autoconf 2.50 and newer can handle this. + * configure: Regenerated. + +2001-08-21 Werner LEMBERG + + * doc/pic.ms: Fix typo. + * src/preproc/tbl/tbl.man: Document case of global options. + +2001-08-21 Gaius Mulley + + * src/devices/grohtml/post-html.cc (html_printer::end_font): Fix + handling of `CR' font. + +2001-08-20 Werner LEMBERG + + Use a config.h file. + + * src/include/lib.h: Include config.h. + * All C files: Ditto (if necessary). + * All C++ source and header files: Include lib.h first (if + necessary). + + * src/include/config.hin: New file (autogenerated by autoheader). + * stamp-h.in: New file. + * configure.ac: Updated. + * aclocal.m4: Add third parameters to AC_DEFINE macros. + (GROFF_ARRAY_DELETE): Simplified. + * Makefile.sub (DISTCLEANFILES): Updated. + Added targets for remaking config.status, config.hin, config.h, + stamp-h.in, and stamp-h. + * configure: Regenerated. + +2001-08-19 Werner LEMBERG + + * NEWS: Updated. + +2001-08-18 Sebastian Krahmer + + * src/preproc/pic/pic.y (format_number): Use do_sprintf(). + (do_sprintf): Use snprintf(). + +2001-08-18 Werner LEMBERG + + * src/libs/snprintf/*: Added an snprintf module written by Mark + Martinec. + * src/libs/libgroff/Makefile.sub: Updated. + * configure.ac: Add test for snprintf(). + * Makefile.in: Updated. + * configure: Regenerated. + + * src/preproc/html/pre-html.cc (make_message): Reactivate code which + uses snprintf(). + +2001-08-14 Ruslan Ermilov + + * tmac/doc.tmac (Ex): New implementation. + * tmac/doc-common, tmac/groff_tmac.man: Updated. + +2001-08-13 Ruslan Ermilov + + * tmac/doc.tmac (Rv): Implement support for 0 or more than 1 + argument. + * tmac/groff_tmac.man: Updated. + +2001-08-13 Werner LEMBERG + + * src/preproc/tbl/tbl.man: Minor documentation update. + +2001-08-13 John David Anglin + + * src/libs/libgroff/tmpname.cc: Add prototype for gettimeofday(). + * configure.ac: Add declaration test for gettimeofday(). + * Makefile.in: Document NEED_DECLARATION_GETTIMEOFDAY defines. + * aclocal.m4: Include sys/time.h for gettimeofday declaration test. + * configure: Regenerated. + +2001-08-11 Werner LEMBERG + + * aclocal.m4 (GROFF_MKSTEMP): Define HAVE_MKSTEMP. + * configure.ac: Add declaration test for strcasecmp(). + * Makefile.in: Updated. + * configure: Regenerated. + * src/include/lib.h [!HAVE_MKSTEMP]: Add prototype for mkstemp() -- + this is necessary because groff's mkstemp.cc is C++. + Add declaration conditionally for strcasecmp(). + +2001-08-10 Werner LEMBERG + + Integrated pic2graph, contributed by Eric S. Raymond. + + * contrib/pic2graph/{Makefile.sub, pic2graph.sh, pic2graph.man}: New + files. + * Makefile.in, NEWS: Updated. + + * src/preproc/tbl/tbl.man: Revised. + +2001-08-09 Eric S. Raymond + + * src/preproc/tbl/tbl.man: Extended to cover all tbl features. + +2001-08-09 Werner LEMBERG + + * src/preproc/tbl/main.cc (process_data): Fix recognition of .lf + requests. + +2001-08-08 Paul Eggert + + * Makefile.sub (configure): Depend on configure.ac, not + configure.in. + * INSTALL.gen: Upgrade to autoconf 2.52's INSTALL. + +2001-08-07 Werner LEMBERG + + * src/utils/afmtodit/afmtodit.man, src/roff/groff/groff.man: Minor + fixes. + +2001-08-06 Werner LEMBERG + + * src/roff/troff/troff.man: Improve documentation of -E option. + +2001-07-28 Ralph Corderoy + + * src/preproc/html/pushbackbuffer.cc (pushBackBuffer::readNumber): + Simplified. + +2001-07-27 Werner LEMBERG + + * src/preproc/refer/refer.cc: Undo last change. + * src/devices/grohtml/post-html.cc: Ditto. + +2001-07-26 Werner LEMBERG + + * src/preproc/refer/refer.cc: Include `lib.h'. + * src/devices/grohtml/post-html.cc: Ditto. + +2001-07-25 Gaius Mulley + + * aclocal.m4 (GROFF_PAGE): Add `AC_DEFINE(PAGEA4)'. + * src/preproc/html/pre-html.cc: Use it for DEFAULT_VERTICAL_OFFSET. + * Makefile.in: Comment updated. + * configure: Regenerated. + +2001-07-25 Werner LEMBERG + + * src/preproc/pic/pic.cc: Removed. + * src/preproc/pic/pic_tab.h: Removed. + * src/preproc/refer/label.cc: Removed. + + * doc/Makefile (.ms.html): Don't use a file name extension in + argument to grohtml's -I option. + * Makefile.in (dist): Remove CVS directories. + Call `distfiles' target. + + * src/devices/grohtml/grohtml.man: Add information about valid + versions of pnmtopng. + * src/preproc/html/pre-html.cc (TRANSPARENT): Use `white' as colour + name instead of number. + +2001-07-24 Werner LEMBERG + + * doc/groff.texinfo: Minor fixes. + +2001-07-21 Gaius Mulley + + * doc/Makefile (.ms.html): Put image files into a subdirectory. + (clean): Updated. + +2001-07-20 Werner LEMBERG + + * src/libs/libgroff/tmpname.cc: New file, defining get_tempname(). + * src/libs/libgroff/mkstemp.cc: New file. + * src/libs/libgroff/mksdir.cc: New file. + * src/libs/libgroff/tmpfile.cc [HAVE_MKSTEMP_PROTO]: Removed. + (xtmpfile) [!HAVE_MKSTEMP]: Removed. + * src/libs/libgroff/Makefile.sub: Updated. + * src/include/lib.h: Add mksdir() prototype. + * src/include/posix.h: Define S_IXUSR if not yet defined. + + * src/preproc/html/pre-html.cc (MAX_RETRIES): Removed. + (createAllPages): Use mksdir() instead of current code. + * src/utils/indxbib/indxbib.cc [HAVE_MKSTEMP_PROTO]: Removed. + (main): [!HAVE_MKSTEMP]: Removed. + + * aclocal.m4 (GROFF_MKSTEMP): Updated to use new mkstemp.cc file. + (GROFF_INTTYPES_H, GROFF_UNSIGNED_LONG_LONG, GROFF_UINTMAX_T): New + macros. + * configure.ac: Add tests for stdint.h, sys/time.h, and + gettimeofday(). + Call new GROFF_xxx macros. + * configure: Regenerated. + * Makefile.in: Comments updated. + +2001-07-20 Gaius Mulley + + * src/preproc/html/pre-html.cc (scanArguments): Use getopt_long() + instead of current code. + * src/devices/grohtml/post-html.cc (main): Handle `-d' option. + * src/roff/groff/groff.cc (possible_command::insert_args): New + function. + (main): Use it for predriver handling instead of insert_arg(). + +2001-07-19 Werner LEMBERG + + * doc/Makefile: Added GROFF_BIN_PATH to make it work with uninstalled + groff also. + + * src/include/posix.h: Define S_IWUSR if not yet defined. + +2001-07-18 Werner LEMBERG + + * NEWS: Updated. + +2001-07-18 Ruslan Ermilov + + * tmac/groff_mdoc.man: Document new -width and -column syntax. + Some other minor fixes. + * tmac/an-old.tmac: Add `AT' and `UC' macros. + +2001-07-17 Gaius Mulley + + Replace call to `troff' with `groff -Z' to make it aware of + GROFF_BIN_PATH. + + * src/preproc/html/pre-html.cc (TROFF_COMMAND): New macro. + (troff_command, command_prefix): Removed. + (alterDeviceTo): Use groff. + (addZ): New function. + (char_buffer::do_html): Use it. + (scanArguments): Use TROFF_COMMAND. + (findPrefix): Removed. + (main): Updated. + * src/roff/groff/groff.cc (main): Handle zflag for preprocessors. + +2001-07-17 Eric S. Raymond + + * doc/pic.ms: Documentation fixes. + +2001-07-17 Werner LEMBERG + + Replace atexit() with global destructor. + + * src/libs/libgroff/tmpfile.cc (xtmpfile_list): Add constructor. + (xtmpfile_list_init): New global structure to deallocate + xtmpfile_list on exit. Its destructor inherits most code from + remove_tmp_files(). + (remove_tmp_files): Deleted. + (add_tmp_file): Simplified. + +2001-07-16 Werner LEMBERG + + Replace strdup() with strsave(). + + * src/devices/grolbp/lbp.cc [!HAVE_STRDUP]: Removed. + (set_papersize): Use strsave() and a_delete. + (main): Use strsave(). + * src/preproc/html/pre-html.cc (make_message, createAllPages, + removeAllPages): Use strsave() and a_delete. + + * configure.ac: Remove test for strdup. + * Makefile.in: Comment updated. + * configure: Regenerated. + +2001-07-15 Werner LEMBERG + + * win32-diffs: Updated. + +2001-07-14 Werner LEMBERG + + * src/preproc/html/pre-html.cc (makeTempFiles): Activate new code, + removing the old one. + * src/utils/indxbib/indxbib.cc (main): Remove compiler warning. + +2001-07-14 Ralph Corderoy + + * src/libs/libgroff/tmpfile.cc (xtmpfile): Fix guard for `namep'. + +2001-07-12 Ruslan Ermilov + + Merge -xwidth into -width. Add -xwidth functionality to -column + also. + + * tmac/doc.tmac (Bl): Add dummy doc-typeXXX and doc-spaceXXX to + avoid warning. + (doc-do-Bl-args): Merge -xwidth code with -width. Test whether + string immediately following a leading dot starts with a valid mdoc + argument. + Add similar code to the -column branch. + (doc-Bl-usage): Updated. + * groff_mdoc.man: s/-xwidth/-width/. + +2001-07-12 Gaius Mulley + + * src/devices/grohtml/post-html.cc (text_glob::is_br): Stop titles + running into centered or non-formatted text. + +2001-07-11 Werner LEMBERG + + Introduce short and long prefixes to have the selection at run-time + whether there is a 8+3 limit for names of temporary files. + + * src/libs/libgroff/tmpfile.cc (TMPFILE_PREFIX): Replaced with... + (TMPFILE_PREFIX_SHORT, TMPFILE_PREFIX_LONG): This. + (tmpfile_prefix, tmpfile_prefix_len, use_short_prefix): New + variables. + (temp_init): New global structure to initialize above three + variables. + (xtmptemplate): Use two parameters for long and short prefix. + Simplify code use above three variables. + (xtmpfile): Use long and short prefixes as parameters. + * src/include/lib.h: Updated. + + * src/preproc/html/pre-html.cc ({PAGE,PS,REGION}_TEMPLATE): Replace + with ... + ({PAGE,PS,REGION}_TEMPLATE_{SHORT,LONG}): This. + (createAllPages, makeTempFiles): Updated. + +2001-07-09 Werner LEMBERG + + * REVISION: Increased to 3. + +Version 1.17.2 released +======================= + 2001-07-07 Werner LEMBERG * src/utils/indxbib/indxbib.cc (main): Change type of `name_max' @@ -190,10 +3980,6 @@ Version 1.17.1 released * src/roff/troff/input.cc (read_size): Fix special case `\s0'. -2001-05-16 Bruce Lilly - - * contrib/mm/m.tmac (TH): Fix incorrect error message. - 2001-05-16 Werner LEMBERG * src/roff/troff/input.cc (read_size): Emit warning if value becomes @@ -469,8 +4255,8 @@ Version 1.17 released * src/devices/grohtml-old/*: Removed. * font/devhtml-old/*: Removed. - * src/libgroff/htmlindicate.cc (graphic_start, graphic_end): Remove - comments. + * src/libs/libgroff/htmlindicate.cc (graphic_start, graphic_end): + Remove comments. * Makefile.in (CCPROGDIRS, DEVDIRS): Updated. * test-groff (PATH): Updated. * tmac/Makefile.sub (NORMALFILES): Updated. @@ -482,11 +4268,11 @@ Version 1.17 released * tmac/www.tmac: Remove special code for html-old device. Replace `html-or-html-old' register with `www-html'. - * src/libgroff/tmpfile.cc (remove_tmp_files), - src/libgroff/htmlindicate.cc (graphic_end), include/htmlindicate.h, - src/preproc/grn/*.cc, src/roff/groff/env.{cc,h}: Remove `void' - parameter if used as a single argument for consistency with rest of - source code. + * src/libs/libgroff/tmpfile.cc (remove_tmp_files), + src/libs/libgroff/htmlindicate.cc (graphic_end), + include/htmlindicate.h, src/preproc/grn/*.cc, + src/roff/groff/env.{cc,h}: Remove `void' parameter if used as a + single argument for consistency with rest of source code. * aclocal.m4, tmac/an-old.tmac: Fix copyright. @@ -548,10 +4334,6 @@ Version 1.17 released * src/devices/grohtml/html-text.cc (issue_table_begin): Set `frame=void', not `frame=none'. Add `border=0'. -2001-04-12 Ruslan Ermilov - - * contrib/mm/groff_mm.man: Fixing some typos. - 2001-04-12 Werner LEMBERG * PROBLEMS: Add some words on how to avoid wrapper macros. @@ -1599,10 +5381,10 @@ Version 1.17 released files. Add home directory to unsafe path for consistency. Don't include the home directory in the font path. - * src/lib/libgroff/macropath.cc: Add `config_macro_path', change + * src/libs/libgroff/macropath.cc: Add `config_macro_path', change `macro_path'. * src/include/macropath.h: Add `config_macrp_path'. - * src/lib/libgroff/fontfile.cc: Fix font path. + * src/libs/libgroff/fontfile.cc: Fix font path. * src/roff/troff/input.cc (process_startup_file): Use `config_macro_path'. (main): Select unsafe path if -U is given. @@ -1758,8 +5540,8 @@ Version 1.17 released * configure.in: Fix typo in comment. * configure: Regenerated. - * src/libgroff/*, src/include/*, src/roff/troff/*: Fixing copyright - dates. + * src/libs/libgroff/*, src/include/*, src/roff/troff/*: Fixing + copyright dates. 2000-11-08 Werner LEMBERG @@ -2035,11 +5817,6 @@ Version 1.17 released * src/roff/troff/TODO: Updated. -2000-08-28 Bruno Haible - - * contrib/mm/Makefile.sub: New target 'all', makes all prerequisites - of 'install'. - 2000-08-25 Werner LEMBERG * doc/groff.texinfo: Fix comment how to compile the DVI file. @@ -2336,7 +6113,7 @@ Version 1.16.1 released (search_path::open_file): Use IS_ABSOLUTE, PATH_SEP and DIR_SEPS, to support non-Posix systems. - * src/libc/libbib/search.cc: #include nonposix.h. + * src/libs/libbib/search.cc: #include nonposix.h. (search_list::add_file): Open the file in binary mode. * src/libs/libbib/linear.cc: #include nonposix.h. @@ -2401,7 +6178,7 @@ Version 1.16.1 released src/roff/groff/groff.cc: Use it. * Makefile.in, configure: Updated. -2000-06-07 Paco Andres Verdu +2000-06-07 Paco Andrés Verdú * src/devides/grolbp/lbp.h: Removed unused variables. @@ -2895,7 +6672,7 @@ Version 1.16 released * src/roff/grog/grog.man: Updated copyright date. -2000-03-14 Francisco Andres Verdu +2000-03-14 Francisco Andrés Verdú * configure.in: Added test for strdup. @@ -2948,7 +6725,7 @@ Version 1.16 released 2000-03-07 OKAZAKI Tetsurou - * Makefile.in, contrib/mm/Makefile.sub, src/preproc/eqn/Makefile.sub, + * Makefile.in, Makefile.sub, src/preproc/eqn/Makefile.sub, src/roff/groff/Makefile.sub, src/roff/nroff/Makefile.sub, src/utils/afmtodit/Makefile.sub: Use $(INSTALL_SCRIPT) for script files. @@ -2980,7 +6757,7 @@ Version 1.16 released Implement it. * src/roff/troff/env.h: Add prototype. -2000-03-05 Francisco Andres Verdu +2000-03-05 Francisco Andrés Verdú Adding strsep() -- Solaris 8 doesn't have it. @@ -3004,7 +6781,7 @@ Version 1.16 released * tmac/troffrc: Add tmac.lbp. -2000-03-03 Francisco Andres Verdu +2000-03-03 Francisco Andrés Verdú * tmac/tmac.lbp: New file. * src/devices/grolbp/grolbp.man: Add documentation of `lbpname' @@ -3089,7 +6866,7 @@ Version 1.16 released Adding a new driver, grolbp, for Canon CAPSL printers (LBP-4 and LBP-8 series laser printers). This code has been contributed by - Francisco Andres Verdu . + Francisco Andrés Verdú . * src/devices/grolbp/*: The grolbp output device. * font/devlpb/*: The font description files. @@ -3248,7 +7025,7 @@ Version 1.16 released Some other changes: - * Man pages no depend on the files `VERSION' and `REVISION'. + * Man pages now depend on the files `VERSION' and `REVISION'. * The added shell script `mkinstalldirs' will replace `mkdir' in almost all cases. diff --git a/contrib/groff/INSTALL b/contrib/groff/INSTALL index cdf7eb9..0fb618e 100644 --- a/contrib/groff/INSTALL +++ b/contrib/groff/INSTALL @@ -41,9 +41,10 @@ If you want to compile and install gxditview (an X11 previewer), follow the instructions in the INSTALL file in the src/xditview subdirectory. -To get PostScript versions of the documentation resp. reference files -for the `me' macros and the `pic' preprocessor, simply say `make' in -the `doc' subdirectory. +To get a DVI, PDF, or HTML version of the groff texinfo manual, say `make +groff.dvi', `make groff.pdf', or `make groff.html', respectively, in the +`doc' subdirectory (after compiling the groff package). Note that you +need texinfo version 4.2 or newer as a prerequisite. If you have problems, read the PROBLEMS file. If this doesn't help send a bug report using the form in the file BUG-REPORT. diff --git a/contrib/groff/INSTALL.gen b/contrib/groff/INSTALL.gen index 50dbe43..666ffd9 100644 --- a/contrib/groff/INSTALL.gen +++ b/contrib/groff/INSTALL.gen @@ -8,20 +8,27 @@ various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can -be considered for the next release. If at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. The simplest way to compile this package is: @@ -55,14 +62,15 @@ Compilers and Options ===================== Some systems require unusual options for compilation or linking that -the `configure' script does not know about. You can give `configure' -initial values for variables by setting them in the environment. Using -a Bourne-compatible shell, you can do that on the command line like -this: - CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for variables by setting +them in the environment. You can do that on the command line like this: -Or on systems that have the `env' program, you can do it like this: - env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Environment Variables::, for more details. Compiling For Multiple Architectures ==================================== @@ -75,7 +83,7 @@ directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. - If you have to use a `make' that does not supports the `VPATH' + If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another @@ -122,22 +130,36 @@ you can use the `configure' options `--x-includes=DIR' and Specifying the System Type ========================== - There may be some features `configure' can not figure out + There may be some features `configure' cannot figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: +a message saying it cannot guess the host type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + CPU-COMPANY-SYSTEM -See the file `config.sub' for the possible values of each field. If +where SYSTEM can have one of these forms: + + OS + KERNEL-OS + + See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. - If you are building compiler tools for cross-compiling, you can also + If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the host +platform (i.e., that on which the generated programs will eventually be +run) with `--host=TYPE'. In this case, you should also specify the +build platform with `--build=TYPE', because, in this case, it may not +be possible to guess the build platform (it sometimes involves +compiling and running simple test programs, and this can't be done if +the compiler is a cross compiler). Sharing Defaults ================ @@ -150,20 +172,44 @@ default values for variables like `CC', `cache_file', and `prefix'. `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. -Operation Controls -================== +Environment Variables +===================== + + Variables not defined in a site shell script can be set in the +environment passed to configure. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +will cause the specified gcc to be used as the C compiler (unless it is +overridden in the site shell script). + +`configure' Invocation +====================== `configure' recognizes the following options to control how it operates. -`--cache-file=FILE' - Use and save the results of the tests in FILE instead of - `./config.cache'. Set FILE to `/dev/null' to disable caching, for - debugging `configure'. - `--help' +`-h' Print a summary of the options to `configure', and exit. +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + `--quiet' `--silent' `-q' @@ -175,9 +221,6 @@ operates. Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. -`--version' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`configure' also accepts some other, not widely useful, options. +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. diff --git a/contrib/groff/MANIFEST b/contrib/groff/MANIFEST new file mode 100644 index 0000000..b45c046 --- /dev/null +++ b/contrib/groff/MANIFEST @@ -0,0 +1,152 @@ +MANIFEST + +Last update: 21 Dec 2001 + +This file is part of groff, the GNU roff type-setting system. + +Copyright (C) 2001 Free Software Foundation, Inc. +written by Bernd Warken +maintained by Werner Lemberg + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with the +Invariant Sections being this .ig-section and AUTHORS, with no +Front-Cover Texts, and with no Back-Cover Texts. + +A copy of the Free Documentation License is included as a file called +FDL in the main directory of the groff source package. + +######################################################################## + +This file gives an overview of the directories and the main files of +the groff source distribution. + + +1) The top directory. + + BUG-REPORT A template for bug-reports. + ChangeLog Log of the changes in the different groff versions. + COPYING The GNU General Public License (GPL). + FDL The Free Documentation License (FDL). + INSTALL Information on compiling and installing groff. + INSTALL.gen Generic information on configuration and compiling. + MANIFEST The file you are reading. + MORE.STUFF Useful stuff in other packages. + NEWS Recent user-visible changes in groff. + PROBLEMS Tips to handle known critical situations. + PROJECTS Long-term additions to groff. + README Availability and contact information for groff. + README.WIN32 Documentation of the Win32 port of groff. + TODO Things planned for future groff versions. + + All other files in the top directory are related to the configuration, + compilation, and install processes. + + +2) The directory structure + +./arch Data that is special for different architectures. + djgpp Data special for the 32-bit DOS compiler djgpp. + +./contrib Part of groff, but maintained by other people. + groffer A wrapper to conveniently view roff files. + mm The groff mm macro package. + mom The groff mom macro package. + pic2graph Convert PIC diagrams into different graphical formats. + +./doc Manuals and tutorials to groff aspects. + +./font Device information and fonts. + devX100 100dpi device for X Window System. + devX100-12 100dpi device with narrower font (for 12pt base font). + devX75 75dpi device for X Window System. + devX75-12 75dpi device with narrower font (for 12pt base font). + devascii Text device for ASCII output. + devcp1047 EBCDIC device. + devdvi TeX DVI device. + devhtml HTML device. + devlatin1 Text device for latin-1 (ISO 8859-1) output. + devlbp Device for Canon CAPSL laser printers. + devlj4 Device for HP Laserjet 4, PCL 5, and compatible printers. + devps PostScript device. + devutf8 Text device for Unicode output. + +./man Some groff manual pages of more general character. + +./src Everything written in programming languages. + +./src/devices The postprocessors. + grodvi TeX DVI output. + grohtml HTML output. + grolbp Canon printers. + grolj4 HP Laserjet 4, PCL 5, and compatible printers. + grops PostScript output. + grotty Text output. + +./src/include The *.h C/C++ include files. + +./src/libs C++ code common to several parts of the groff sources. + libbib Library of bibliographic functions. + libdriver Parser for intermediate output and postprocessor code. + libgroff Library for general support functions used everywhere. + snprintf An implementation of snprintf() and friends. + +./src/preproc Preprocessors. + eqn Mathematical formulae. + grn Gremlin pictures. + html The preprocessor part of grohtml. + pic Diagram drawer. + refer Bibliographic references. + soelim File inclusion using tmac path. + tbl Tables. + +./src/roff Front-end programs. + groff Wrapper around troff. This is the main user program. + grog Guess groff command line options. + nroff Emulate classical nroff text formatter. + troff Main roff formatter program. + +./src/xditview A groff (pre)viewer for the X Window System. + +./src/utils Utility programs around groff. + addftinfo Add information to old troff font files for use with groff. + afmtodit Create font description files for the PostScript device. + hpftodit Create font description files for the LJ4 device. + indxbib Make inverted index for bibliographic databases. + lkbib Search bibliographic databases. + lookbib Interactively search bibliographic databases. + pfbtops Translate a PostScript font in .pfb format to ASCII. + tfmtodit Create font description files for TeX DVI device. + +./tmac Macro files. + + +3) Documentation + +The groff documentation is scattered upon several places. + +- The main directory contains documents related to the groff source. + The README file contains the information needed to get the groff + package, report bugs, and contact the developers. + +- The man-page of each program (section 1) is kept in the source + directory of the program. + +- The man-pages for the other sections are found in `src/man'. + +- Documentation in other formats are located in the `doc' directory, + including the groff info file, tutorials, and manuals. + + +4) The roff parser + +The parsing of the roff language is done by troff. The input is +transformed into "nodes" by `src/roff/troff/node.cc'. From these, the +intermediate output is generated. + + +5) Postprocessing + +The parser for the intermediate output and the postprocessing is in +`src/libs/libdriver/input.cc'. This is used by all postprocessors. diff --git a/contrib/groff/MORE.STUFF b/contrib/groff/MORE.STUFF index a35ea97..46107a9 100644 --- a/contrib/groff/MORE.STUFF +++ b/contrib/groff/MORE.STUFF @@ -14,14 +14,14 @@ Here two ports using the gcc compiler and other GNU tools: http://sources.redhat.com/cygwin/mirrors.html - At any of this mirrors, groff can be found in the directory + At any of those mirrors, groff can be found in the directory latest/groff. . Kees Zeelenberg : http://gnuwin32.sourceforge.net/packages/groffl.htm - This port includes grap-1.10 and deroff-1.7. + This port includes recent versions of grap and deroff. dos --- @@ -117,13 +117,24 @@ Win95, Win98, WinNT) is available from and its mirrors. -A win32 port of version 1.7 is available from +A win32 port of version 1.8 is available from http://gnuwin32.sourceforge.net/ +David Frey has also written a deroff implementation +for Debian; it is available from + + ftp://ftp.debian.org/debian/pool/main/d/deroff/ + miscellaneous ------------- +. Ralph Corderoy's excellent page on troff: + + www.troff.org + + There are links for virtually everything related to troff. + . Dr. Robert Hermann's groff gems are available from http://www.eas.slu.edu/People/RBHerrmann/GROFF/index.html @@ -163,6 +174,19 @@ miscellaneous http://perso.libertysurf.fr/baruchel/ +. gpresent, written by Bob Diertens . From the README + file: + + gpresent is a package for making presentation with groff and acroread. + It consist of a set of macros to be used with groff and a post-processor + for manipulating the PostScript output of groff. Without the use of the + PAUSE macro, it can also be used for making slides. + + It is available from + + www.science.uva.nl/~bobd/useful/gpresent/ + + documentation ------------- diff --git a/contrib/groff/Makefile.ccpg b/contrib/groff/Makefile.ccpg index 02b5d66..b89fab1 100644 --- a/contrib/groff/Makefile.ccpg +++ b/contrib/groff/Makefile.ccpg @@ -24,7 +24,7 @@ TAGS_src: $(CCSRCS) $(CSRCS) $(GRAM) $(HDRS) Makefile: $(MAKEFILEPARTS) Makefile.dep: touch Makefile.dep -$(MANPAGES): $(top_srcdir)/VERSION $(top_srcdir)/REVISION +$(top_builddir)/stamp-h $(MANPAGES): $(top_srcdir)/VERSION $(top_srcdir)/REVISION pure: $(PROG).pure diff --git a/contrib/groff/Makefile.comm b/contrib/groff/Makefile.comm index b9c9c85..6d246c5 100644 --- a/contrib/groff/Makefile.comm +++ b/contrib/groff/Makefile.comm @@ -1,4 +1,4 @@ -# Copyright (C) 1989-2000 Free Software Foundation, Inc. +# Copyright (C) 1989-2000, 2002 Free Software Foundation, Inc. # Written by James Clark (jjc@jclark.com) # # This file is part of groff. @@ -25,7 +25,7 @@ INCLUDES=-I. -I$(srcdir) \ ALL_CCFLAGS=$(INCLUDES) $(CCDEFINES) $(CCFLAGS) $(CPPFLAGS) COMPILE.cc=$(CCC) $(ALL_CCFLAGS) -c ALL_CFLAGS=$(INCLUDES) $(CDEFINES) $(CFLAGS) $(CPPFLAGS) -COMPILE.c=$(CC) $(ALL_CFLAGS) -c +COMPILE.c=$(CC) $(ALL_CFLAGS) -c LINK.cc=$(CCC) $(CCFLAGS) $(LDFLAGS) LINK.c=$(CC) $(CFLAGS) $(LDFLAGS) LIBGROFF=$(top_builddir)/src/libs/libgroff/libgroff.a @@ -38,6 +38,8 @@ YTABC= GRAM= LIBCLEAN= CLEANADD= +CLEANDIRADD= +CLEANNOTSRCDIRADD= MOSTLYCLEANFILES=$(MANCLEAN) $(PROG) $(OBJS) $(GENSRCS) $(GENHDRS) \ depend.temp core y.output $(CLEANADD) CLEANFILES=$(LIBCLEAN) @@ -69,23 +71,32 @@ prefix_must_exist: mostlyclean: -rm -f $(MOSTLYCLEANFILES) + -rm -rf $(CLEANDIRADD) + -@if test `cd $(srcdir); pwd` = `pwd`; then \ + :; \ + else \ + rm -f $(CLEANNOTSRCDIRADD); \ + fi -clean: - -rm -f $(CLEANFILES) $(MOSTLYCLEANFILES) +clean: mostlyclean + -rm -f $(CLEANFILES) -distclean: - -rm -f $(DISTCLEANFILES) $(CLEANFILES) $(MOSTLYCLEANFILES) +distclean: clean + -rm -f $(DISTCLEANFILES) + -@if test `cd $(srcdir); pwd` = `pwd`; then \ + :; \ + else \ + rm -f $(YTABC) $(YTABH); \ + fi -realclean: - -rm -f $(REALCLEANFILES) $(DISTCLEANFILES) $(CLEANFILES) \ - $(MOSTLYCLEANFILES) +realclean: distclean + -rm -f $(REALCLEANFILES) -extraclean: - -rm -f $(DISTCLEANFILES) $(CLEANFILES) $(MOSTLYCLEANFILES) \ - \#* *~ =* core junk grot old temp tmp tem +extraclean: distclean + -rm -f \#* *~ =* core junk grot old temp tmp tem .SUFFIXES: -.SUFFIXES: .o .cc .c .y .man .n +.SUFFIXES: .o .obj .cc .c .y .man .n .cc.o: $(COMPILE.cc) $< @@ -93,6 +104,12 @@ extraclean: .c.o: $(COMPILE.c) $< +.cc.obj: + $(COMPILE.cc) $< + +.c.obj: + $(COMPILE.c) $< + .y.cc: if test -n "$(YTABH)"; then \ $(YACC) $(YACCFLAGS) -d $<; \ @@ -101,31 +118,36 @@ extraclean: fi -test -f y.tab.h && mv y.tab.h y_tab.h -test -f y.tab.c && mv y.tab.c y_tab.c - mv y_tab.c $@ -# Avoid ending up with two versions of $(YTABH). + mv y_tab.c $(YTABC) + if test -n "$(YTABH)"; then mv y_tab.h $(YTABH); fi + +# The next rule is needed for make of Solaris 2.5.1 to override its +# built-in .y.o rule (which takes precedence over the .y.cc rule above). +.y.o: if test -n "$(YTABH)"; then \ - if test -f $(srcdir)/$(YTABH); then \ - rm -f $(YTABH); \ - mv y_tab.h $(srcdir)/$(YTABH); \ - else \ - mv y_tab.h $(YTABH); \ - fi; \ + $(YACC) $(YACCFLAGS) -d $<; \ + else \ + $(YACC) $(YACCFLAGS) $<; \ fi - -version=`cat $(top_srcdir)/VERSION` -# No additional number for the groff archive if revision is zero -revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(top_srcdir)/REVISION` + -test -f y.tab.h && mv y.tab.h y_tab.h + -test -f y.tab.c && mv y.tab.c y_tab.c + mv y_tab.c $(YTABC) + if test -n "$(YTABH)"; then mv y_tab.h $(YTABH); fi + $(COMPILE.cc) $(YTABC) .man.n: @echo Making $@ from $< @-rm -f $@ @sed -e "s|@BINDIR@|$(bindir)|g" \ -e "s|@FONTDIR@|$(fontdir)|g" \ - -e "s|@FONTPATH@|$(fontpath)|g" \ + -e "s|@LOCALFONTDIR@|$(localfontdir)|g" \ + -e "s|@LEGACYFONTDIR@|$(legacyfontdir)|g" \ -e "s|@MACRODIR@|$(tmacdir)|g" \ -e "s|@SYSTEMMACRODIR@|$(systemtmacdir)|g" \ -e "s|@LOCALMACRODIR@|$(localtmacdir)|g" \ - -e "s|@MACROPATH@|$(tmacpath)|g" \ + -e "s|@DOCDIR@|$(docdir)|g" \ + -e "s|@EXAMPLEDIR@|$(exampledir)|g" \ + -e "s|@HTMLDOCDIR@|$(htmldocdir)|g" \ -e "s|@DEVICE@|$(DEVICE)|g" \ -e "s|@DEFAULT_INDEX@|$(indexdir)/$(indexname)|g" \ -e "s|@DEFAULT_INDEX_NAME@|$(indexname)|g" \ @@ -239,7 +261,7 @@ depend_src: depend.temp depend.temp: FORCE > depend.temp; - test -z "$(CCSRCS)$(YTABC)" \ + test -z "$(CCSRCS)$(YTABC)" \ || $(CCC) $(ALL_CCFLAGS) -MM $(CCSRCS) $(YTABC) >>depend.temp test -z "$(CSRCS)" \ || $(CC) $(ALL_CFLAGS) -MM $(CSRCS) >>depend.temp @@ -254,6 +276,7 @@ TAGS_src: test -z "$(GRAM)$(HDRS)" \ || $(ETAGS) $(ETAGSFLAGS) -a $(ETAGSCCFLAG) $(GRAM) $(HDRS) +# This rule is only considered for the subdir_Makefile target. Makefile: -rm -f Makefile echo srcdir=$(srcdir) >>Makefile diff --git a/contrib/groff/Makefile.cpg b/contrib/groff/Makefile.cpg index 4cb514f..b7af68c 100644 --- a/contrib/groff/Makefile.cpg +++ b/contrib/groff/Makefile.cpg @@ -24,4 +24,4 @@ TAGS_src: $(CCSRCS) $(CSRCS) $(GRAM) $(HDRS) Makefile: $(MAKEFILEPARTS) Makefile.dep: touch Makefile.dep -$(MANPAGES): $(top_srcdir)/VERSION $(top_srcdir)/REVISION +$(top_builddir)/stamp-h $(MANPAGES): $(top_srcdir)/VERSION $(top_srcdir)/REVISION diff --git a/contrib/groff/Makefile.in b/contrib/groff/Makefile.in index e3349d9..411d8b9 100644 --- a/contrib/groff/Makefile.in +++ b/contrib/groff/Makefile.in @@ -1,4 +1,4 @@ -# Copyright (C) 1989-2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 1989-2000, 2001, 2002 Free Software Foundation, Inc. # Written by James Clark (jjc@jclark.com) # # This file is part of groff. @@ -20,10 +20,10 @@ srcdir=@srcdir@ top_srcdir=@top_srcdir@ VPATH=@srcdir@ -top_builddir=@top_builddir@ +top_builddir=@groff_top_builddir@ version=`cat $(top_srcdir)/VERSION` -# No additional number if revision is zero +# No additional number if revision is zero. revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(top_srcdir)/REVISION` # Define `page' to be letter if your PostScript printer uses 8.5x11 @@ -54,18 +54,22 @@ PAGE=@PAGE@ # with a printer that requires page reversal. BROKEN_SPOOLER_FLAGS=@BROKEN_SPOOLER_FLAGS@ -# DEVICE is the default device. +# `DEVICE' is the default device. DEVICE=ps -# TTYDEVDIRS is either `font/devascii font/devlatin1 font/devutf8' (for -# ASCII) or `font/devcp1047' (for EBCDIC). -TTYDEVDIRS=@TTYDEVDIRS@ +# `TTYDEVDIRS' is either `font/devascii font/devlatin1' (for +# ASCII) or `font/devcp1047' (for EBCDIC) plus font/devutf8. +TTYDEVDIRS=@TTYDEVDIRS@ font/devutf8 -# PSPRINT is the command to use for printing a PostScript file, +# `OTHERDEVDIRS' is either `font/devlj4 font/devlbp' (for ASCII) or +# empty (for EBCDIC). +OTHERDEVDIRS=@OTHERDEVDIRS@ + +# `PSPRINT' is the command to use for printing a PostScript file, # for example `lpr'. PSPRINT=@PSPRINT@ -# DVIPRINT is the command to use for printing a TeX dvi file, +# `DVIPRINT' is the command to use for printing a TeX dvi file, # for example `lpr -d'. DVIPRINT=@DVIPRINT@ @@ -82,44 +86,62 @@ g=@g@ prefix=@prefix@ exec_prefix=@exec_prefix@ -# bindir says where to install executables. +# `bindir' says where to install executables. bindir=@bindir@ -# libdir says where to install platform-dependent data +# `libdir' says where to install platform-dependent data. libdir=@libdir@ libprogramdir=$(libdir)/groff -# datasubdir says where to install platform-independent data files +# `datasubdir' says where to install platform-independent data files. datadir=@datadir@ dataprogramdir=$(datadir)/groff datasubdir=$(dataprogramdir)/$(version)$(revision) -# fontdir says where to install dev*/*. +# `infodir' says where to install info files. +infodir=@infodir@ + +# `docdir' says where to install documentation files. +docdir=$(datadir)/doc/groff/$(version)$(revision) + +# `exampledir' says where to install example files. +exampledir=$(docdir)/examples + +# `htmldocdir' says where to install documentation in HTML format. +htmldocdir=$(docdir)/html + +# `fontdir' says where to install dev*/*. fontdir=$(datasubdir)/font -# fontpath says where to look for dev*/*. -fontpath=$(fontdir):/usr/lib/font +# `localfontdir' says where local fonts will be installed (as dev*/*). +localfontdir=$(dataprogramdir)/site-font + +# `legacyfontdir' is for compatibility with non-GNU troff. +legacyfontdir=/usr/lib/font -# tmacdir says where to install macros. +# `fontpath' says where to look for dev*/*. +fontpath=$(localfontdir):$(fontdir):$(legacyfontdir) + +# `tmacdir' says where to install macros. tmacdir=$(datasubdir)/tmac -# systemtmacdir says where to install platform-dependent macros +# `systemtmacdir' says where to install platform-dependent macros. systemtmacdir=$(libprogramdir)/site-tmac -# localtmacdir says where local files will be installed +# `localtmacdir' says where local files will be installed. localtmacdir=$(dataprogramdir)/site-tmac -# tmacpath says where to look for macro files. +# `tmacpath' says where to look for macro files. # The current directory will be prepended in unsafe mode only; the home # directory will be always added. # `troffrc' and `troffrc-end' (and `eqnrc') are searched neither in the # current nor in the home directory. tmacpath=$(systemtmacdir):$(localtmacdir):$(tmacdir) -# sys_tmac_prefix is prefix (if any) for system macro packages +# `sys_tmac_prefix' is prefix (if any) for system macro packages. sys_tmac_prefix=@sys_tmac_prefix@ -# tmac_wrap is list of system macro packages that should be made +# `tmac_wrap' is list of system macro packages that should be made # available to groff by creating a corresponding macro package # in the groff macro directory that references the system macro # package. @@ -157,51 +179,78 @@ indexname=Ind # otherwise the supplied eign file will be used. common_words_file=$(datasubdir)/eign -# manroot is the root of the man page directory tree. +# `manroot' is the root of the man page directory tree. mandir=@mandir@ manroot=$(mandir) -# man1ext is the man section for user commands. +# `man1ext' is the man section for user commands. man1ext=1 man1dir=$(manroot)/man$(man1ext) -# man5ext is the man section for file formats. +# `man5ext' is the man section for file formats. man5ext=5 man5dir=$(manroot)/man$(man5ext) -# man7ext is the man section for macros. +# `man7ext' is the man section for macros. man7ext=7 man7dir=$(manroot)/man$(man7ext) +# The configure script checks whether all necessary utility programs for +# grohtml are available -- only then we can build the HTML documentation. +make_html=@make_html@ +make_install_html=@make_install_html@ + # DEFINES should include the following: # -DHAVE_MMAP if you have mmap() and # -DARRAY_DELETE_NEEDS_SIZE if your C++ doesn't understand `delete []' -# -DHAVE_SYS_SIGLIST if you have sys_siglist[] +# -DSYS_SIGLIST_DECLARED if you have sys_siglist[] # -DWCOREFLAG=0200 if the 0200 bit of the status returned by # wait() indicates whether a core image was # produced for a process that was terminated # by a signal -# -DHAVE_UNISTD_H if you have -# -DHAVE_CC_OSFCN_H if you have a C++ +# # -DHAVE_DIRENT_H if you have # -DHAVE_LIMITS_H if you have # -DHAVE_CC_LIMITS_H if you have a C++ -# -DHAVE_SYS_DIR_H if you have +# -DHAVE_MATH_H if you have +# -DHAVE_CC_OSFCN_H if you have a C++ +# -DHAVE_STDINT_H if you have # -DHAVE_STDLIB_H if you have +# -DHAVE_STRING_H if you have # -DHAVE_STRINGS_H if you have -# -DHAVE_RENAME if you have rename() +# -DHAVE_SYS_DIR_H if you have +# -DHAVE_SYS_TIME_H if you have +# -DHAVE_UNISTD_H if you have +# +# -DHAVE_FMOD if you have fmod() +# -DHAVE_GETCWD if you have getcwd() +# -DHAVE_GETTIMEOFDAY if you have gettimeofday() +# -DHAVE_ISATTY if you have isatty() # -DHAVE_MKSTEMP if you have mkstemp() -# -DHAVE_STRDUP if you have strdup() -# -DHAVE_STRSEP if you have strsep() +# -DHAVE_MMAP if you have mmap() +# -DHAVE_PUTENV if you have putenv() +# -DHAVE_RENAME if you have rename() +# -DHAVE_SNPRINTF if you have snprintf() # -DHAVE_STRCASECMP if you have strcasecmp() +# -DHAVE_STRNCASECMP if you have strncasecmp() +# -DHAVE_STRERROR if you have strerror() +# -DHAVE_STRSEP if you have strsep() +# -DHAVE_STRTOL if you have strtol() +# +# -DNEED_DECLARATION_GETTIMEOFTODAY +# if your C++ doesn't declare +# gettimeofday() # -DNEED_DECLARATION_HYPOT if your C++ doesn't declare hypot() -# -DNEED_DECLARATION_PUTENV if your C++ doesn't declare putenv() -# -DNEED_DECLARATION_POPEN if your C++ doesn't declare popen() # -DNEED_DECLARATION_PCLOSE if your C++ doesn't declare pclose() +# -DNEED_DECLARATION_POPEN if your C++ doesn't declare popen() +# -DNEED_DECLARATION_PUTENV if your C++ doesn't declare putenv() +# -DNEED_DECLARATION_STRCASECMP if your C++ doesn't declare +# strcasecmp() # -DNEED_DECLARATION_STRNCASECMP # if your C++ doesn't declare # strncasecmp() -# -DRET_TYPE_SRAND_IS_VOID if your srand() returns void or int +# +# -DRET_TYPE_SRAND_IS_VOID if srand() returns void not int # -DHAVE_SYS_NERR if you have sysnerr in or # -DHAVE_SYS_ERRLIST if you have sys_errlist in or # @@ -211,13 +260,17 @@ man7dir=$(manroot)/man$(man7ext) # -DHAVE_STRUCT_EXCEPTION if defines struct exception # -DRETSIGTYPE=int if signal handlers return int not void # -DIS_EBCDIC_HOST if the host's encoding is EBCDIC +# -DPAGEA4 if the the printer's page size is A4 DEFINES=@DEFS@ -# Include fmod.o, strtol.o, getcwd.o, strerror.o, putenv.o in LIBOBJS if -# your C library is missing the corresponding function. +# Include +# +# {fmod,getcwd,mkstemp,putenv,snprintf,strerror,strtol}.$(OBJEXT) +# +# in LIBOBJS if your C library is missing the corresponding function. LIBOBJS=@LIBOBJS@ -# CCC is the compiler for C++ (.cc) files. +# `CCC' is the compiler for C++ (.cc) files. CCC=@CXX@ CC=@CC@ # CCDEFINES are definitions for C++ compilations. @@ -231,6 +284,8 @@ LDFLAGS=@LDFLAGS@ YACC=@YACC@ YACCFLAGS=-v +EXEEXT=@EXEEXT@ +OBJEXT=@OBJEXT@ LIBS=@LIBS@ LIBM=@LIBM@ RANLIB=@RANLIB@ @@ -238,6 +293,7 @@ INSTALL=@INSTALL@ INSTALL_PROGRAM=@INSTALL_PROGRAM@ INSTALL_SCRIPT=@INSTALL_SCRIPT@ INSTALL_DATA=@INSTALL_DATA@ +INSTALL_INFO=@INSTALL_INFO@ LN_S=@LN_S@ AR=ar ETAGS=etags @@ -249,7 +305,7 @@ PERLPATH=@PERLPATH@ # Sed command with which to edit sh scripts. SH_SCRIPT_SED_CMD=@SH_SCRIPT_SED_CMD@ -# the program to create directory hierarchies +# The program to create directory hierarchies. mkinstalldirs=$(top_srcdir)/mkinstalldirs PURIFY=purify @@ -266,8 +322,11 @@ MDEFINES= \ "BROKEN_SPOOLER_FLAGS=$(BROKEN_SPOOLER_FLAGS)" \ "DEVICE=$(DEVICE)" \ "TTYDEVDIRS=$(TTYDEVDIRS)" \ + "OTHERDEVDIRS=$(OTHERDEVDIRS)" \ "PSPRINT=$(PSPRINT)" \ "DVIPRINT=$(DVIPRINT)" \ + "version=$(version)" \ + "revision=$(revision)" \ "top_srcdir=$(top_srcdir)" \ "top_builddir=$(top_builddir)" \ "prefix=$(prefix)" \ @@ -276,10 +335,16 @@ MDEFINES= \ "datadir=$(datadir)" \ "dataprogramdir=$(dataprogramdir)" \ "datasubdir=$(datasubdir)" \ + "infodir=$(infodir)" \ + "docdir=$(docdir)" \ + "exampledir=$(exampledir)" \ + "htmldocdir=$(htmldocdir)" \ "libdir=$(libdir)" \ "libprogramdir=$(libprogramdir)" \ "bindir=$(bindir)" \ "fontdir=$(fontdir)" \ + "localfontdir=$(localfontdir)" \ + "legacyfontdir=$(legacyfontdir)" \ "fontpath=$(fontpath)" \ "tmacdir=$(tmacdir)" \ "systemtmacdir=$(systemtmacdir)" \ @@ -296,12 +361,16 @@ MDEFINES= \ "man5dir=$(man5dir)" \ "man7ext=$(man7ext)" \ "man7dir=$(man7dir)" \ + "make_html=$(make_html)" \ + "make_install_html=$(make_install_html)" \ "mkinstalldirs=$(mkinstalldirs)" \ "tmac_wrap=$(tmac_wrap)" \ "sys_tmac_prefix=$(sys_tmac_prefix)" \ "tmac_an_prefix=$(tmac_an_prefix)" \ "tmac_s_prefix=$(tmac_s_prefix)" \ "tmac_m_prefix=$(tmac_m_prefix)" \ + "EXEEXT=$(EXEEXT)" \ + "OBJEXT=$(OBJEXT)" \ "CCC=$(CCC)" \ "CC=$(CC)" \ "CCDEFINES=$(CCDEFINES)" \ @@ -319,6 +388,7 @@ MDEFINES= \ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ "INSTALL_DATA=$(INSTALL_DATA)" \ + "INSTALL_INFO=$(INSTALL_INFO)" \ "ETAGS=$(ETAGS)" \ "ETAGSFLAGS=$(ETAGSFLAGS)" \ "ETAGSCCFLAG=$(ETAGSCCFLAG)" \ @@ -364,9 +434,7 @@ DEVDIRS=\ font/devX75-12 \ font/devX100 \ font/devX100-12 \ - font/devlj4 \ - font/devhtml \ - font/devlbp + font/devhtml ALLTTYDEVDIRS=\ font/devascii \ font/devlatin1 \ @@ -378,16 +446,30 @@ OTHERDIRS=\ src/utils/afmtodit \ src/roff/grog \ src/roff/nroff \ - contrib/mm + contrib/mm \ + contrib/pic2graph \ + contrib/eqn2graph \ + contrib/groffer \ + contrib/mom \ + doc ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \ - $(DEVDIRS) $(TTYDEVDIRS) $(OTHERDIRS) + $(DEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(OTHERDIRS) EXTRADIRS=\ font/devps/generate \ font/devdvi/generate \ + font/devlj4/generate \ src/xditview \ doc -DISTDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \ - $(DEVDIRS) $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS) +NOMAKEDIRS=\ + arch/djgpp \ + contrib/mm/examples \ + contrib/mm/mm \ + contrib/mom/examples \ + contrib/mom/momdoc \ + src/libs/snprintf +DISTDIRS=\ + $(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(OTHERDEVDIRS) \ + $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS) $(NOMAKEDIRS) TARGETS=all install install_bin install_data clean distclean mostlyclean \ realclean extraclean distfiles TAGS depend uninstall_sub @@ -460,7 +542,7 @@ $(CCPROGDIRS): FORCE -f $(top_srcdir)/Makefile.ccpg \ -f Makefile.dep $(do) -$(DEVDIRS) $(TTYDEVDIRS): FORCE +$(DEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS): FORCE @$(ENVSETUP); \ if test $(srcdir) = .; \ then srcdir=.; \ @@ -498,10 +580,14 @@ dist: cd tmp; \ $(LN_S) ../Makefile .; \ $(LN_S) $$srcdir/* . 2>/dev/null || true; \ + rm -rf CVS; \ for d in $(DISTDIRS); do \ - (cd $$d; $(LN_S) $$srcdir/$$d/* . 2>/dev/null || true); \ + (cd $$d; \ + $(LN_S) $$srcdir/$$d/* . 2>/dev/null; \ + rm -rf CVS || true); \ done; \ - $(MAKE) srcdir=$$srcdir VPATH=$$srcdir extraclean; \ + $(MAKE) srcdir=. VPATH=. distfiles; \ + $(MAKE) srcdir=. VPATH=. extraclean; \ for d in $(EXTRADIRS); do \ (cd $$d; $(MAKE) extraclean); \ done; \ @@ -519,6 +605,8 @@ dist: .PHONY: $(ALLDIRS) dot $(TARGETS) FORCE +# Create a Makefile in $(subdir). This is useful for development since it +# avoids running make recursively. subdir_Makefile: Makefile.cfg $(MAKE) do=Makefile $(subdir) @@ -536,10 +624,12 @@ uninstall: uninstall_sub uninstall_dirs .PHONY: uninstall_dirs uninstall_dirs: -# Use rmdir here so that the directories are only removed if they're empty +# Use `rmdir' here so that the directories are only removed if they are empty. -rmdir $(man1dir) $(man5dir) $(man7dir) $(manroot) \ - $(tmacdir) $(systemtmacdir) $(localtmacdir) $(fontdir) $(bindir) \ - $(datasubdir) $(dataprogramdir) $(datadir) \ + $(tmacdir) $(systemtmacdir) $(localtmacdir) \ + $(fontdir) $(localfontdir) $(bindir) \ + $(datasubdir) $(dataprogramdir) $(datadir) $(infodir) \ + $(exampledir) $(htmldocdir) $(docdir) \ $(libprogramdir) $(libdir) diff --git a/contrib/groff/Makefile.man b/contrib/groff/Makefile.man index 2fecd11..6eaf311 100644 --- a/contrib/groff/Makefile.man +++ b/contrib/groff/Makefile.man @@ -2,4 +2,4 @@ all: $(MANPAGES) install_data: install_man install_man: $(MANPAGES) uninstall_sub: uninstall_man -$(MANPAGES): $(top_srcdir)/VERSION $(top_srcdir)/REVISION +$(top_builddir)/stamp-h $(MANPAGES): $(top_srcdir)/VERSION $(top_srcdir)/REVISION diff --git a/contrib/groff/Makefile.sub b/contrib/groff/Makefile.sub index 77c701f..8dc3c71 100644 --- a/contrib/groff/Makefile.sub +++ b/contrib/groff/Makefile.sub @@ -1,8 +1,27 @@ -DISTCLEANFILES=config.status config.log config.cache Makefile \ - src/xditview/Imakefile +DISTCLEANFILES=\ + config.status \ + config.log \ + config.cache \ + stamp-h \ + Makefile \ + src/xditview/Imakefile \ + src/include/config.h CLEANADD=Makefile.cfg conftest* distfiles: configure -configure: configure.in aclocal.m4 - cd $(srcdir); autoconf +$(scrdir)/configure: configure.ac aclocal.m4 + cd $(srcdir) && autoconf + +config.status: configure + $(SHELL) config.status --recheck + +# autoheader might not change config.hin, so touch a stamp file. +$(srcdir)/config.hin: stamp-h.in +$(srcdir)/stamp-h.in: configure.ac aclocal.m4 + cd $(srcdir) && autoheader + echo timestamp > $(srcdir)/stamp-h.in + +config.h: stamp-h +stamp-h: config.hin config.status + $(SHELL) config.status diff --git a/contrib/groff/NEWS b/contrib/groff/NEWS index eec9d72..f93d10c 100644 --- a/contrib/groff/NEWS +++ b/contrib/groff/NEWS @@ -1,5 +1,513 @@ This file describes recent user-visible changes in groff. Bug fixes are not -described. There are more details in the man pages. +described. There are more details in the man and info pages. + +VERSION 1.18.1 +============== + +Troff +----- + +o The non-slanted PostScript font definition files have been regenerated to + include left and right italic correction values. Applying those to a glyph + (this is, prepending the glyph with `\,' and appending `\/' to the glyph) + sets the glyph width to the real value given by the horizontal bounding + box values. Without those escapes, the advance width for the particular + glyph is used (which can differ considerably). + + Most users will neither need this feature nor notice a difference in + existing documents (provided \, and \/ is used as advertised, namely for + italic fonts only); its main goal is to improve image generation with + grohtml. + + This is an experimental change, and feedback is welcome. + +Tbl +--- + +o Added global option `nospaces' to ignore leading and trailing spaces in + data items. + +Grolbp +------ + +o The option -w (--linewidth) has been added (similar to other device + drivers) to set the default line width. + +Grn +--- + +o Support for b-spline and Bezier curves has been added. + +Groffer +------- + +o New option `--shell' to select the shell under which groffer shall run. + +Macro Packages +-------------- + +o The string `Am' (producing an ampersand) has been added to mdoc for + compatibility with NetBSD. + +o `.IX' is now deprecated for mom; you should use `.IQ' (Indent Quit) + instead. + +o In mom, new inlines `FWD', `BCK', `UP', and `DOWN' deal with horizontal + and vertical movements; please refer to contrib/mom/NEWS for more + details. + +o New macro ENDNOTES_HDRFTR_CENTER for mom to better control headers. + +Miscellaneous +------------- + +o The `papersize' keyword in the DESC file now accepts multiple arguments. + It is scanned from left to the right, and the first valid argument is + used. This makes it possible to provide a fallback paper size. + + Example: + + papersize /etc/papersize a4 + +o A local font directory has been prepended to the default font path; it + defaults to /usr/local/share/groff/site-font. Similar to the normal + font searching process, files must be placed into a devXXX subdirectory, + e.g. + + /usr/local/share/groff/site-font/devps/FOO + + for a PostScript font definition file FOO. + + +VERSION 1.18 +============ + +*************************************************************************** +* * +* PLEASE READ THE CHANGES BELOW REGARDING GROTTY, GROFF'S TTY FRONTEND. * +* * +*************************************************************************** + +Troff +----- + +o Color support has been added to troff and pic (and to the device drivers + grops, grodvi, grotty, and grohtml -- other preprocessors and drivers will + follow). A new function `defcolor' defines colors; the escape sequence + `\m' sets the drawing color, the escape sequence `\M' specifies the + background color for closed objects created with \D'...' commands. + `\m[]' and `\M[]' switch back to the previous color. `\m' and `\M' + correspond to the new troff output command sets starting with `m' and + `DF'. The device-specific default color is called `default' and can't be + redefined. + + Use the `color' request to toggle the usage of colors (default is on); the + read-only register `.color' is 0 if colors are not active, and non-zero + otherwise. + + The old `Df' output command is mapped onto `DFg'; all color output + commands don't change the current font position (consequently, `Df' + doesn't either). + + Outputting color can be disabled in troff and groff with the option -c + (it is always disabled in compatibility mode). See the section on grotty + for the GROFF_NO_SGR environment variable also. + + For defining color components as fractions between 0 and 1, a new scaling + indicator `f' has been introduced: 1f = 65536u. For testing whether a + color is defined (with .if and .ie), a new conditional operator `m' is + available. + + More details can be found in the groff_diff.7 manual page and in + groff.texinfo. + +o Similar to \m and \M, \f[] switches back to the previous font. \fP + (and \f[P]) is still valid for backwards compatibility. + +o The new escape \F is the same as `.fam'; \F[] switches back to previous + family -- \F[P] selects family `P'. + +o Two new glyph symbols are available: `eu' is the official Euro symbol; + `Eu' is a font-specific glyph variant. + +o The new glyph symbols `t+-', `tdi', and `tmu' are textual variants of + `+-', `di', and `mu', respectively. + +o Latin-1 character 181 (PS name `mu', Unicode name U+00B5 MICRO SIGN) has + got the troff glyph name `mc'. + +o -Tutf8 is now available on EBCDIC hosts. + +o Strings can take arguments, using this syntax: \*[foo arg1 arg2 ...]. + Example: + + .ds xxx This is a \\$1 test. + \*[xxx nice] + +o It is now possible to have whitespace between the first and second dot (or + the name of the ending macro) to end a macro definition. Example: + + .de ! + .. + . + .de foo + . nop Hello, I'm `foo'. + . nop I will now define `bar'. + . de bar ! + . nop Hello, I'm `bar'. + . ! + .. + +o `.fn' is a new string-valued register which returns the (internal) real + font name; styles and families are properly concatenated. + +o Three new read/write registers `seconds', `minutes', and `hours' contain + the current time, set at start-up of troff. Use the `af' request to + control their output format. + +o The new request `fchar' can be used to provide fallback characters. It + has the same syntax as the `char' request; the only difference is that a + character defined with `.char' hides the glyph with the same name in the + current font, whereas a character defined with `.fchar' is checked only if + the particular glyph isn't found in the current font. This test happens + before checking special fonts. + +o In analogy to the `tmc' request, `.writec' is the same as `.write' but + doesn't emit a final newline. + +o The new request `itc' is a variant of `.it' for which a line interrupted + with \c counts as one input line. + +o Two new requests `ds1' and `as1' which are similar to `ds' and `as' but + with compatibility mode disabled during expansion of strings defined by + them. + +o The syntax of the `substring' request has been changed: The first + character in a string now has index 0, the last character has index -1. + Note that this is an incompatible change. + +o To emit strings directly to the intermediate output, a new `output' + request has been added; it is similar to `\!' used at the top level. + +o `.hpf' has been extended. It can now handle most TeX hyphenation + pattern files without modification. To do that, the commands \patterns, + \hyphenation, and \endinput are recognized. Please refer to groff_diff.7 + for more information. + +o `hpfcode' is a new request to provide an input encoding mapping for the + `hpf' request. + +o The new request `hpfa' appends hyphenation patterns (`hpf' replaces + already existing patterns). + +o A new request `ami' (append macro indirect) has been added. The first and + second parameter of `ami' are taken from string registers rather than + directly; this very special request is needed to make `trace.tmac' + independent from the escape character (which might even be disabled). + +o The new request `sizes' is similar to the `sizes' command in DESC files. + It expects the same syntax; the data must be on a single line, and the + final `0' can be omitted. + +o `trin' (translate input) is a new request which is similar to `tr' with + the exception that the `asciify' request will use the character code (if + any) before the character translation. Example: + + .trin ax + .di xxx + a + .br + .di + .xxx + .trin aa + .asciify xxx + .xxx + + The result is `x a'. Using `tr', the result would be `x x'. + +o The request `pvs' isn't new, but hasn't been documented before. It + adds vertical space after a line has been output. This makes it an + alternative to the `ls' request to produce double-spaced documents. + The read-only register `.pvs' holds the current amount of the + post-vertical line space. + +o For compatibility with plan 9's troff, multiple `pi' requests are + supported: + + .pi foo + .pi bar + + is now equivalent to + + .pi foo | bar + +o A new escape sequence `\O' is available to disable and enable glyph + output. Please see groff_diff.7 and groff.texinfo for more details. + +o The escapes `\%', `\&', `\)', and `\:' no longer cause an error in \X; + they are ignored now. Additionally `\ ' and `\~' are converted to + single space characters. + +o The default tab distance in nroff mode is now 0.8i to be compatible + with UNIX troff. + +o Using the latin-1 input character 0xAD (soft hyphen) for the `shc' + request was a bad idea. Instead, it is now translated to `\%', and + the default hyphenation character is again \[hy]. Note that the glyph + \[shc] is not useful for typographic purposes; it only exists to have + glyph names for all latin-1 characters. + +Macro Packages +-------------- + +o Peter Schaffter has contributed a new major macro package + called `mom', mainly for non-scientific writers, which takes care of + many typographic issues. It comes with a complete reference (in HTML + format) and some examples. `mom' has been designed to format documents + for PostScript output only. + +o Two macros `AT' (AT&T) and `UC' (Univ. of California) have been added to + the man macros for compatibility with older BSD releases. + +o Both the man and mdoc macro packages now use the LL and LT registers for + setting the line and title length, respectively (similar to those + registers in the ms macro package). If not set on the command line or + in a macro file loaded before the macro package itself, they default to + 78n in nroff mode and 6.5i in troff mode. + +o The `-xwidth' specifier in the mdoc macro package has been removed. Its + functionality is now integrated directly into `-width'. Similarly, + `-column' has been extended to provide this functionality also. + +o A new macro `Ex' has been added to the mdoc macro package to document an + exit status. + +o The PSPIC macro has been extended to work with DVI output (`pspic.tmac' is + now automatically loaded for -Tdvi), using a dvips special to load the EPS + file. + +o The trace.tmac package now traces calls to `am' also. Additionally, it + works in compatibility mode. + +o `troff.1' has been split. Differences to UNIX troff are now documented + in the new man page `groff_diff.7'. + +o `groff_mwww.7' has been renamed to `groff_www.7'. The file mwww.tmac + has been removed. + +o `groff_ms.7' has been completely rewritten. It now contains a complete + reference to the ms macros. + +o `groff_trace.7' documents the trace macro package. + +o Changes in www.tmac: + + Note that HTML support is still in alpha change, so it is rather likely + that both macro names and macro syntax will change. Some of the macros + mentioned below aren't really new but haven't been documented properly + before. + + The following macros have been renamed: + + MAILTO -> MTO + IMAGE -> IMG + LINE -> HR + + For consistency, the macros `URL', `FTL', and `MTO' now all have the + address as the first parameter followed by the description. + + By default, grohtml generates links to all section headings at the top + of the document. Use the new `LK' macro to specify a different place. + + For specifying the background color and a background image, use the + new macros `BCL' and `BGIMG', respectively. + + The macro `NHR' has been added; it suppresses the generation of top and + bottom rules which grohtml emits by default. + + The new macro `HX' determines the cut-off point for automatic link + generation to headings. + + The image position parameter names in `IMG' have been changed to `-L', + `-R', and `-C'. + + New macro `PIMG' for inclusion of a PNG image (it will automatically + convert it into an EPS file if not -Thtml is used). + + New macro `MPIMG' for putting a PNG image into the left or right margin + (it will automatically convert it into an EPS file if not + -Thtml is used). + + New macros `HnS', `HnE' to start and end a header line block. + + New macro `DC' to produce dropcap characters. + + New macro `HTL' to generate an HTML title line only but no H1 heading. + + New macros `ULS' and `ULE' to start and end an unordered list. The new + macro `LI' inserts a list item. + +Groff +----- + +o The new command line option `-c' disables color output (which is always + disabled in compatibility mode). + +Nroff +----- + +o Two new command line options `-c' and `-C'; the former passes `-c' to + grotty (switching to the old output scheme); the latter passes `-C' to + groff (enabling compatibility mode). + +Pic +--- + +o New keywords `color' (or `colour', `colored', `coloured'), `outline' (or + `outlined'), and `shaded' are available. `outline' sets the color of the + outline, `shaded' the fill color, and `color' sets both. Example: + + circle shaded "green" outline "black" ; + + Filled arrows always use the outline color for filling. + + Color support for TeX output is not implemented yet. + +Pic2graph +--------- + +o A new script contributed by Eric S. Raymond . It + converts a PIC diagram into a cropped image. Since it uses gs and the PNM + library, virtually all graphics formats are available for output. + +Eqn2graph +--------- + +o A new script contributed by Eric S. Raymond . It + converts an EQN diagram into a cropped image. Since it uses gs and the PNM + library, virtually all graphics formats are available for output. + +Groffer +------- + +o A new script contributed by Bernd Warken . It displays + groff files and man pages on X and tty, taking care of most parameters + automatically. + +Grog +---- + +o Documents using the mom macro package are recognized. + +Grops +----- + +o Color support has been added. + +o A new option `-p' is available to select the output paper size. It has + the same syntax as the new `papersize' keyword in the DESC file. + +Grodvi +------ + +o By default, font sizes are now available in the range 5-10000pt, similar + to PS fonts. If you want the old behaviour (i.e., font sizes at discrete + values only), insert the following at the start of your document: + + .if '\*[.T]'dvi' \ + . sizes 500 600 700 800 900 1000 1095 1200 1400 1440 1600 \ + 1728 1800 2000 2074 2200 2400 2488 2800 3600 + +o A new font file HBI (using cmssbxo10; this is slanted sans serif bold + extended) has been added. + +o Two font families are now available: `T' and `H'. + +o EC and TC fonts have been integrated. Use `-mec' (calling the file + ec.tmac) to switch to them. Those fonts give a much better coverage of + the symbols defined by groff than the CM fonts. + + Note that ec.tmac must be called before any language-specific files; it + doesn't take care of hcode values. + +o Color support has been added. For drawing commands, colors are translated + to gray values currently. + +Grotty +------ + +o Color support has been added, using the SGR (ISO 6429, sometimes called + ANSI color) escape sequences. + +o SGR escape sequences are now used by default for underlining and bold + printing also, no longer using the backspace character trick. To revert + to the old behaviour, use the `-c' switch. + + Note that you have to use the `-R' option of `less' to make SGR escapes + display correctly. On the other hand, terminal programs and consoles like + `xterm' which support SGR sequences natively can directly display the + output of grotty. Consequently, the options `-b', `-B', `-u', and `-U' + work only in combination with `-c' and are ignored silently otherwise. + + For the `man' program, it may be necessary to add the `-R' option of + `less' to the $PAGER environment variable; alternatively, you can use + `man's `-P' option (or adapt its configuration file accordingly). See + man(1) for more details. + +o If the environment variable GROFF_NO_SGR is set, SGR output is disabled, + reverting to the old behaviour. + +o A new special \X'tty: sgr n' has been added; if n is non-zero or missing, + enable SGR output (the default). + +o If the new option `-i' is used (only in SGR mode), grotty sends escape + sequences to set the italic font attribute instead of the underline + attribute for italic fonts. Note that many terminals don't have support + for this (including xterm). + +Grohtml +------- + +o Color support for glyphs has been added. + +o New option `-h' to select the style of headings in HTML output. + +o New option `-b' to set the background colour to white. + +o New options `-a' and `-g' to control the number of bits for anti-aliasing + used for text and graphics, respectively. Default value is 4; 0 means + no anti-aliasing. + +o groff character/glyph entities now map onto HTML 4 character entities. + +Grolbp +------ + +o Valid paper sizes are now specified as with the new `papersize' keyword + in the DESC file. Specifically, the old custom paper type format + `custAAAxBBB' is no longer supported. + +Miscellaneous +------------- + +o A new manual page `ditroff.7' is available. + +o The groff texinfo manual will now be installed, together with a bunch + of examples. + +o A new keyword `papersize' has been added to the DESC file format. Its + argument is either + + . a predefined paper format (e.g. `A4' or `letter') + + . a file name pointing to a file which must contain a paper size + specification in its first line (e.g. `/etc/papersize') + + . a custom paper size definition like `35c,4i' + + See groff_font(5) for more details. This keyword only affects the + physical dimensions of the output medium; grops, grolj4, and grolbp use it + currently. troff completely ignores it. VERSION 1.17.2 ============== @@ -27,8 +535,8 @@ o Two new requests `de1' and `am1' which are similar to `de' and `am' but o Added request `brp'. This is the same as `\p'. -o Similar to other versions of troff, `.ns' now works in all diversions, - not only in the top-level one. +o Similar to other versions of troff, the `ns' request now works in all + diversions, not only in the top-level one. o New read-only number register `.ns'. Returns 1 if in no-space mode, 0 otherwise. @@ -58,15 +566,15 @@ Groff o `-mFOO' now searches first for `FOO.tmac' and then for `tmac.FOO'. The old behaviour has been changed to overcome problems with platforms which have an 8+3 file name limit, and platforms which have other versions of - troff installed also. Additionally, all macro files have been renamed + troff installed also. Additionally, all macro files have been renamed using the latter scheme to avoid 8+3 name clashes. o The new environment variable GROFF_BIN_PATH is checked for programs groff is calling (preprocessors, troff, and output devices) before PATH. If not - set, it defaults to the directory where the groff binary is located. + set, it defaults to the directory where the groff binary is located. Previously, it was PATH only. The nroff script only uses GROFF_BIN_PATH to find the groff binary but passes both the GROFF_BIN_PATH and PATH - environment variable to groff. + environment variables to groff. Troff ----- @@ -75,11 +583,11 @@ o The mdoc package has been completely rewritten, using the full power of GNU troff to remove limitations of Unix troff (which is no longer supported). Most important changes are: - . No argument limit. - . Almost all macros are parsed and callable (if it makes sense). + . No argument limit + . Almost all macros are parsed and callable (if it makes sense) . `.Lb': prints library names . `.Nm ' now works as expected; `.Nm "" ' has - been withdrawn. + been withdrawn . Updated `.St' command . `.Fx': prints FreeBSD . `.Ox': prints OpenBSD @@ -87,18 +595,18 @@ o The mdoc package has been completely rewritten, using the full power of . `.Brq', `.Bro', `.Brc': brace enclosure macros . `.Bd -centered': center lines . `.Bl -xwidth ': interpret and use the resulting width - . support for double-sided printing (-rD1 command line switch) - . support for 11pt and 12pt document sizes (-rS11, -rS12 command line + . Support for double-sided printing (-rD1 command line switch) + . Support for 11pt and 12pt document sizes (-rS11, -rS12 command line switches) - `groff_mdoc.man' replaces `groff_mdoc.samples.man'; it now completely + `groff_mdoc.7' replaces `groff_mdoc.samples.7'; it now completely documents the mdoc package. Great care has been taken to assure backwards compatibility. If you encounter any abnormal results, please report them to bug-groff@gnu.org. o A new command line option for the `man' macros (similar to the `mdoc' - package has been implemented: `-rcR=1' (now the default in nroff mode) + package) has been implemented: `-rcR=1' (now the default in nroff mode) produces one single, very long page instead of multiple pages. `-rcR=0' deactivates it. @@ -194,6 +702,17 @@ o Two new requests `tm1' and `tmc' have been added to improve writing messages to the terminal. `tm1' is similar to `tm' but allows leading whitespace. `tmc' is similar to `tm1' but doesn't emit a final newline. +o For compatibility with sqtroff, the request `output' has been added. + The behaviour is similar to `\!' at the top-level, that is, it directly + inserts its argument into the intermediate output format. The syntax + is similar to .tm1, allowing leading whitespace. + +o The new `spreadwarn' request will make troff warn if spaces in an output + line are widened by a given limit or more. + +o Use `warnscale' to change the scaling indicator troff will use for + warning messages. + o A new request `dei' (define indirect) has been added. The first and second parameter of `dei' are taken from string registers rather than directly; this very special request is needed to make `trace.tmac' @@ -239,12 +758,12 @@ o The grog script now works in non-compatibility mode also (which is the Grops ----- -A new option `-P' resp. a new environment variable `GROPS_PROLOGUE' has been -added to select a different prologue file. +o A new option `-P' resp. a new environment variable `GROPS_PROLOGUE' has + been added to select a different prologue file. -The effect of the former `-mpsnew' option to access more Type 1 characters -is now the default and no longer available. To get the old behaviour (i.e., -emulation of some glyphs by composition) use `-mpsold'. +o The effect of the former `-mpsnew' option to access more Type 1 characters + is now the default and no longer available. To get the old behaviour + (i.e., emulation of some glyphs by composition) use `-mpsold'. Miscellaneous ------------- @@ -259,7 +778,7 @@ o For security reasons the following changes have been done: . Files specified with the .mso request or given with the `-m' command line option, and hyphenation patterns loaded with `.hpf' are no longer searched in the current directory by default (besides the usual tmac - path). Instead, the home directory is used. To add the current + path). Instead, the home directory is used. To add the current directory, either use the `-U' or `-M' command line option or set the GROFF_TMAC_PATH environment variable to an appropriate value. @@ -446,8 +965,8 @@ roff language), and roff.7 (a general survey on GNU troff). Miscellaneous ------------- -A port to win32 (for use with Microsoft Visual C++ 6.0) is now part of the -distribution. It has been contributed by Blake McBride +A partial port to win32 (for use with Microsoft Visual C++ 6.0) is now part +of the distribution. It has been contributed by Blake McBride . More information about programs, macros, documentation, etc., which is @@ -462,44 +981,43 @@ VERSION 1.12 ============ Finally, there are new maintainers for groff. Mailing lists and a CVS -repository are available also. See the file README for details. Not -all reported bug could be fixed, so please send mails again if -something is still not working. +repository are available also. See the file README for details. Not all +reported bugs could be fixed, so please send mails again if something is +still not working. Most of the installation problems should have vanished now (most notably the $(tmac_wrap) bug). -There is now a man page called groff_man.man which documents the -basics of the -man macros. It has been originally written by Susan -G. Kleinmann . +There is now a man page called groff_man.7 which documents the basics of the +-man macros. It has been originally written by Susan G. Kleinmann +. -A (still incomplete) groff reference manual in texinfo format -originally contributed by Trent A. Fisher . +A (still incomplete) groff reference manual in texinfo format originally +contributed by Trent A. Fisher . me.man and msafer.man have been renamed to groff_me.man resp. groff_msafer.man for consistency. -Default strings for macros in doc-common resp. tmac.an no longer -contain the word `UNIX'. +Default strings for macros in doc-common resp. tmac.an no longer contain the +word `UNIX'. groff should now be Y2k safe (fixes contributed by Paul Eggert ). -Following the GNU standards, groff will now use the prefix -`/usr/local/' as the default instead of replacing an existent groff -binary. +Following the GNU standards, groff will now use the prefix `/usr/local/' as +the default instead of replacing an existent groff binary. groff, troff, nroff, and pic now support the -U flag to activate unsafe -behaviour (without -msafer); the -S flag for using the -msafer macros -is now the default. +behaviour (without -msafer); the -S flag for using the -msafer macros is now +the default. Grohtml ------- -This is a new output device for producing HTML output contributed by -Gaius Mulley . It is still very alpha but has been -included into the distribution so that a lot of people have a chance -to test it. Bug reports are highly welcome. +This is a new output device for producing HTML output contributed by Gaius +Mulley . It is still very alpha but has been included +into the distribution so that a lot of people have a chance to test it. Bug +reports are highly welcome. Grolj4 ------ diff --git a/contrib/groff/PROBLEMS b/contrib/groff/PROBLEMS index 001610e..e3e6a7b 100644 --- a/contrib/groff/PROBLEMS +++ b/contrib/groff/PROBLEMS @@ -4,6 +4,13 @@ other improvements to this file are welcome. ---------------------------------------------------------------------- + + +Generic Problems +================ + + + * My document says that the current year is 19100, not 2000. In groff, as in traditional troff, the yr number register yields the @@ -28,151 +35,8 @@ or, if you want to be portable to older troff versions, as follows: ---------------------------------------------------------------------- -* I get lots of `numeric overflow' error messages whenever I run - groff; I compiled groff with AT&T C++ 2.0 with an ANSI C compiler. - -Make sure -DCFRONT_ANSI_BUG is included in DEFINES in the top-level -Makefile. If that doesn't solve the problem, define INT_MIN as --INT_MAX in libgroff/lib.h. - ----------------------------------------------------------------------- - -* I get errors when I try to compile groff with Sun C++ version 5.0 - or 5.1. - -This is a known problem; see Sun bug #4301919. As of this writing, no -patch is available. Use GCC 2.95.2 or later instead. - ----------------------------------------------------------------------- - -* I get errors when I try to compile groff with Sun C++ version 3 or - earlier. - -Groff requires header files that are moderately compatible with AT&T -C++ and ANSI C. With some versions of Sun C++, the supplied header -files need some of the following changes to meet this requirement: - must declare the mem* functions, (just add `#include -' to ); the first argument to fopen and freopen -should be declared as `const char *'; the first argument to fread -should be declared as `void *'; the first argument to fwrite should be -declared as `const void *'; malloc should be declared to return -`void *'; in , the declaration `extern "C" { void -*__builtin_alloca(int); }' should be added; in the -return type and the second argument type of signal() should be changed -to be `void (*)(int)'. - -You can either change them in place, or copy them to some other -directory and include that directory with a -I option. - ----------------------------------------------------------------------- - -* The configure script fails on OS/390 Unix. - -There is a bug in the Language Environment (LE) whereby the test -program for static destructors fails. You will see the message -'configure: error: a working C++ compiler is required' - -Applying PTF UQ42006 is supposed to fix this, but the test program is -still returning the wrong value (1). To work around this problem, you -can comment out the following in the configure script (near line 956). -This will effectively bypass the test (static constructors and -destructors do actually work properly): - -#if { (eval echo configure:957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -#then - echo "$ac_t""yes" 1>&6 -#else -# echo "configure: failed program was:" >&5 -# cat conftest.$ac_ext >&5 -# rm -fr conftest* -# echo "$ac_t""no" 1>&6;{ echo "configure: error: a working C++ compiler is required" 1>&2; exit 1; } -#fi - ----------------------------------------------------------------------- - -* I get errors when I try to compile groff with DEC C++. - -Fix the declaration of write() in so that the second -argument is a const char *. Fix the declaration of open() in - so that the first argument is a const char *. - ----------------------------------------------------------------------- - -* On a host using Unix make (e.g. Solaris), if you are compiling for - multiple architectures by building in a subdirectory, the make stops - with a message like this: - - make: Fatal error: Don't know how to make target `assert.o' - - or like this: - - make: Fatal error: Can't find /u/src/groff/src/include/Makefile.sub': No such file or directory - -This occurs because GNU make and Unix make handle VPATH differently, -and the groff build relies on GNU make's VPATH handling. - -Use GNU make to work around the problem. In Solaris 8, GNU make is -on the Software Companion CD and is installed as /opt/sfw/bin/gmake. - ----------------------------------------------------------------------- - -* On Ultrix, the make stops with the message - - *** Error code 1 - - Stop. - - for no apparent reason. - -Use GNU make. - ----------------------------------------------------------------------- - -* I'm having problems compiling groff on 386BSD 0.1. - -If you're using ash as /bin/sh, you'll need the following patch. - -*** gendef.sh.org Sun Jun 30 13:30:36 1991 ---- gendef.sh Sun Feb 28 10:23:49 1993 -*************** -*** 3,9 **** - file=$1 - shift - -! defs="#define $1" - shift - for def - do ---- 3,10 ---- - file=$1 - shift - -! x=$1 -! defs="#define $x" - shift - for def - do - -You'll also need to change dirnamemax.c so that it doesn't use -pathconf(). - ----------------------------------------------------------------------- - -* While compiling on Xenix, ranlib libgroff.a fails. - -The system ranlib can't handle externals longer than 40 characters. -Use the ranlib included in demon.co.uk:/pub/xenix/g++-1.40.3a.v1 -instead. - ----------------------------------------------------------------------- - -* There are many empty `Makefile.dep' files. Is this a bug? - -No. Real dependency files are created with a `make depend' call. - ----------------------------------------------------------------------- - -* Groff can't handle my troff document. It works fine with AT&T troff. +* groff can't handle my troff document. It works fine with AT&T + troff. Read the section on incompatibilities in gtroff(1). Try using the -C option. Alternatively there's the sed script `tmac/fixmacros.sed' @@ -181,6 +45,18 @@ with groff without the -C flag. ---------------------------------------------------------------------- +* gtroff doesn't understand lines like `.ce99' with no space between + the name of the request or macro and the arguments. + +gtroff requires a space between macro or request and its arguments +because it allows the use of long names for macros and requests. You +can use the -C option or the `cp' request to put gtroff into a +compatibility mode in which it is not possible to use long names for +macros but in which no space is required between macros and their +arguments. The use of compatibility mode is strongly discouraged. + +---------------------------------------------------------------------- + * groff -Tdvi produces dvi files that use fonts at weird magnifications. @@ -191,92 +67,17 @@ slow computers.) ---------------------------------------------------------------------- -* pic output is not centered horizontally; pictures sometimes run off - the bottom of the page. - -The macro package you are using is not supplying appropriate -definitions of PS and PE. Give groff a -mpic option. - ----------------------------------------------------------------------- - -* I'm having problems including PostScript illustrations using the - PSPIC macro. - -A PostScript document must meet three requirements in order to be -included with the PSPIC macro: it must comply with the Adobe Document -Structuring Conventions; it must contain a BoundingBox line; it must -be ``well-behaved''. The BoundingBox line should be of the form: - - %%BoundingBox: llx lly urx ury - -where llx, lly, urx, ury are the coordinates of the lower left x, -lower left y, upper right x, upper right y of the bounding box of -marks on the page expressed as integers in the default PostScript -coordinate system (72 units per inch, origin at bottom left corner). -A useful tactic is to print out the illustration by itself (you may -need to add a `showpage' at the end), and physically measure the -bounding box. For more detail on these requirements, read the -specification of Encapsulated PostScript format. (This is available -from the Adobe file server; send a message with a body of `help' to -ps-file-server@adobe.com.) - ----------------------------------------------------------------------- - -* I've configured groff for A4 paper, but gtroff still seems to think - that the length of a page (as returned by `\n(.p') is 11 inches. - -This is intentional. The PAGE option is used only by grops. For -compatibility with ditroff, the default page length in gtroff is -always 11 inches. The page length can be changed with the `pl' -request. - ----------------------------------------------------------------------- - -* groff produces wrapper macros for `ms' and friends which call the - system's original macros. Then, to get groff's ms macro package I - have to use `-mgs' instead `-ms'. Can I avoid this? - -Yes. Configure and compile groff as usual, but install it with - - make install tmac_wrap="" - -Then no wrapper files are produced, and `-ms' will use groff's `ms' -macros. - ----------------------------------------------------------------------- - * Groff doesn't use the font names I'm used to. Use the `ftr' request. See (g)troff(1). ---------------------------------------------------------------------- -* I get errors using the Unix -ms macros with groff -e -C. - -Apply this change: +* pic output is not centered horizontally; pictures sometimes run off + the bottom of the page. -*** /usr/lib/ms/ms.eqn Tue Apr 25 02:14:28 1989 ---- ms.eqn Sun Nov 11 10:33:59 1990 -*************** -*** 22,29 **** - .. - . \" EN - end of a displayed equation - .de EN -! .if !\\*(10 .br - .di - .rm EZ - .nr ZN \\n(dn - .if \\n(ZN>0 .if \\n(YE=0 .LP ---- 22,30 ---- - .. - . \" EN - end of a displayed equation - .de EN -! .if \\n(.k>0 .br - .di -+ .ds 10 \\*(EZ\\ - .rm EZ - .nr ZN \\n(dn - .if \\n(ZN>0 .if \\n(YE=0 .LP +The macro package you are using is not supplying appropriate +definitions of PS and PE. Give groff a -mpic option. ---------------------------------------------------------------------- @@ -295,67 +96,6 @@ join parameters to 1 while printing tpic specials. ---------------------------------------------------------------------- -* When I print the output groff -Tps, the output is always shifted up - by about 0.7 inches; I'm using 8.5x11 inch paper. - -Make sure that PAGE is defined to be `letter' in the top-level -Makefile. - ----------------------------------------------------------------------- - -* When I try to print the output of groff -Tps, I get no output at all - from the printer, and the log file shows the error - %%[ error: undefined; offendingcommand: BP ]%% - I'm using TranScript spooling software. - -This is a bug in the page reversal filter in early versions of -TranScript. Change the `broken' parameter in -/usr/local/lib/groff/font/devps/DESC to 7. - ----------------------------------------------------------------------- - -* When I preview groff -Tps output using the Sun OpenWindows 2.0 - pageview program, all the pages are displayed on top of each other. - -This is a defect in pageview. Change the `broken' parameter in -/usr/local/lib/groff/font/devps/DESC to 2. - ----------------------------------------------------------------------- - -* With groff -TX75, -TX100 or -X, I can only view the first page. - -The left mouse button brings up a menu that allows you to view other -pages. - ----------------------------------------------------------------------- - -* When I print the output of groff -Tdvi, I just get a black dot in - upper left corner. - -Some dvi drivers (notably early versions of xtex) do not correctly -handle dvi files that use a resolution different from that used by dvi -files produced by TeX. Try getting a more up to date driver. - ----------------------------------------------------------------------- - -* I get lots of errors when I use groff with the AT&T -mm macros. - -Use the groff -mm macros. - ----------------------------------------------------------------------- - -* gtroff doesn't understand lines like `.ce99' with no space between - the name of the request or macro and the arguments. - -gtroff requires a space between macro or request and its arguments -because it allows the use of long names for macros and requests. You -can use the -C option or the `cp' request to put gtroff into a -compatibility mode in which it is not possible to use long names for -macros but in which no space is required between macros and their -arguments. The use of compatibility mode is strongly discouraged. - ----------------------------------------------------------------------- - * gtroff gives warnings about lines like .ev \" a comment (with a tab after the .ev). @@ -394,6 +134,26 @@ to ---------------------------------------------------------------------- +* Where can I get grap? + +Ted Faber has written a freely available grap: + + http://www.lunabase.org/~faber/Vault/software/grap/ + +---------------------------------------------------------------------- + +* The \n(st and \n(sb registers don't seem to work. I thought \w set + them to the height and depth of its argument, but the registers + always seem to be 0. + +\n(st and \n(sb aren't supposed to give the height and depth of the +string rather they give the minimum and maximum vertical displacement +of the baseline. For example for \v'2u'\v'-3u', \n(st will be 1 and +\n(sb will be -2. The height and depth of the string is available in +the \n[rst] and \n[rsb] registers: these are groff extensions. + +---------------------------------------------------------------------- + * While formatting a manual page, groff complains about not being able to break lines. The problem seems to be caused by a line like: .TP \w'label'+2 @@ -416,57 +176,6 @@ The solution is to fix the manual page: ---------------------------------------------------------------------- -* I'm having problems formatting Ultrix man pages with groff -man. - -The Ultrix man pages use a number of non-standard extensions to the -Unix man macros. One solution is to use the Ultrix -man macros with -groff. Copy /usr/lib/tmac/tmac.an to -/usr/local/share/groff/site-tmac/an.tmac and apply the following patch -(from Frank Wortner): - -*** /usr/local/lib/groff/tmac/tmac.an Wed Sep 9 12:29:28 1992 ---- /usr/lib/tmac/tmac.an Fri Jul 24 19:58:19 1992 -*************** -*** 489,495 **** - . \" make special case of shift out of italic - .de }S - .ds ]F -! .if \\$12 .if !\\$5 .ds ]F \^ - .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9" - .el \\$3 - .}f ---- 489,495 ---- - . \" make special case of shift out of italic - .de }S - .ds ]F -! .if \\$12 .if !\\$5 .ds ]F\^ - .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9" - .el \\$3 - .}f - -Another possible solution is to install tmac/man.ultrix as -/usr/local/share/groff/site-tmac/man.local. - ----------------------------------------------------------------------- - -* I'm having problems formatting HP-UX 9.0 man pages with groff -man. - -Copy HP's tmac.an into /usr/local/share/groff/site-tmac/an.tmac, and -either put `.cp 1' at the beginning or filter it (and any files it .so's) -through tmac/fixmacros.sed. - ----------------------------------------------------------------------- - -* On HP-UX, the compiler complains about missing symbol `alloca'. - -Say - - export LDFLAGS=-lPW - -before starting the configure script. - ----------------------------------------------------------------------- - * I'm having problems formatting man pages produced by the perl wrapman script. @@ -546,25 +255,6 @@ following patch: $prog \\- whatever .SH SYNOPSIS - ----------------------------------------------------------------------- - -* When I preview documents using -TX75 or -TX100, the layout is not - the same as when I print the document with -Tps: the line and page - breaks come in different places. - -Use groff -X -Tps. - ----------------------------------------------------------------------- - -* When I try to run gxditview, I get the error: - Error: Widget viewport has zero width and/or height - -This error means you haven't correctly installed the application -defaults file, GXditview.ad; ``make install'' does this for you -automatically, so either you didn't do ``make install'', or you don't -have imake configured correctly. - ---------------------------------------------------------------------- * groff uses up an enormous amount of memory processing large files. @@ -602,13 +292,114 @@ and recompile groff: else exprstmt = 0; + + +Printing and Display Problems +============================= + + + +* I'm having problems including PostScript illustrations (EPS) using + the PSPIC macro and/or \X'ps: import ...'. + +A PostScript document must meet three requirements in order to be +included with the PSPIC macro: it must comply with the Adobe Document +Structuring Conventions; it must contain a BoundingBox line; it must +be ``well-behaved''. The BoundingBox line should be of the form: + + %%BoundingBox: llx lly urx ury + +where llx, lly, urx, ury are the coordinates of the lower left x, +lower left y, upper right x, upper right y of the bounding box of +marks on the page expressed as integers in the default PostScript +coordinate system (72 units per inch, origin at bottom left corner). + +The most convenient program to get the bounding box of a document is +the `ps2epsi' script coming with GhostScript. + +If you can't use this program, another useful tactic is to print out +the illustration by itself (you may need to add a `showpage' at the +end), and physically measure the bounding box. For more detail on +these requirements, read the specification of Encapsulated PostScript +format. (This is available from the Adobe file server; send a message +with a body of `help' to ps-file-server@adobe.com.) + +If an EPS file to be included via \X'ps: import' does not start with +%!PS-Adobe-...', gtroff will still include the file, but grops will +not add any fonts to the generated output file that are listed in the +EPS file, even though the files are listed in the `download' file and +are available in the devps directory. + +---------------------------------------------------------------------- + +* I've configured groff for A4 paper, but gtroff still seems to think + that the length of a page (as returned by `\n(.p') is 11 inches. + +This is intentional. The PAGE option is used only by grops. For +compatibility with ditroff, the default page length in gtroff is +always 11 inches. The page length can be changed with the `pl' +request. + +---------------------------------------------------------------------- + +* When I print the output groff -Tps, the output is always shifted up + by about 0.7 inches; I'm using 8.5x11 inch paper. + +Make sure that PAGE is defined to be `letter' in the top-level +Makefile. + +---------------------------------------------------------------------- + +* When I try to run gxditview, I get the error: + Error: Widget viewport has zero width and/or height + +This error means you haven't correctly installed the application +defaults file, GXditview.ad; ``make install'' does this for you +automatically, so either you didn't do ``make install'', or you don't +have imake configured correctly. + +---------------------------------------------------------------------- + +* When I preview documents using -TX75 or -TX100, the layout is not + the same as when I print the document with -Tps: the line and page + breaks come in different places. + +Use groff -X -Tps. + +---------------------------------------------------------------------- + +* When I try to print the output of groff -Tps, I get no output at all + from the printer, and the log file shows the error + %%[ error: undefined; offendingcommand: BP ]%% + I'm using TranScript spooling software. + +This is a bug in the page reversal filter in early versions of +TranScript. Change the `broken' parameter in +/usr/local/lib/groff/font/devps/DESC to 7. + +---------------------------------------------------------------------- + +* When I preview groff -Tps output using the Sun OpenWindows 2.0 + pageview program, all the pages are displayed on top of each other. + +This is a defect in pageview. Change the `broken' parameter in +/usr/local/lib/groff/font/devps/DESC to 2. + +---------------------------------------------------------------------- + +* With groff -TX75, -TX100 or -X, I can only view the first page. + +The left mouse button brings up a menu that allows you to view other +pages. + ---------------------------------------------------------------------- -* Where can I get grap? - -Ted Faber has written a freely available grap: +* When I print the output of groff -Tdvi, I just get a black dot in + upper left corner. - http://www.lunabase.org/~faber/Vault/software/grap/ +Some dvi drivers (notably early versions of xtex) do not correctly +handle dvi files that use a resolution different from that used by dvi +files produced by TeX. Try getting a more up to date driver. ---------------------------------------------------------------------- @@ -637,17 +428,99 @@ Structuring Conventions. The output generated by groff should be printable on any PostScript printer. Problems with groff output's not printing are most often caused by the spooling system. + + +Platform-Dependent Macro Problems +================================= + + + +* I get lots of errors when I use groff with the AT&T -mm macros. + +Use the groff -mm macros. + ---------------------------------------------------------------------- -* The \n(st and \n(sb registers don't seem to work. I thought \w set - them to the height and depth of its argument, but the registers - always seem to be 0. +* groff produces wrapper macros for `ms' and friends which call the + system's original macros. Then, to get groff's ms macro package I + have to use `-mgs' instead `-ms'. Can I avoid this? -\n(st and \n(sb aren't supposed to give the height and depth of the -string rather they give the minimum and maximum vertical displacement -of the baseline. For example for \v'2u'\v'-3u', \n(st will be 1 and -\n(sb will be -2. The height and depth of the string is available in -the \n[rst] and \n[rsb] registers: these are groff extensions. +Yes. Configure and compile groff as usual, but install it with + + make install tmac_wrap="" + +Then no wrapper files are produced, and `-ms' will use groff's `ms' +macros. + +---------------------------------------------------------------------- + +* I'm having problems formatting HP-UX 9.0 man pages with groff -man. + +Copy HP's tmac.an into /usr/local/share/groff/site-tmac/an.tmac, and +either put `.cp 1' at the beginning or filter it (and any files it +.so's) through tmac/fixmacros.sed. + +---------------------------------------------------------------------- + +* I get errors using the Unix -ms macros with groff -e -C. + +Apply this change: + +*** /usr/lib/ms/ms.eqn Tue Apr 25 02:14:28 1989 +--- ms.eqn Sun Nov 11 10:33:59 1990 +*************** +*** 22,29 **** + .. + . \" EN - end of a displayed equation + .de EN +! .if !\\*(10 .br + .di + .rm EZ + .nr ZN \\n(dn + .if \\n(ZN>0 .if \\n(YE=0 .LP +--- 22,30 ---- + .. + . \" EN - end of a displayed equation + .de EN +! .if \\n(.k>0 .br + .di ++ .ds 10 \\*(EZ\\ + .rm EZ + .nr ZN \\n(dn + .if \\n(ZN>0 .if \\n(YE=0 .LP + +---------------------------------------------------------------------- + +* I'm having problems formatting Ultrix man pages with groff -man. + +The Ultrix man pages use a number of non-standard extensions to the +Unix man macros. One solution is to use the Ultrix -man macros with +groff. Copy /usr/lib/tmac/tmac.an to +/usr/local/share/groff/site-tmac/an.tmac and apply the following patch +(from Frank Wortner): + +*** /usr/local/lib/groff/tmac/tmac.an Wed Sep 9 12:29:28 1992 +--- /usr/lib/tmac/tmac.an Fri Jul 24 19:58:19 1992 +*************** +*** 489,495 **** + . \" make special case of shift out of italic + .de }S + .ds ]F +! .if \\$12 .if !\\$5 .ds ]F \^ + .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9" + .el \\$3 + .}f +--- 489,495 ---- + . \" make special case of shift out of italic + .de }S + .ds ]F +! .if \\$12 .if !\\$5 .ds ]F\^ + .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9" + .el \\$3 + .}f + +Another possible solution is to install tmac/man.ultrix as +/usr/local/share/groff/site-tmac/man.local. ---------------------------------------------------------------------- @@ -727,3 +600,186 @@ To get PostScript output from 'man -t', you also need to create a # This shell script is intended for use with man, so warnings are ! # probably not wanted. ! exec groff -Wall $T $opts $rest + + + +Compilation Problems +==================== + + + +* Compilation dies with + + y.tab.c: In function `int yyparse()': + y.tab.c: `size_t' undeclared in namespace `std' + +This is a bug in bison 1.32. Don't use this version. 1.28 or 1.33 works +fine. Alternatively, use yacc or byacc. + +---------------------------------------------------------------------- + +* There are many empty `Makefile.dep' files. Is this a bug? + +No. Real dependency files are created with a `make depend' call. + +---------------------------------------------------------------------- + +* On HP-UX, the compiler complains about missing symbol `alloca'. + +Say + + export LDFLAGS=-lPW + +before starting the configure script. + +---------------------------------------------------------------------- + +* The configure script fails on OS/390 (z/OS) Unix. + +[This has been fixed in z/OS V1R3 (aka OS/390 R13).] + +There is a bug in the Language Environment (LE) whereby the test +program for static destructors fails. You will see the message +`configure: error: a working C++ compiler is required' + +Applying PTF UQ42006 is supposed to fix this, but the test program is +still returning the wrong value (1). To work around this problem, you +can comment out the following in the configure script (near line 2029). +This will effectively bypass the test (static constructors and +destructors do actually work properly): + +#if { (eval echo "$as_me:2029: \"$ac_link\"") >&5 +# (eval $ac_link) 2>&5 +# ac_status=$? +# echo "$as_me:2032: \$? = $ac_status" >&5 +# (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +# { (eval echo "$as_me:2034: \"$ac_try\"") >&5 +# (eval $ac_try) 2>&5 +# ac_status=$? +# echo "$as_me:2037: \$? = $ac_status" >&5 +# (exit $ac_status); }; }; then +# echo "$as_me:2039: result: yes" >&5 +#echo "${ECHO_T}yes" >&6 +#else +# echo "$as_me: program exited with status $ac_status" >&5 +#echo "$as_me: failed program was:" >&5 +#cat conftest.$ac_ext >&5 +#echo "$as_me:2045: result: no" >&5 +#echo "${ECHO_T}no" >&6;{ { echo "$as_me:2046: error: a working C++ compiler is required" >&5 +#echo "$as_me: error: a working C++ compiler is required" >&2;} +# { (exit 1); exit 1; }; } +#fi + +---------------------------------------------------------------------- + +* I get errors when I try to compile groff with DEC C++. + +Fix the declaration of write() in so that the second +argument is a const char *. Fix the declaration of open() in + so that the first argument is a const char *. + +---------------------------------------------------------------------- + +* On a host using Unix make (e.g. Solaris), if you are compiling for + multiple architectures by building in a subdirectory, the make stops + with a message like this: + + make: Fatal error: Don't know how to make target `assert.o' + + or like this: + + make: Fatal error: Can't find /u/src/groff/src/include/Makefile.sub': No such file or directory + +This occurs because GNU make and Unix make handle VPATH differently, +and the groff build relies on GNU make's VPATH handling. + +Use GNU make to work around the problem. In Solaris 8, GNU make is +on the Software Companion CD and is installed as /opt/sfw/bin/gmake. + +---------------------------------------------------------------------- + +* On Ultrix, the make stops with the message + + *** Error code 1 + + Stop. + + for no apparent reason. + +Use GNU make. + +---------------------------------------------------------------------- + +* I'm having problems compiling groff on 386BSD 0.1. + +If you're using ash as /bin/sh, you'll need the following patch. + +*** gendef.sh.org Sun Jun 30 13:30:36 1991 +--- gendef.sh Sun Feb 28 10:23:49 1993 +*************** +*** 3,9 **** + file=$1 + shift + +! defs="#define $1" + shift + for def + do +--- 3,10 ---- + file=$1 + shift + +! x=$1 +! defs="#define $x" + shift + for def + do + +You'll also need to change dirnamemax.c so that it doesn't use +pathconf(). + +---------------------------------------------------------------------- + +* While compiling on Xenix, ranlib libgroff.a fails. + +The system ranlib can't handle externals longer than 40 characters. +Use the ranlib included in demon.co.uk:/pub/xenix/g++-1.40.3a.v1 +instead. + +---------------------------------------------------------------------- + +* I get errors when I try to compile groff with Sun C++ version 3 or + earlier. + +Groff requires header files that are moderately compatible with AT&T +C++ and ANSI C. With some versions of Sun C++, the supplied header +files need some of the following changes to meet this requirement: + must declare the mem* functions, (just add `#include +' to ); the first argument to fopen and freopen +should be declared as `const char *'; the first argument to fread +should be declared as `void *'; the first argument to fwrite should be +declared as `const void *'; malloc should be declared to return +`void *'; in , the declaration `extern "C" { void +*__builtin_alloca(int); }' should be added; in the +return type and the second argument type of signal() should be changed +to be `void (*)(int)'. + +You can either change them in place, or copy them to some other +directory and include that directory with a -I option. + +---------------------------------------------------------------------- + +* I get errors when I try to compile groff with Sun C++ version 5.0 + or 5.1. + +This is a known problem; see Sun bug #4301919. As of this writing, no +patch is available. Use GCC 2.95.2 or later instead. + +---------------------------------------------------------------------- + +* I get lots of `numeric overflow' error messages whenever I run + groff; I compiled groff with AT&T C++ 2.0 with an ANSI C compiler. + +Make sure -DCFRONT_ANSI_BUG is included in DEFINES in the top-level +Makefile. If that doesn't solve the problem, define INT_MIN as +-INT_MAX in libgroff/lib.h. diff --git a/contrib/groff/README b/contrib/groff/README index 88f8f87..fffada7 100644 --- a/contrib/groff/README +++ b/contrib/groff/README @@ -72,7 +72,7 @@ Three mailing lists are available: commitments to the CVS repository Note that groff@gnu.org is an alias for groff@ffii.org; you must be -subscribed to the `groff' and `groff-commit' lists to send mails. +subscribed to the `groff' list to send mails. To subscribe, send a mail to -request@ (example: groff-request@ffii.org) with the word `subscribe' in either the subject diff --git a/contrib/groff/REVISION b/contrib/groff/REVISION index 0cfbf08..d00491f 100644 --- a/contrib/groff/REVISION +++ b/contrib/groff/REVISION @@ -1 +1 @@ -2 +1 diff --git a/contrib/groff/VERSION b/contrib/groff/VERSION index b48f322..adc97d8 100644 --- a/contrib/groff/VERSION +++ b/contrib/groff/VERSION @@ -1 +1 @@ -1.17 +1.18 diff --git a/contrib/groff/aclocal.m4 b/contrib/groff/aclocal.m4 index 83a6839..c3e6b64 100644 --- a/contrib/groff/aclocal.m4 +++ b/contrib/groff/aclocal.m4 @@ -1,5 +1,5 @@ dnl Autoconf macros for groff. -dnl Copyright (C) 1989-1995, 2001 Free Software Foundation, Inc. +dnl Copyright (C) 1989-1995, 2001, 2002 Free Software Foundation, Inc. dnl dnl This file is part of groff. dnl @@ -58,6 +58,31 @@ AC_DEFUN(GROFF_PROG_YACC, [AC_CHECK_PROGS(YACC, byacc 'bison -y', yacc)])dnl dnl dnl +dnl The following programs are needed for grohtml. +dnl +AC_DEFUN(GROFF_HTML_PROGRAMS, +[make_html=html +make_install_html=install_html +AC_CHECK_PROG(pnmcut, pnmcut, found, missing) +AC_CHECK_PROG(pnmcrop, pnmcrop, found, missing) +AC_CHECK_PROG(pnmtopng, pnmtopng, found, missing) +AC_CHECK_PROG(gs, gs gsos2, found, missing) +AC_CHECK_PROG(psselect, psselect, found, missing) +case "x$pnmcut$pnmcrop$pnmtopng$gs$psselect" in +*missing*) + make_html= + make_install_html= + AC_MSG_WARN([ + + Since one or more of the above five programs can't be found in the path, + the HTML backend of groff (grohtml) won't work properly. Consequently, + no documentation in HTML format is built and installed. +]) ;; +esac +AC_SUBST(make_html) +AC_SUBST(make_install_html)])dnl +dnl +dnl dnl GROFF_CSH_HACK(if hack present, if not present) dnl AC_DEFUN(GROFF_CSH_HACK, @@ -86,7 +111,8 @@ if grep '[34]\.' /usr/options/cb.name >/dev/null 2>&1 changequote([,])dnl then AC_MSG_RESULT(yes) - AC_DEFINE(_SYSV3) + AC_DEFINE(_SYSV3, 1, + [Define if you have ISC 3.x or 4.x.]) else AC_MSG_RESULT(no) fi])dnl @@ -97,7 +123,8 @@ AC_DEFUN(GROFF_POSIX, AC_LANG_PUSH(C++) AC_TRY_COMPILE([#include extern "C" { void fileno(int); }],, -AC_MSG_RESULT(yes);AC_DEFINE(_POSIX_SOURCE), +AC_MSG_RESULT(yes);AC_DEFINE(_POSIX_SOURCE, 1, + [Define if -D_POSIX_SOURCE is necessary.]), AC_MSG_RESULT(no)) AC_LANG_POP(C++)])dnl dnl @@ -109,7 +136,8 @@ AC_DEFUN(GROFF_SRAND, AC_MSG_CHECKING([for return type of srand]) AC_TRY_COMPILE([#include extern "C" { void srand(unsigned int); }],, -AC_MSG_RESULT(void);AC_DEFINE(RET_TYPE_SRAND_IS_VOID), +AC_MSG_RESULT(void);AC_DEFINE(RET_TYPE_SRAND_IS_VOID, 1, + [Define if srand() returns void not int.]), AC_MSG_RESULT(int)) AC_LANG_POP(C++)])dnl dnl @@ -120,7 +148,9 @@ AC_MSG_CHECKING([for sys_nerr in or ]) AC_TRY_COMPILE([#include #include ], [int k; k = sys_nerr;], -AC_MSG_RESULT(yes);AC_DEFINE(HAVE_SYS_NERR), +AC_MSG_RESULT(yes);AC_DEFINE(HAVE_SYS_NERR, 1, + [Define if you have sysnerr in or + .]), AC_MSG_RESULT(no)) AC_LANG_POP(C++)])dnl dnl @@ -130,7 +160,9 @@ AC_DEFUN(GROFF_SYS_ERRLIST, AC_TRY_COMPILE([#include #include ], [int k; k = (int)sys_errlist[0];], -AC_MSG_RESULT(yes);AC_DEFINE(HAVE_SYS_ERRLIST), +AC_MSG_RESULT(yes);AC_DEFINE(HAVE_SYS_ERRLIST, 1, + [Define if you have sys_errlist in + or in .]), AC_MSG_RESULT(no))])dnl dnl dnl @@ -139,7 +171,8 @@ AC_DEFUN(GROFF_OSFCN_H, AC_MSG_CHECKING([C++ ]) AC_TRY_COMPILE([#include ], [read(0, 0, 0); open(0, 0);], -AC_MSG_RESULT(yes);AC_DEFINE(HAVE_CC_OSFCN_H), +AC_MSG_RESULT(yes);AC_DEFINE(HAVE_CC_OSFCN_H, 1, + [Define if you have a C++ .]), AC_MSG_RESULT(no)) AC_LANG_POP(C++)])dnl dnl @@ -149,7 +182,8 @@ AC_DEFUN(GROFF_LIMITS_H, AC_MSG_CHECKING([C++ ]) AC_TRY_COMPILE([#include ], [int x = INT_MIN; int y = INT_MAX; int z = UCHAR_MAX;], -AC_MSG_RESULT(yes);AC_DEFINE(HAVE_CC_LIMITS_H), +AC_MSG_RESULT(yes);AC_DEFINE(HAVE_CC_LIMITS_H, 1, + [Define if you have a C++ .]), AC_MSG_RESULT(no)) AC_LANG_POP(C++)])dnl dnl @@ -160,7 +194,9 @@ AC_MSG_CHECKING([for declaration of time_t]) AC_TRY_COMPILE([#include ], [time_t t = time(0); struct tm *p = localtime(&t);], AC_MSG_RESULT(yes), -AC_MSG_RESULT(no);AC_DEFINE(LONG_FOR_TIME_T)) +AC_MSG_RESULT(no);AC_DEFINE(LONG_FOR_TIME_T, 1, + [Define if localtime() takes a long * not a + time_t *.])) AC_LANG_POP(C++)])dnl dnl dnl @@ -168,18 +204,19 @@ AC_DEFUN(GROFF_STRUCT_EXCEPTION, [AC_MSG_CHECKING([struct exception]) AC_TRY_COMPILE([#include ], [struct exception e;], -AC_MSG_RESULT(yes);AC_DEFINE(HAVE_STRUCT_EXCEPTION), +AC_MSG_RESULT(yes);AC_DEFINE(HAVE_STRUCT_EXCEPTION, 1, + [Define if defines struct exception.]), AC_MSG_RESULT(no))])dnl dnl dnl AC_DEFUN(GROFF_ARRAY_DELETE, [AC_LANG_PUSH(C++) AC_MSG_CHECKING([whether ANSI array delete syntax supported]) -AC_TRY_COMPILE(, -changequote(,)dnl -char *p = new char[5]; delete [] p;changequote([,]), +AC_TRY_COMPILE(, [char *p = new char[5]; delete [] p;], AC_MSG_RESULT(yes), -AC_MSG_RESULT(no);AC_DEFINE(ARRAY_DELETE_NEEDS_SIZE)) +AC_MSG_RESULT(no);AC_DEFINE(ARRAY_DELETE_NEEDS_SIZE, 1, + [Define if your C++ doesn't understand + `delete []'.])) AC_LANG_POP(C++)])dnl dnl dnl @@ -188,7 +225,9 @@ AC_DEFUN(GROFF_TRADITIONAL_CPP, [AC_LANG_PUSH(C++) AC_MSG_CHECKING([traditional preprocessor]) AC_TRY_COMPILE([#define name2(a,b) a/**/b],[int name2(foo,bar);], -AC_MSG_RESULT(yes);AC_DEFINE(TRADITIONAL_CPP), +AC_MSG_RESULT(yes);AC_DEFINE(TRADITIONAL_CPP, 1, + [Define if your C++ compiler uses a + traditional (Reiser) preprocessor.]), AC_MSG_RESULT(no)) AC_LANG_POP(C++)])dnl dnl @@ -207,7 +246,11 @@ main() exit(i != 0200); #endif }], -AC_MSG_RESULT(yes);AC_DEFINE(WCOREFLAG,0200), +AC_MSG_RESULT(yes);AC_DEFINE(WCOREFLAG, 0200, + [Define if the 0200 bit of the status returned + by wait() indicates whether a core image was + produced for a process that was terminated by + a signal.]), AC_MSG_RESULT(no), AC_MSG_RESULT(no))])dnl dnl @@ -221,23 +264,32 @@ dnl dnl AC_DEFUN(GROFF_PAGE, [AC_MSG_CHECKING([default paper size]) +groff_prefix=$prefix +test "x$prefix" = xNONE && groff_prefix=$ac_default_prefix if test -z "$PAGE"; then descfile= - if test -r $prefix/share/groff/font/devps/DESC; then - descfile=$prefix/share/groff/font/devps/DESC - elif test -r $prefix/lib/groff/font/devps/DESC; then - descfile=$prefix/lib/groff/font/devps/DESC + if test -r $groff_prefix/share/groff/font/devps/DESC; then + descfile=$groff_prefix/share/groff/font/devps/DESC + elif test -r $groff_prefix/lib/groff/font/devps/DESC; then + descfile=$groff_prefix/lib/groff/font/devps/DESC else - for f in $prefix/share/groff/*/font/devps/DESC; do + for f in $groff_prefix/share/groff/*/font/devps/DESC; do if test -r $f; then descfile=$f break fi done fi - if test -n "$descfile" \ - && grep "^paperlength 841890" $descfile >/dev/null 2>&1; then - PAGE=A4 + if test -n "$descfile"; then +changequote(,)dnl + if grep '^paperlength[ ]\+841890' $descfile + >/dev/null 2>&1; then + PAGE=A4 + elif grep '^papersize[ ]\+[aA]4' $descfile \ + >/dev/null 2>&1; then + PAGE=A4 + fi +changequote([,])dnl fi fi if test -z "$PAGE"; then @@ -260,6 +312,10 @@ changequote(,)dnl changequote([,])dnl fi test -n "$PAGE" || PAGE=letter +if test "x$PAGE" = "xA4"; then + AC_DEFINE(PAGEA4, 1, + [Define if the printer's page size is A4.]) +fi AC_MSG_RESULT($PAGE) AC_SUBST(PAGE)])dnl dnl @@ -380,6 +436,12 @@ ac_dir=`cd $ac_aux_dir; pwd` ac_install_sh="$ac_dir/install-sh -c"])dnl dnl dnl +dnl Test whether install-info is available. +dnl +AC_DEFUN(GROFF_INSTALL_INFO, +[AC_CHECK_PROGS(INSTALL_INFO, install-info, :)])dnl +dnl +dnl dnl At least one UNIX system, Apple Macintosh Rhapsody 5.5, dnl does not have -lm. dnl @@ -398,8 +460,8 @@ dnl dnl This simplifies Makefile rules. dnl AC_DEFUN(GROFF_BUILDDIR, -[top_builddir=`pwd` -AC_SUBST(top_builddir)])dnl +[groff_top_builddir=`pwd` +AC_SUBST(groff_top_builddir)])dnl dnl dnl dnl Check for EBCDIC - stolen from the OS390 Unix LYNX port @@ -416,11 +478,14 @@ make an error "Character set is not EBCDIC" groff_cv_ebcdic="yes" TTYDEVDIRS="font/devcp1047" AC_MSG_RESULT(yes) - AC_DEFINE(IS_EBCDIC_HOST), + AC_DEFINE(IS_EBCDIC_HOST, 1, + [Define if the host's encoding is EBCDIC.]), groff_cv_ebcdic="no" - TTYDEVDIRS="font/devascii font/devlatin1 font/devutf8" + TTYDEVDIRS="font/devascii font/devlatin1" + OTHERDEVDIRS="font/devlj4 font/devlbp" AC_MSG_RESULT(no)) -AC_SUBST(TTYDEVDIRS)])dnl +AC_SUBST(TTYDEVDIRS) +AC_SUBST(OTHERDEVDIRS)])dnl dnl dnl dnl Check for OS/390 Unix. We test for EBCDIC also -- the Linux port (with @@ -458,29 +523,85 @@ AC_CACHE_VAL(groff_cv_decl_needed_$1, #ifdef HAVE_STDLIB_H #include #endif +#ifdef HAVE_SYS_TIME_H +#include +#endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_MATH_H #include #endif], -[char *(*pfn) = (char *(*)) $1], +[#ifndef $1 + char *p = (char *) $1; +#endif], groff_cv_decl_needed_$1=no, groff_cv_decl_needed_$1=yes)]) AC_MSG_RESULT($groff_cv_decl_needed_$1) if test $groff_cv_decl_needed_$1 = yes; then - AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z])) + AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1, + [Define if your C++ doesn't declare ]$1[().]) fi AC_LANG_POP(C++)])dnl dnl dnl -dnl Check for mkstemp() and its function prototype. +dnl If mkstemp() isn't available, use our own mkstemp.cc file. dnl AC_DEFUN(GROFF_MKSTEMP, -[AC_CHECK_FUNC(mkstemp, -[AC_DEFINE(HAVE_MKSTEMP) -AC_MSG_CHECKING([for mkstemp prototype in ]) -AC_EGREP_CPP(mkstemp, -[#include ], -AC_MSG_RESULT(yes);AC_DEFINE(HAVE_MKSTEMP_PROTO), -AC_MSG_RESULT(no))])]) +[AC_MSG_CHECKING([for mkstemp]) +AC_LANG_PUSH(C++) +AC_LIBSOURCE(mkstemp.cc) +AC_TRY_LINK([#include +#include +int (*f) (char *);], +[f = mkstemp;], +AC_MSG_RESULT(yes);AC_DEFINE(HAVE_MKSTEMP, 1, + [Define if you have mkstemp().]), +AC_MSG_RESULT(no);_AC_LIBOBJ(mkstemp)) +AC_LANG_POP(C++)])dnl +dnl +dnl +dnl Test whether exists, doesn't clash with , +dnl and declares uintmax_t. Taken from the fileutils package. +dnl +AC_DEFUN(GROFF_INTTYPES_H, +[AC_LANG_PUSH(C++) +AC_MSG_CHECKING([for inttypes.h]) +AC_TRY_COMPILE([#include +#include ], +[uintmax_t i = (uintmax_t)-1;], +groff_cv_header_inttypes_h=yes, +groff_cv_header_inttypes_h=no) +AC_MSG_RESULT($groff_cv_header_inttypes_h) +AC_LANG_POP(C++)])dnl +dnl +dnl +dnl Test for working `unsigned long long'. Taken from the fileutils package. +dnl +AC_DEFUN(GROFF_UNSIGNED_LONG_LONG, +[AC_LANG_PUSH(C++) +AC_MSG_CHECKING([for unsigned long long]) +AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], +[unsigned long long ullmax = (unsigned long long)-1; +return ull << i | ull >> i | ullmax / ull | ullmax % ull;], +groff_cv_type_unsigned_long_long=yes, +groff_cv_type_unsigned_long_long=no) +AC_MSG_RESULT($groff_cv_type_unsigned_long_long) +AC_LANG_POP(C++)])dnl +dnl +dnl +dnl Define uintmax_t to `unsigned long' or `unsigned long long' +dnl if does not exist. Taken from the fileutils package. +dnl +AC_DEFUN(GROFF_UINTMAX_T, +[AC_REQUIRE([GROFF_INTTYPES_H]) +if test $groff_cv_header_inttypes_h = no; then + AC_REQUIRE([GROFF_UNSIGNED_LONG_LONG]) + test $groff_cv_type_unsigned_long_long = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, + [Define uintmax_t to `unsigned long' or + `unsigned long long' if does not + exist.]) +fi])dnl diff --git a/contrib/groff/configure b/contrib/groff/configure index e5b6580..fc28d84 100755 --- a/contrib/groff/configure +++ b/contrib/groff/configure @@ -1,22 +1,192 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by Autoconf 2.50. +# Generated by GNU Autoconf 2.54. # -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + # Name of the executable. -as_me=`echo "$0" |sed 's,.*[\\/],,'` +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conftest.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr @@ -42,24 +212,20 @@ else fi rm -f conf$$ conf$$.exe conf$$.file -as_executable_p="test -f" - -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: else - as_unset=false + as_mkdir_p=false fi -# NLS nuisances. -$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } -$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } -$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } -$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } -$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } -$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } -$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } -$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + # IFS # We need space, tab and new line, in precisely that order. @@ -68,7 +234,8 @@ as_nl=' IFS=" $as_nl" # CDPATH. -$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } +$as_unset CDPATH + # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -81,9 +248,11 @@ exec 6>&1 # Initializations. # ac_default_prefix=/usr/local +ac_config_libobj_dir=. cross_compiling=no subdirs= -MFLAGS= MAKEFLAGS= +MFLAGS= +MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. @@ -91,17 +260,53 @@ SHELL=${CONFIG_SHELL-/bin/sh} # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} -# Avoid depending upon Character Ranges. -ac_cr_az='abcdefghijklmnopqrstuvwxyz' -ac_cr_AZ='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -ac_cr_09='0123456789' -ac_cr_alnum=$ac_cr_az$ac_cr_AZ$ac_cr_09 - -# Sed expression to map a string onto a valid sh and CPP variable names. -ac_tr_sh="sed y%*+%pp%;s%[^_$ac_cr_alnum]%_%g" -ac_tr_cpp="sed y%*$ac_cr_az%P$ac_cr_AZ%;s%[^_$ac_cr_alnum]%_%g" +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= ac_unique_file="src/roff/groff/groff.cc" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS groff_top_builddir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX TTYDEVDIRS OTHERDEVDIRS LPR LP LPQ PSPRINT DVIPRINT PERLPATH YACC RANLIB ac_ct_RANLIB INSTALL_INFO INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SH_SCRIPT_SED_CMD CPP EGREP LIBM LIBOBJS BROKEN_SPOOLER_FLAGS PAGE g sys_tmac_prefix tmac_wrap pnmcut pnmcrop pnmtopng gs psselect make_html make_install_html LTLIBOBJS' +ac_subst_files='' # Initialize some variables set by options. ac_init_help= @@ -141,13 +346,6 @@ oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - ac_prev= for ac_option do @@ -193,7 +391,7 @@ do -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$ac_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` @@ -202,7 +400,7 @@ do -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$ac_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` @@ -280,7 +478,7 @@ do with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -384,7 +582,7 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$ac_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` @@ -397,7 +595,7 @@ do -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$ac_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` @@ -429,7 +627,7 @@ Try \`$0 --help' for more information." >&2 *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$ac_cr_alnum]" >/dev/null && + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` @@ -439,7 +637,7 @@ Try \`$0 --help' for more information." >&2 *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$ac_cr_alnum]" >/dev/null && + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -454,26 +652,36 @@ if test -n "$ac_prev"; then fi # Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir \ - exec_prefix prefix + localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; - NONE ) ;; - *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. +# FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias -# FIXME: should be removed in autoconf 3.0. +# FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe @@ -489,13 +697,23 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. @@ -505,13 +723,16 @@ else fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else - { echo "$as_me: error: cannot find sources in $srcdir" >&2 + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias @@ -560,7 +781,7 @@ ac_cv_env_CPP_value=$CPP if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. - cat <&2 + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done @@ -675,31 +916,31 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then - cat <<\EOF + cat <<\_ACEOF -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -EOF +_ACEOF exit 0 fi exec 5>config.log -cat >&5 <&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.50. Invocation command line was +generated by GNU Autoconf 2.54. Invocation command line was $ $0 $@ -EOF +_ACEOF { cat <<_ASUNAME -## ---------- ## -## Platform. ## -## ---------- ## +## --------- ## +## Platform. ## +## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` @@ -718,17 +959,27 @@ hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` -PATH = $PATH - _ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + } >&5 -cat >&5 <&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF -EOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. @@ -739,62 +990,99 @@ for ac_arg do case $ac_arg in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; + | --no-cr | --no-c | -n ) continue ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - ac_sep=" " ;; - *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" - ac_sep=" " ;; + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. + ac_sep=" " done # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. - echo >&5 - echo "## ----------------- ##" >&5 - echo "## Cache variables. ##" >&5 - echo "## ----------------- ##" >&5 - echo >&5 - # The following way of writing the cache mishandles newlines in values, + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ - "s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; -} >&5 - sed "/^$/d" confdefs.h >conftest.log - if test -s conftest.log; then - echo >&5 - echo "## ------------ ##" >&5 - echo "## confdefs.h. ##" >&5 - echo "## ------------ ##" >&5 - echo >&5 - cat conftest.log >&5 - fi - (echo; echo) >&5 - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" >&5 - echo "$as_me: exit $exit_status" >&5 - rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core core.* *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_status=$?; ac_signal='$ac_signal'; { (exit $ac_status); exit $ac_status; }' $ac_signal + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 @@ -803,6 +1091,33 @@ rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then @@ -814,9 +1129,9 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - { echo "$as_me:817: loading site script $ac_site_file" >&5 + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} - cat "$ac_site_file" >&5 + sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done @@ -825,7 +1140,7 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:828: loading cache $cache_file" >&5 + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; @@ -833,14 +1148,14 @@ echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { echo "$as_me:836: creating cache $cache_file" >&5 + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. -ac_suggest_removing_cache=false +ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set @@ -849,31 +1164,44 @@ for ac_var in `(set) 2>&1 | eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:852: WARNING: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: WARNING: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_suggest_removing_cache=: ;; + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; ,set) - { echo "$as_me:856: WARNING: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: WARNING: \`$ac_var' was not set in the previous run" >&2;} - ac_suggest_removing_cache=: ;; + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:862: WARNING: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: WARNING: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:864: WARNING: former value: $ac_old_val" >&5 -echo "$as_me: WARNING: former value: $ac_old_val" >&2;} - { echo "$as_me:866: WARNING: current value: $ac_new_val" >&5 -echo "$as_me: WARNING: current value: $ac_new_val" >&2;} - ac_suggest_removing_cache=: + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: fi;; esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi done -if $ac_suggest_removing_cache; then - { echo "$as_me:873: WARNING: changes in the environment can compromise the build" >&5 -echo "$as_me: WARNING: changes in the environment can compromise the build" >&2;} - { echo "$as_me:875: WARNING: consider removing $cache_file and starting over" >&5 -echo "$as_me: WARNING: consider removing $cache_file and starting over" >&2;} +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c @@ -882,30 +1210,30 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac -echo "#! $SHELL" >conftest.sh -echo "exit 0" >>conftest.sh -chmod +x conftest.sh -if { (echo "$as_me:894: PATH=\".;.\"; conftest.sh") >&5 - (PATH=".;."; conftest.sh) 2>&5 - ac_status=$? - echo "$as_me:897: \$? = $ac_status" >&5 - (exit $ac_status); }; then - ac_path_separator=';' -else - ac_path_separator=: -fi -PATH_SEPARATOR="$ac_path_separator" -rm -f conftest.sh + + + + + + + + + + + + + + + + + + + ac_config_headers="$ac_config_headers src/include/config.h:src/include/config.hin" + ac_srcdir_defaulted=no srcdir=`cd $srcdir; pwd` -top_builddir=`pwd` +groff_top_builddir=`pwd` ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -915,7 +1243,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:918: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -923,25 +1251,28 @@ else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="${ac_tool_prefix}gcc" -echo "$as_me:933: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:941: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:944: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -950,7 +1281,7 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:953: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -958,25 +1289,28 @@ else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="gcc" -echo "$as_me:968: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:976: result: $ac_ct_CC" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:979: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -989,7 +1323,7 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:992: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -997,25 +1331,28 @@ else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="${ac_tool_prefix}cc" -echo "$as_me:1007: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1015: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1018: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1024,7 +1361,7 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1027: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1032,25 +1369,28 @@ else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="cc" -echo "$as_me:1042: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1050: result: $ac_ct_CC" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1053: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1063,7 +1403,7 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1066: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1072,19 +1412,22 @@ else ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue -fi -ac_cv_prog_CC="cc" -echo "$as_me:1086: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done if test $ac_prog_rejected = yes; then @@ -1096,19 +1439,17 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - set dummy "$ac_dir/$ac_word" ${1+"$@"} - shift - ac_cv_prog_CC="$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1108: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1111: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1119,7 +1460,7 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:1122: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1127,25 +1468,28 @@ else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -echo "$as_me:1137: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1145: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1148: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1158,7 +1502,7 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:1161: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1166,25 +1510,28 @@ else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="$ac_prog" -echo "$as_me:1176: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1184: result: $ac_ct_CC" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1187: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1196,12 +1543,33 @@ fi fi -test -z "$CC" && { { echo "$as_me:1199: error: no acceptable cc found in \$PATH" >&5 -echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;} { (exit 1); exit 1; }; } +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + cat >conftest.$ac_ext <<_ACEOF -#line 1204 "configure" +#line $LINENO "configure" #include "confdefs.h" int @@ -1215,23 +1583,32 @@ _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe" # Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compiler, and finding out an intuition +# It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:1220: checking for C compiler default output" >&5 +echo "$as_me:$LINENO: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:1223: \"$ac_link_default\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? - echo "$as_me:1226: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `ls a.exe conftest.exe a.* conftest conftest.* 2>/dev/null`; do + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.*; do + test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; a.out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool --akim. export ac_cv_exeext break;; * ) break;; @@ -1240,34 +1617,36 @@ done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1243: error: C compiler cannot create executables" >&5 -echo "$as_me: error: C compiler cannot create executables" >&2;} +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +check \`config.log' for details." >&5 +echo "$as_me: error: C compiler cannot create executables +check \`config.log' for details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext -echo "$as_me:1249: result: $ac_file" >&5 +echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1254: checking whether the C compiler works" >&5 +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:1260: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1263: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:1270: error: cannot run C compiled programs. + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&2;} @@ -1275,32 +1654,33 @@ If you meant to cross compile, use \`--host'." >&2;} fi fi fi -echo "$as_me:1278: result: yes" >&5 +echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1285: checking whether we are cross compiling" >&5 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:1287: result: $cross_compiling" >&5 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 -echo "$as_me:1290: checking for executable suffix" >&5 -echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 -if { (eval echo "$as_me:1292: \"$ac_link\"") >&5 +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1295: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. -for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; @@ -1308,25 +1688,25 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do esac done else - { { echo "$as_me:1311: error: cannot compute EXEEXT: cannot compile and link" >&5 -echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext -echo "$as_me:1317: result: $ac_cv_exeext" >&5 +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:1323: checking for object suffix" >&5 -echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1329 "configure" +#line $LINENO "configure" #include "confdefs.h" int @@ -1338,14 +1718,14 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:1341: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1344: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -1353,24 +1733,24 @@ done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1356: error: cannot compute OBJEXT: cannot compile" >&5 -echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:1363: result: $ac_cv_objext" >&5 +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:1367: checking whether we are using the GNU C compiler" >&5 +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1373 "configure" +#line $LINENO "configure" #include "confdefs.h" int @@ -1385,16 +1765,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1388: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1391: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1394: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1397: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else @@ -1406,19 +1786,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:1409: result: $ac_cv_c_compiler_gnu" >&5 +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" -echo "$as_me:1415: checking whether $CC accepts -g" >&5 +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1421 "configure" +#line $LINENO "configure" #include "confdefs.h" int @@ -1430,16 +1810,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1433: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1436: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1439: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1442: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else @@ -1449,7 +1829,7 @@ ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:1452: result: $ac_cv_prog_cc_g" >&5 +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -1466,26 +1846,117 @@ else CFLAGS= fi fi -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:1479: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:1482: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1485: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1488: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ @@ -1497,7 +1968,7 @@ if { (eval echo "$as_me:1479: \"$ac_compile\"") >&5 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line 1500 "configure" +#line $LINENO "configure" #include "confdefs.h" #include $ac_declaration @@ -1510,16 +1981,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1513: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1516: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1519: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1522: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -1529,7 +2000,7 @@ continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 1532 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_declaration int @@ -1541,16 +2012,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1544: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1547: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1550: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1553: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -1559,9 +2030,12 @@ cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done -echo '#ifdef __cplusplus' >>confdefs.h -echo $ac_declaration >>confdefs.h -echo '#endif' >>confdefs.h +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi else echo "$as_me: failed program was:" >&5 @@ -1580,11 +2054,11 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:1587: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1592,25 +2066,28 @@ else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" -echo "$as_me:1602: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - echo "$as_me:1610: result: $CXX" >&5 + echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else - echo "$as_me:1613: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1619,11 +2096,11 @@ fi fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:1626: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1631,25 +2108,28 @@ else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CXX="$ac_prog" -echo "$as_me:1641: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - echo "$as_me:1649: result: $ac_ct_CXX" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else - echo "$as_me:1652: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1660,13 +2140,34 @@ test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi -echo "$as_me:1663: checking whether we are using the GNU C++ compiler" >&5 + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1669 "configure" +#line $LINENO "configure" #include "confdefs.h" int @@ -1681,16 +2182,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1684: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1687: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1690: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1693: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else @@ -1702,19 +2203,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:1705: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" -echo "$as_me:1711: checking whether $CXX accepts -g" >&5 +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1717 "configure" +#line $LINENO "configure" #include "confdefs.h" int @@ -1726,16 +2227,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1729: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1732: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1735: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1738: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else @@ -1745,7 +2246,7 @@ ac_cv_prog_cxx_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:1748: result: $ac_cv_prog_cxx_g" >&5 +echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS @@ -1772,7 +2273,7 @@ for ac_declaration in \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line 1775 "configure" +#line $LINENO "configure" #include "confdefs.h" #include $ac_declaration @@ -1785,16 +2286,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1788: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1791: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1794: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1797: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -1804,7 +2305,7 @@ continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 1807 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_declaration int @@ -1816,16 +2317,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1819: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1822: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1825: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1828: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -1834,9 +2335,12 @@ cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done -echo '#ifdef __cplusplus' >>confdefs.h -echo $ac_declaration >>confdefs.h -echo '#endif' >>confdefs.h +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -1844,6 +2348,8 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -1851,50 +2357,51 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "$cross_compiling" = no; then - echo "$as_me:1854: checking that C++ compiler can compile simple program" >&5 + echo "$as_me:$LINENO: checking that C++ compiler can compile simple program" >&5 echo $ECHO_N "checking that C++ compiler can compile simple program... $ECHO_C" >&6 fi if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF -#line 1861 "configure" +#line $LINENO "configure" #include "confdefs.h" int main() { return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:1866: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1869: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:1871: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1874: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:1876: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:1882: result: no" >&5 -echo "${ECHO_T}no" >&6;{ { echo "$as_me:1883: error: a working C++ compiler is required" >&5 +( exit $ac_status ) +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6;{ { echo "$as_me:$LINENO: error: a working C++ compiler is required" >&5 echo "$as_me: error: a working C++ compiler is required" >&2;} { (exit 1); exit 1; }; } fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi if test "$cross_compiling" = no; then - echo "$as_me:1890: checking that C++ static constructors and destructors are called" >&5 + echo "$as_me:$LINENO: checking that C++ static constructors and destructors are called" >&5 echo $ECHO_N "checking that C++ static constructors and destructors are called... $ECHO_C" >&6 fi if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF -#line 1897 "configure" +#line $LINENO "configure" #include "confdefs.h" extern "C" { @@ -1911,33 +2418,34 @@ int main() { return 1; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:1914: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1917: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:1919: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1922: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:1924: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:1930: result: no" >&5 -echo "${ECHO_T}no" >&6;{ { echo "$as_me:1931: error: a working C++ compiler is required" >&5 +( exit $ac_status ) +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6;{ { echo "$as_me:$LINENO: error: a working C++ compiler is required" >&5 echo "$as_me: error: a working C++ compiler is required" >&2;} { (exit 1); exit 1; }; } fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:1937: checking that header files support C++" >&5 +echo "$as_me:$LINENO: checking that header files support C++" >&5 echo $ECHO_N "checking that header files support C++... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 1940 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int @@ -1949,24 +2457,24 @@ fopen(0, 0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:1952: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1955: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:1958: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1961: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:1963: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:1968: result: no" >&5 -echo "${ECHO_T}no" >&6;{ { echo "$as_me:1969: error: header files do not support C++ (if you are using a version of gcc/g++ earlier than 2.5, you should install libg++)" >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6;{ { echo "$as_me:$LINENO: error: header files do not support C++ (if you are using a version of gcc/g++ earlier than 2.5, you should install libg++)" >&5 echo "$as_me: error: header files do not support C++ (if you are using a version of gcc/g++ earlier than 2.5, you should install libg++)" >&2;} { (exit 1); exit 1; }; } fi @@ -1977,10 +2485,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:1980: checking whether character set is EBCDIC" >&5 + +echo "$as_me:$LINENO: checking whether character set is EBCDIC" >&5 echo $ECHO_N "checking whether character set is EBCDIC... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 1983 "configure" +#line $LINENO "configure" #include "confdefs.h" int @@ -1997,45 +2506,48 @@ make an error "Character set is not EBCDIC" } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2000: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2003: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2006: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2009: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then groff_cv_ebcdic="yes" TTYDEVDIRS="font/devcp1047" - echo "$as_me:2013: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define IS_EBCDIC_HOST 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 groff_cv_ebcdic="no" - TTYDEVDIRS="font/devascii font/devlatin1 font/devutf8" - echo "$as_me:2024: result: no" >&5 + TTYDEVDIRS="font/devascii font/devlatin1" + OTHERDEVDIRS="font/devlj4 font/devlbp" + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext + if test "$groff_cv_ebcdic" = "yes"; then - echo "$as_me:2030: checking for OS/390 Unix" >&5 + echo "$as_me:$LINENO: checking for OS/390 Unix" >&5 echo $ECHO_N "checking for OS/390 Unix... $ECHO_C" >&6 case `uname` in OS/390) CFLAGS="$CFLAGS -D_ALL_SOURCE" - echo "$as_me:2035: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 ;; *) - echo "$as_me:2038: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi @@ -2044,7 +2556,7 @@ if test -z "$PSPRINT"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2047: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LPR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2052,25 +2564,28 @@ else if test -n "$LPR"; then ac_cv_prog_LPR="$LPR" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_LPR="$ac_prog" -echo "$as_me:2062: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LPR="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi LPR=$ac_cv_prog_LPR if test -n "$LPR"; then - echo "$as_me:2070: result: $LPR" >&5 + echo "$as_me:$LINENO: result: $LPR" >&5 echo "${ECHO_T}$LPR" >&6 else - echo "$as_me:2073: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2081,7 +2596,7 @@ done do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2084: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2089,25 +2604,28 @@ else if test -n "$LP"; then ac_cv_prog_LP="$LP" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_LP="$ac_prog" -echo "$as_me:2099: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LP="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi LP=$ac_cv_prog_LP if test -n "$LP"; then - echo "$as_me:2107: result: $LP" >&5 + echo "$as_me:$LINENO: result: $LP" >&5 echo "${ECHO_T}$LP" >&6 else - echo "$as_me:2110: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2122,7 +2640,7 @@ done do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2125: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LPQ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2130,25 +2648,28 @@ else if test -n "$LPQ"; then ac_cv_prog_LPQ="$LPQ" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_LPQ="$ac_prog" -echo "$as_me:2140: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LPQ="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi LPQ=$ac_cv_prog_LPQ if test -n "$LPQ"; then - echo "$as_me:2148: result: $LPQ" >&5 + echo "$as_me:$LINENO: result: $LPQ" >&5 echo "${ECHO_T}$LPQ" >&6 else - echo "$as_me:2151: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2164,12 +2685,12 @@ done fi fi -echo "$as_me:2167: checking for command to use for printing PostScript files" >&5 +echo "$as_me:$LINENO: checking for command to use for printing PostScript files" >&5 echo $ECHO_N "checking for command to use for printing PostScript files... $ECHO_C" >&6 -echo "$as_me:2169: result: $PSPRINT" >&5 +echo "$as_me:$LINENO: result: $PSPRINT" >&5 echo "${ECHO_T}$PSPRINT" >&6 # Figure out DVIPRINT from PSPRINT. -echo "$as_me:2172: checking for command to use for printing dvi files" >&5 +echo "$as_me:$LINENO: checking for command to use for printing dvi files" >&5 echo $ECHO_N "checking for command to use for printing dvi files... $ECHO_C" >&6 if test -n "$PSPRINT" && test -z "$DVIPRINT"; then if test "X$PSPRINT" = "Xlpr"; then @@ -2179,11 +2700,11 @@ if test -n "$PSPRINT" && test -z "$DVIPRINT"; then fi fi -echo "$as_me:2182: result: $DVIPRINT" >&5 +echo "$as_me:$LINENO: result: $DVIPRINT" >&5 echo "${ECHO_T}$DVIPRINT" >&6 # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 -echo "$as_me:2186: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PERLPATH+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2193,16 +2714,18 @@ else ac_cv_path_PERLPATH="$PERLPATH" # Let the user override the test with a path. ;; *) - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - if $as_executable_p "$ac_dir/$ac_word"; then - ac_cv_path_PERLPATH="$ac_dir/$ac_word" - echo "$as_me:2203: found $ac_dir/$ac_word" >&5 - break -fi + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PERLPATH="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done test -z "$ac_cv_path_PERLPATH" && ac_cv_path_PERLPATH="/usr/bin/perl" @@ -2212,10 +2735,10 @@ fi PERLPATH=$ac_cv_path_PERLPATH if test -n "$PERLPATH"; then - echo "$as_me:2215: result: $PERLPATH" >&5 + echo "$as_me:$LINENO: result: $PERLPATH" >&5 echo "${ECHO_T}$PERLPATH" >&6 else - echo "$as_me:2218: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2223,7 +2746,7 @@ for ac_prog in byacc 'bison -y' do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2226: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_YACC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2231,25 +2754,28 @@ else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_YACC="$ac_prog" -echo "$as_me:2241: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_YACC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then - echo "$as_me:2249: result: $YACC" >&5 + echo "$as_me:$LINENO: result: $YACC" >&5 echo "${ECHO_T}$YACC" >&6 else - echo "$as_me:2252: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2260,7 +2786,7 @@ test -n "$YACC" || YACC="yacc" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:2263: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2268,25 +2794,28 @@ else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" -echo "$as_me:2278: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:2286: result: $RANLIB" >&5 + echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else - echo "$as_me:2289: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2295,7 +2824,7 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:2298: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2303,15 +2832,18 @@ else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_RANLIB="ranlib" -echo "$as_me:2313: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" @@ -2319,10 +2851,10 @@ fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:2322: result: $ac_ct_RANLIB" >&5 + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else - echo "$as_me:2325: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2348,7 +2880,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:2351: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi @@ -2358,6 +2890,47 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. ac_dir=`cd $ac_aux_dir; pwd` ac_install_sh="$ac_dir/install-sh -c" +for ac_prog in install-info +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_INSTALL_INFO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$INSTALL_INFO"; then + ac_cv_prog_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_INSTALL_INFO="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +INSTALL_INFO=$ac_cv_prog_INSTALL_INFO +if test -n "$INSTALL_INFO"; then + echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5 +echo "${ECHO_T}$INSTALL_INFO" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$INSTALL_INFO" && break +done +test -n "$INSTALL_INFO" || INSTALL_INFO=":" + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -2370,43 +2943,48 @@ ac_install_sh="$ac_dir/install-sh -c" # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:2373: checking for a BSD compatible install" >&5 -echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_IFS=$IFS; IFS=$ac_path_separator - for ac_dir in $PATH; do - IFS=$ac_save_IFS - # Account for people who put trailing slashes in PATH elements. - case $ac_dir/ in - / | ./ | .// | /cC/* \ - | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \ - | /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if $as_executable_p "$ac_dir/$ac_prog"; then - if test $ac_prog = install && - grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi done - ;; - esac - done + done + ;; +esac +done + fi if test "${ac_cv_path_install+set}" = set; then @@ -2419,7 +2997,7 @@ fi INSTALL=$ac_install_sh fi fi -echo "$as_me:2422: result: $INSTALL" >&5 +echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -2430,18 +3008,18 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo "$as_me:2433: checking whether ln -s works" >&5 +echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - echo "$as_me:2437: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:2440: result: no, using $LN_S" >&5 + echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi -echo "$as_me:2444: checking for csh hash hack" >&5 +echo "$as_me:$LINENO: checking for csh hash hack" >&5 echo $ECHO_N "checking for csh hash hack... $ECHO_C" >&6 cat <conftest.sh #!/bin/sh @@ -2451,10 +3029,10 @@ exit 1 EOF chmod +x conftest.sh if echo ./conftest.sh | (csh >/dev/null 2>&1) >/dev/null 2>&1; then - echo "$as_me:2454: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; SH_SCRIPT_SED_CMD='1s/.*/:/' else - echo "$as_me:2457: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; SH_SCRIPT_SED_CMD='1s/a/a/' fi rm -f conftest.sh @@ -2464,7 +3042,7 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:2467: checking how to run the C preprocessor" >&5 +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then @@ -2477,7 +3055,6 @@ else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do - # break 2 since there is a loop in there. ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2486,18 +3063,18 @@ do # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF -#line 2489 "configure" +#line $LINENO "configure" #include "confdefs.h" #include Syntax error _ACEOF -if { (eval echo "$as_me:2494: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2500: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2520,17 +3097,17 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 2523 "configure" +#line $LINENO "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:2527: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2533: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2556,7 +3133,7 @@ done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then - break 2 + break fi done @@ -2567,7 +3144,7 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:2570: result: $CPP" >&5 +echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -2577,18 +3154,18 @@ do # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF -#line 2580 "configure" +#line $LINENO "configure" #include "confdefs.h" #include Syntax error _ACEOF -if { (eval echo "$as_me:2585: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2591: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2611,17 +3188,17 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 2614 "configure" +#line $LINENO "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:2618: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2624: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2649,7 +3226,7 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:2652: error: C preprocessor \"$CPP\" fails sanity check" >&5 + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi @@ -2660,27 +3237,43 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -for ac_header in stdlib.h unistd.h dirent.h limits.h sys/dir.h \ - string.h strings.h math.h -do -ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh` -echo "$as_me:2667: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$ac_ac_Header+set}\" = set"; then + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2673 "configure" +#line $LINENO "configure" #include "confdefs.h" -#include <$ac_header> +#include +#include +#include +#include + _ACEOF -if { (eval echo "$as_me:2677: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2683: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2691,131 +3284,406 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - eval "$ac_ac_Header=yes" + ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - eval "$ac_ac_Header=no" + ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no fi -echo "$as_me:2702: result: `eval echo '${'$ac_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6 -if test `eval echo '${'$ac_ac_Header'}'` = yes; then - cat >>confdefs.h <&5 -echo $ECHO_N "checking for ISC 3.x or 4.x... $ECHO_C" >&6 -if grep '[34]\.' /usr/options/cb.name >/dev/null 2>&1 -then - echo "$as_me:2716: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\EOF -#define _SYSV3 1 -EOF +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : else - echo "$as_me:2723: result: no" >&5 -echo "${ECHO_T}no" >&6 + ac_cv_header_stdc=no fi -echo "$as_me:2726: checking whether -D_POSIX_SOURCE is necessary" >&5 -echo $ECHO_N "checking whether -D_POSIX_SOURCE is necessary... $ECHO_C" >&6 -ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +rm -f conftest* -cat >conftest.$ac_ext <<_ACEOF -#line 2735 "configure" +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -#include -extern "C" { void fileno(int); } +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { - - ; - return 0; + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2748: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2751: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2754: \"$ac_try\"") >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2757: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:2759: result: yes" >&5 -echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF -#define _POSIX_SOURCE 1 -EOF - + : else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:2767: result: no" >&5 -echo "${ECHO_T}no" >&6 +( exit $ac_status ) +ac_cv_header_stdc=no fi -rm -f conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then -ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF -echo "$as_me:2783: checking for return type of srand" >&5 -echo $ECHO_N "checking for return type of srand... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line 2786 "configure" +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" -#include -extern "C" { void srand(unsigned int); } -int -main () -{ +$ac_includes_default - ; - return 0; -} +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2799: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2802: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2805: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2808: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:2810: result: void" >&5 -echo "${ECHO_T}void" >&6;cat >>confdefs.h <<\EOF -#define RET_TYPE_SRAND_IS_VOID 1 -EOF + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + + + + +for ac_header in stdlib.h unistd.h dirent.h limits.h sys/dir.h \ + string.h strings.h math.h stdint.h sys/time.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:2818: result: int" >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +echo "$as_me:$LINENO: checking for ISC 3.x or 4.x" >&5 +echo $ECHO_N "checking for ISC 3.x or 4.x... $ECHO_C" >&6 +if grep '[34]\.' /usr/options/cb.name >/dev/null 2>&1 +then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define _SYSV3 1 +_ACEOF + +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +echo "$as_me:$LINENO: checking whether -D_POSIX_SOURCE is necessary" >&5 +echo $ECHO_N "checking whether -D_POSIX_SOURCE is necessary... $ECHO_C" >&6 +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +extern "C" { void fileno(int); } +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; +cat >>confdefs.h <<\_ACEOF +#define _POSIX_SOURCE 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +echo "$as_me:$LINENO: checking for return type of srand" >&5 +echo $ECHO_N "checking for return type of srand... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +extern "C" { void srand(unsigned int); } +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: void" >&5 +echo "${ECHO_T}void" >&6; +cat >>confdefs.h <<\_ACEOF +#define RET_TYPE_SRAND_IS_VOID 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: int" >&5 echo "${ECHO_T}int" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -2825,7 +3693,87 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:2828: checking whether hypot must be declared" >&5 +echo "$as_me:$LINENO: checking whether gettimeofday must be declared" >&5 +echo $ECHO_N "checking whether gettimeofday must be declared... $ECHO_C" >&6 +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +if test "${groff_cv_decl_needed_gettimeofday+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#include +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_MATH_H +#include +#endif +int +main () +{ +#ifndef gettimeofday + char *p = (char *) gettimeofday; +#endif + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + groff_cv_decl_needed_gettimeofday=no +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +groff_cv_decl_needed_gettimeofday=yes +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi + +echo "$as_me:$LINENO: result: $groff_cv_decl_needed_gettimeofday" >&5 +echo "${ECHO_T}$groff_cv_decl_needed_gettimeofday" >&6 +if test $groff_cv_decl_needed_gettimeofday = yes; then + +cat >>confdefs.h <<\_ACEOF +#define NEED_DECLARATION_GETTIMEOFDAY 1 +_ACEOF + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +echo "$as_me:$LINENO: checking whether hypot must be declared" >&5 echo $ECHO_N "checking whether hypot must be declared... $ECHO_C" >&6 ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' @@ -2837,7 +3785,7 @@ if test "${groff_cv_decl_needed_hypot+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2840 "configure" +#line $LINENO "configure" #include "confdefs.h" #include @@ -2850,6 +3798,9 @@ else #ifdef HAVE_STDLIB_H #include #endif +#ifdef HAVE_SYS_TIME_H +#include +#endif #ifdef HAVE_UNISTD_H #include #endif @@ -2859,22 +3810,24 @@ else int main () { -char *(*pfn) = (char *(*)) hypot +#ifndef hypot + char *p = (char *) hypot; +#endif ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2868: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2871: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2874: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2877: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then groff_cv_decl_needed_hypot=no else @@ -2885,12 +3838,13 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:2888: result: $groff_cv_decl_needed_hypot" >&5 +echo "$as_me:$LINENO: result: $groff_cv_decl_needed_hypot" >&5 echo "${ECHO_T}$groff_cv_decl_needed_hypot" >&6 if test $groff_cv_decl_needed_hypot = yes; then - cat >>confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define NEED_DECLARATION_HYPOT 1 -EOF +_ACEOF fi ac_ext=c @@ -2899,7 +3853,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:2902: checking whether popen must be declared" >&5 +echo "$as_me:$LINENO: checking whether popen must be declared" >&5 echo $ECHO_N "checking whether popen must be declared... $ECHO_C" >&6 ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' @@ -2911,7 +3865,7 @@ if test "${groff_cv_decl_needed_popen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2914 "configure" +#line $LINENO "configure" #include "confdefs.h" #include @@ -2924,6 +3878,9 @@ else #ifdef HAVE_STDLIB_H #include #endif +#ifdef HAVE_SYS_TIME_H +#include +#endif #ifdef HAVE_UNISTD_H #include #endif @@ -2933,22 +3890,24 @@ else int main () { -char *(*pfn) = (char *(*)) popen +#ifndef popen + char *p = (char *) popen; +#endif ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2942: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2945: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2948: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2951: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then groff_cv_decl_needed_popen=no else @@ -2959,12 +3918,13 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:2962: result: $groff_cv_decl_needed_popen" >&5 +echo "$as_me:$LINENO: result: $groff_cv_decl_needed_popen" >&5 echo "${ECHO_T}$groff_cv_decl_needed_popen" >&6 if test $groff_cv_decl_needed_popen = yes; then - cat >>confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define NEED_DECLARATION_POPEN 1 -EOF +_ACEOF fi ac_ext=c @@ -2973,7 +3933,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:2976: checking whether pclose must be declared" >&5 +echo "$as_me:$LINENO: checking whether pclose must be declared" >&5 echo $ECHO_N "checking whether pclose must be declared... $ECHO_C" >&6 ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' @@ -2985,7 +3945,7 @@ if test "${groff_cv_decl_needed_pclose+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2988 "configure" +#line $LINENO "configure" #include "confdefs.h" #include @@ -2998,6 +3958,9 @@ else #ifdef HAVE_STDLIB_H #include #endif +#ifdef HAVE_SYS_TIME_H +#include +#endif #ifdef HAVE_UNISTD_H #include #endif @@ -3007,22 +3970,24 @@ else int main () { -char *(*pfn) = (char *(*)) pclose +#ifndef pclose + char *p = (char *) pclose; +#endif ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3016: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3019: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3022: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3025: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then groff_cv_decl_needed_pclose=no else @@ -3033,12 +3998,13 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:3036: result: $groff_cv_decl_needed_pclose" >&5 +echo "$as_me:$LINENO: result: $groff_cv_decl_needed_pclose" >&5 echo "${ECHO_T}$groff_cv_decl_needed_pclose" >&6 if test $groff_cv_decl_needed_pclose = yes; then - cat >>confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define NEED_DECLARATION_PCLOSE 1 -EOF +_ACEOF fi ac_ext=c @@ -3047,7 +4013,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:3050: checking whether putenv must be declared" >&5 +echo "$as_me:$LINENO: checking whether putenv must be declared" >&5 echo $ECHO_N "checking whether putenv must be declared... $ECHO_C" >&6 ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' @@ -3059,7 +4025,7 @@ if test "${groff_cv_decl_needed_putenv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3062 "configure" +#line $LINENO "configure" #include "confdefs.h" #include @@ -3072,6 +4038,9 @@ else #ifdef HAVE_STDLIB_H #include #endif +#ifdef HAVE_SYS_TIME_H +#include +#endif #ifdef HAVE_UNISTD_H #include #endif @@ -3081,22 +4050,24 @@ else int main () { -char *(*pfn) = (char *(*)) putenv +#ifndef putenv + char *p = (char *) putenv; +#endif ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3090: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3093: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3096: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3099: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then groff_cv_decl_needed_putenv=no else @@ -3107,12 +4078,93 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:3110: result: $groff_cv_decl_needed_putenv" >&5 +echo "$as_me:$LINENO: result: $groff_cv_decl_needed_putenv" >&5 echo "${ECHO_T}$groff_cv_decl_needed_putenv" >&6 if test $groff_cv_decl_needed_putenv = yes; then - cat >>confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define NEED_DECLARATION_PUTENV 1 -EOF +_ACEOF + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +echo "$as_me:$LINENO: checking whether strcasecmp must be declared" >&5 +echo $ECHO_N "checking whether strcasecmp must be declared... $ECHO_C" >&6 +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +if test "${groff_cv_decl_needed_strcasecmp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#include +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_STRINGS_H +#include +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_MATH_H +#include +#endif +int +main () +{ +#ifndef strcasecmp + char *p = (char *) strcasecmp; +#endif + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + groff_cv_decl_needed_strcasecmp=no +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +groff_cv_decl_needed_strcasecmp=yes +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi + +echo "$as_me:$LINENO: result: $groff_cv_decl_needed_strcasecmp" >&5 +echo "${ECHO_T}$groff_cv_decl_needed_strcasecmp" >&6 +if test $groff_cv_decl_needed_strcasecmp = yes; then + +cat >>confdefs.h <<\_ACEOF +#define NEED_DECLARATION_STRCASECMP 1 +_ACEOF fi ac_ext=c @@ -3121,7 +4173,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:3124: checking whether strncasecmp must be declared" >&5 +echo "$as_me:$LINENO: checking whether strncasecmp must be declared" >&5 echo $ECHO_N "checking whether strncasecmp must be declared... $ECHO_C" >&6 ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' @@ -3133,7 +4185,7 @@ if test "${groff_cv_decl_needed_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3136 "configure" +#line $LINENO "configure" #include "confdefs.h" #include @@ -3146,6 +4198,9 @@ else #ifdef HAVE_STDLIB_H #include #endif +#ifdef HAVE_SYS_TIME_H +#include +#endif #ifdef HAVE_UNISTD_H #include #endif @@ -3155,22 +4210,24 @@ else int main () { -char *(*pfn) = (char *(*)) strncasecmp +#ifndef strncasecmp + char *p = (char *) strncasecmp; +#endif ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3164: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3167: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3170: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3173: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then groff_cv_decl_needed_strncasecmp=no else @@ -3181,12 +4238,13 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:3184: result: $groff_cv_decl_needed_strncasecmp" >&5 +echo "$as_me:$LINENO: result: $groff_cv_decl_needed_strncasecmp" >&5 echo "${ECHO_T}$groff_cv_decl_needed_strncasecmp" >&6 if test $groff_cv_decl_needed_strncasecmp = yes; then - cat >>confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define NEED_DECLARATION_STRNCASECMP 1 -EOF +_ACEOF fi ac_ext=c @@ -3201,10 +4259,10 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:3204: checking for sys_nerr in or " >&5 +echo "$as_me:$LINENO: checking for sys_nerr in or " >&5 echo $ECHO_N "checking for sys_nerr in or ... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 3207 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #include @@ -3217,26 +4275,27 @@ int k; k = sys_nerr; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3220: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3223: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3226: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3229: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:3231: result: yes" >&5 -echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; +cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_NERR 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:3239: result: no" >&5 +echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -3246,10 +4305,10 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:3249: checking for sys_errlist in or " >&5 +echo "$as_me:$LINENO: checking for sys_errlist in or " >&5 echo $ECHO_N "checking for sys_errlist in or ... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 3252 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #include @@ -3262,26 +4321,27 @@ int k; k = (int)sys_errlist[0]; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3265: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3268: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3271: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3274: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:3276: result: yes" >&5 -echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; +cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_ERRLIST 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:3284: result: no" >&5 +echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -3291,10 +4351,10 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:3294: checking C++ " >&5 +echo "$as_me:$LINENO: checking C++ " >&5 echo $ECHO_N "checking C++ ... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 3297 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int @@ -3306,26 +4366,27 @@ read(0, 0, 0); open(0, 0); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3309: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3312: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3315: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3318: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:3320: result: yes" >&5 -echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; +cat >>confdefs.h <<\_ACEOF #define HAVE_CC_OSFCN_H 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:3328: result: no" >&5 +echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -3341,10 +4402,10 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:3344: checking C++ " >&5 +echo "$as_me:$LINENO: checking C++ " >&5 echo $ECHO_N "checking C++ ... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 3347 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int @@ -3356,26 +4417,27 @@ int x = INT_MIN; int y = INT_MAX; int z = UCHAR_MAX; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3359: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3362: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3365: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3368: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:3370: result: yes" >&5 -echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; +cat >>confdefs.h <<\_ACEOF #define HAVE_CC_LIMITS_H 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:3378: result: no" >&5 +echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -3391,10 +4453,118 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:3394: checking for declaration of time_t" >&5 +echo "$as_me:$LINENO: checking for inttypes.h" >&5 +echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +int +main () +{ +uintmax_t i = (uintmax_t)-1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + groff_cv_header_inttypes_h=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +groff_cv_header_inttypes_h=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $groff_cv_header_inttypes_h" >&5 +echo "${ECHO_T}$groff_cv_header_inttypes_h" >&6 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +echo "$as_me:$LINENO: checking for unsigned long long" >&5 +echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +unsigned long long ull = 1; int i = 63; +int +main () +{ +unsigned long long ullmax = (unsigned long long)-1; +return ull << i | ull >> i | ullmax / ull | ullmax % ull; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + groff_cv_type_unsigned_long_long=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +groff_cv_type_unsigned_long_long=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +echo "$as_me:$LINENO: result: $groff_cv_type_unsigned_long_long" >&5 +echo "${ECHO_T}$groff_cv_type_unsigned_long_long" >&6 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +if test $groff_cv_header_inttypes_h = no; then + + test $groff_cv_type_unsigned_long_long = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + +cat >>confdefs.h <<_ACEOF +#define uintmax_t $ac_type +_ACEOF + +fi +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +echo "$as_me:$LINENO: checking for declaration of time_t" >&5 echo $ECHO_N "checking for declaration of time_t... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 3397 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int @@ -3406,26 +4576,27 @@ time_t t = time(0); struct tm *p = localtime(&t); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3409: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3412: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3415: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3418: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:3420: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:3425: result: no" >&5 -echo "${ECHO_T}no" >&6;cat >>confdefs.h <<\EOF +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; +cat >>confdefs.h <<\_ACEOF #define LONG_FOR_TIME_T 1 -EOF +_ACEOF fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -3435,13 +4606,13 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:3438: checking return type of signal handlers" >&5 +echo "$as_me:$LINENO: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3444 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #include @@ -3463,16 +4634,16 @@ int i; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3466: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3469: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3472: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3475: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void else @@ -3482,17 +4653,18 @@ ac_cv_type_signal=int fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:3485: result: $ac_cv_type_signal" >&5 +echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 -cat >>confdefs.h <>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal -EOF +_ACEOF + -echo "$as_me:3492: checking struct exception" >&5 +echo "$as_me:$LINENO: checking struct exception" >&5 echo $ECHO_N "checking struct exception... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 3495 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int @@ -3504,30 +4676,31 @@ struct exception e; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3507: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3510: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3513: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3516: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:3518: result: yes" >&5 -echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; +cat >>confdefs.h <<\_ACEOF #define HAVE_STRUCT_EXCEPTION 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:3526: result: no" >&5 +echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:3530: checking for sin in -lm" >&5 +echo "$as_me:$LINENO: checking for sin in -lm" >&5 echo $ECHO_N "checking for sin in -lm... $ECHO_C" >&6 if test "${ac_cv_lib_m_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3535,7 +4708,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 3538 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -3554,16 +4727,16 @@ sin (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3557: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3560: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3563: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3566: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_m_sin=yes else @@ -3574,32 +4747,73 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:3577: result: $ac_cv_lib_m_sin" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5 echo "${ECHO_T}$ac_cv_lib_m_sin" >&6 if test $ac_cv_lib_m_sin = yes; then LIBM=-lm fi -for ac_header in stdlib.h unistd.h -do -ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh` -echo "$as_me:3586: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$ac_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line 3592 "configure" + + + +for ac_header in stdlib.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:3596: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:3602: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -3610,34 +4824,62 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - eval "$ac_ac_Header=yes" + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - eval "$ac_ac_Header=no" + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -echo "$as_me:3621: result: `eval echo '${'$ac_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6 -if test `eval echo '${'$ac_ac_Header'}'` = yes; then - cat >>confdefs.h <&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi + done + for ac_func in getpagesize do -ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` -echo "$as_me:3634: checking for $ac_func" >&5 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$ac_ac_var+set}\" = set"; then +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3640 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -3668,36 +4910,36 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3671: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3674: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3677: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3680: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$ac_ac_var=yes" + eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -eval "$ac_ac_var=no" +eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:3690: result: `eval echo '${'$ac_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6 -if test `eval echo '${'$ac_ac_var'}'` = yes; then - cat >>confdefs.h <&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF fi done -echo "$as_me:3700: checking for working mmap" >&5 +echo "$as_me:$LINENO: checking for working mmap" >&5 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3706,8 +4948,12 @@ else ac_cv_func_mmap_fixed_mapped=no else cat >conftest.$ac_ext <<_ACEOF -#line 3709 "configure" +#line $LINENO "configure" #include "confdefs.h" +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed @@ -3723,25 +4969,19 @@ else VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get - propogated back to all the places they're supposed to be. + propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ -#include + #include #include -#if STDC_HEADERS || HAVE_STDLIB_H -# include -#else +#if !STDC_HEADERS && !HAVE_STDLIB_H char *malloc (); #endif -#if HAVE_UNISTD_H -# include -#endif -#include /* This mess was copied from the GNU getpagesize.h. */ #if !HAVE_GETPAGESIZE @@ -3838,33 +5078,34 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:3841: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3844: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:3846: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3849: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_mmap_fixed_mapped=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) ac_cv_func_mmap_fixed_mapped=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -echo "$as_me:3861: result: $ac_cv_func_mmap_fixed_mapped" >&5 +echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 if test $ac_cv_func_mmap_fixed_mapped = yes; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_MMAP 1 -EOF +_ACEOF fi rm -f conftest.mmap @@ -3872,16 +5113,21 @@ rm -f conftest.mmap saved_libs="$LIBS" LIBS="$LIBS -lc $LIBM" -for ac_func in fmod strtol getcwd strerror putenv + + + + + +for ac_func in fmod getcwd putenv snprintf strerror strtol do -ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` -echo "$as_me:3878: checking for $ac_func" >&5 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$ac_ac_var+set}\" = set"; then +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3884 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -3912,49 +5158,55 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3915: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3918: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3921: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3924: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$ac_ac_var=yes" + eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -eval "$ac_ac_var=no" +eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:3934: result: `eval echo '${'$ac_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6 -if test `eval echo '${'$ac_ac_var'}'` = yes; then - cat >>confdefs.h <&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF else LIBOBJS="$LIBOBJS $ac_func.$ac_objext" fi done + LIBS="$saved_libs" -for ac_func in rename strcasecmp strncasecmp strsep strdup + + + + + +for ac_func in gettimeofday isatty rename strcasecmp strncasecmp strsep do -ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` -echo "$as_me:3951: checking for $ac_func" >&5 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$ac_ac_var+set}\" = set"; then +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3957 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -3985,127 +5237,96 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3988: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3991: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3994: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3997: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$ac_ac_var=yes" + eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -eval "$ac_ac_var=no" +eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:4007: result: `eval echo '${'$ac_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6 -if test `eval echo '${'$ac_ac_var'}'` = yes; then - cat >>confdefs.h <&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF fi done -echo "$as_me:4017: checking for mkstemp" >&5 +echo "$as_me:$LINENO: checking for mkstemp" >&5 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6 -if test "${ac_cv_func_mkstemp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line 4023 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char mkstemp (); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char mkstemp (); -char (*f) (); +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +int (*f) (char *); int main () { -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_mkstemp) || defined (__stub___mkstemp) -choke me -#else f = mkstemp; -#endif - ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4054: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4057: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4060: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4063: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_mkstemp=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_func_mkstemp=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:4073: result: $ac_cv_func_mkstemp" >&5 -echo "${ECHO_T}$ac_cv_func_mkstemp" >&6 -if test $ac_cv_func_mkstemp = yes; then - cat >>confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; +cat >>confdefs.h <<\_ACEOF #define HAVE_MKSTEMP 1 -EOF - -echo "$as_me:4080: checking for mkstemp prototype in " >&5 -echo $ECHO_N "checking for mkstemp prototype in ... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line 4083 "configure" -#include "confdefs.h" -#include _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "mkstemp" >/dev/null 2>&1; then - echo "$as_me:4089: result: yes" >&5 -echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF -#define HAVE_MKSTEMP_PROTO 1 -EOF else - echo "$as_me:4095: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest* - + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6;LIBOBJS="$LIBOBJS mkstemp.$ac_objext" fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:4102: checking for sys_siglist declaration in signal.h or unistd.h" >&5 +echo "$as_me:$LINENO: checking for sys_siglist declaration in signal.h or unistd.h" >&5 echo $ECHO_N "checking for sys_siglist declaration in signal.h or unistd.h... $ECHO_C" >&6 if test "${ac_cv_decl_sys_siglist+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4108 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #include @@ -4123,16 +5344,16 @@ char *msg = *(sys_siglist + 1); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4126: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4129: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4132: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4135: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_decl_sys_siglist=yes else @@ -4142,13 +5363,13 @@ ac_cv_decl_sys_siglist=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:4145: result: $ac_cv_decl_sys_siglist" >&5 +echo "$as_me:$LINENO: result: $ac_cv_decl_sys_siglist" >&5 echo "${ECHO_T}$ac_cv_decl_sys_siglist" >&6 if test $ac_cv_decl_sys_siglist = yes; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define SYS_SIGLIST_DECLARED 1 -EOF +_ACEOF fi @@ -4158,10 +5379,10 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:4161: checking whether ANSI array delete syntax supported" >&5 +echo "$as_me:$LINENO: checking whether ANSI array delete syntax supported" >&5 echo $ECHO_N "checking whether ANSI array delete syntax supported... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 4164 "configure" +#line $LINENO "configure" #include "confdefs.h" int @@ -4173,26 +5394,27 @@ char *p = new char[5]; delete [] p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4176: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4179: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4182: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4185: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:4187: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:4192: result: no" >&5 -echo "${ECHO_T}no" >&6;cat >>confdefs.h <<\EOF +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; +cat >>confdefs.h <<\_ACEOF #define ARRAY_DELETE_NEEDS_SIZE 1 -EOF +_ACEOF fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -4208,10 +5430,10 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo "$as_me:4211: checking traditional preprocessor" >&5 +echo "$as_me:$LINENO: checking traditional preprocessor" >&5 echo $ECHO_N "checking traditional preprocessor... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 4214 "configure" +#line $LINENO "configure" #include "confdefs.h" #define name2(a,b) a/**/b int @@ -4223,26 +5445,27 @@ int name2(foo,bar); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4226: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4229: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4232: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4235: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:4237: result: yes" >&5 -echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; +cat >>confdefs.h <<\_ACEOF #define TRADITIONAL_CPP 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:4245: result: no" >&5 +echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -4252,14 +5475,14 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:4255: checking w_coredump" >&5 +echo "$as_me:$LINENO: checking w_coredump" >&5 echo $ECHO_N "checking w_coredump... $ECHO_C" >&6 if test "$cross_compiling" = yes; then - echo "$as_me:4258: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4262 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #include @@ -4275,55 +5498,64 @@ main() } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4278: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4281: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4283: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4286: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:4288: result: yes" >&5 -echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; +cat >>confdefs.h <<\_ACEOF #define WCOREFLAG 0200 -EOF +_ACEOF else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:4297: result: no" >&5 +( exit $ac_status ) +echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:4302: checking default value for grops -b option" >&5 +echo "$as_me:$LINENO: checking default value for grops -b option" >&5 echo $ECHO_N "checking default value for grops -b option... $ECHO_C" >&6 test -n "${BROKEN_SPOOLER_FLAGS}" || BROKEN_SPOOLER_FLAGS=7 -echo "$as_me:4305: result: $BROKEN_SPOOLER_FLAGS" >&5 +echo "$as_me:$LINENO: result: $BROKEN_SPOOLER_FLAGS" >&5 echo "${ECHO_T}$BROKEN_SPOOLER_FLAGS" >&6 -echo "$as_me:4308: checking default paper size" >&5 +echo "$as_me:$LINENO: checking default paper size" >&5 echo $ECHO_N "checking default paper size... $ECHO_C" >&6 +groff_prefix=$prefix +test "x$prefix" = xNONE && groff_prefix=$ac_default_prefix if test -z "$PAGE"; then descfile= - if test -r $prefix/share/groff/font/devps/DESC; then - descfile=$prefix/share/groff/font/devps/DESC - elif test -r $prefix/lib/groff/font/devps/DESC; then - descfile=$prefix/lib/groff/font/devps/DESC + if test -r $groff_prefix/share/groff/font/devps/DESC; then + descfile=$groff_prefix/share/groff/font/devps/DESC + elif test -r $groff_prefix/lib/groff/font/devps/DESC; then + descfile=$groff_prefix/lib/groff/font/devps/DESC else - for f in $prefix/share/groff/*/font/devps/DESC; do + for f in $groff_prefix/share/groff/*/font/devps/DESC; do if test -r $f; then descfile=$f break fi done fi - if test -n "$descfile" \ - && grep "^paperlength 841890" $descfile >/dev/null 2>&1; then - PAGE=A4 + if test -n "$descfile"; then + if grep '^paperlength[ ]\+841890' $descfile + >/dev/null 2>&1; then + PAGE=A4 + elif grep '^papersize[ ]\+[aA]4' $descfile \ + >/dev/null 2>&1; then + PAGE=A4 + fi fi fi if test -z "$PAGE"; then @@ -4344,22 +5576,29 @@ if test -z "$PAGE"; then esac fi test -n "$PAGE" || PAGE=letter -echo "$as_me:4347: result: $PAGE" >&5 +if test "x$PAGE" = "xA4"; then + +cat >>confdefs.h <<\_ACEOF +#define PAGEA4 1 +_ACEOF + +fi +echo "$as_me:$LINENO: result: $PAGE" >&5 echo "${ECHO_T}$PAGE" >&6 -echo "$as_me:4350: checking for existing troff installation" >&5 +echo "$as_me:$LINENO: checking for existing troff installation" >&5 echo $ECHO_N "checking for existing troff installation... $ECHO_C" >&6 if test "x`(echo .tm '|n(.g' | tr '|' '\\\\' | troff -z -i 2>&1) 2>/dev/null`" = x0; then - echo "$as_me:4353: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 g=g else - echo "$as_me:4357: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 g= fi -echo "$as_me:4362: checking for prefix of system macro packages" >&5 +echo "$as_me:$LINENO: checking for prefix of system macro packages" >&5 echo $ECHO_N "checking for prefix of system macro packages... $ECHO_C" >&6 sys_tmac_prefix= sys_tmac_file_prefix= @@ -4376,11 +5615,11 @@ for d in /usr/share/lib/tmac /usr/lib/tmac; do done done done -echo "$as_me:4379: result: $sys_tmac_prefix" >&5 +echo "$as_me:$LINENO: result: $sys_tmac_prefix" >&5 echo "${ECHO_T}$sys_tmac_prefix" >&6 tmac_wrap= -echo "$as_me:4383: checking which system macro packages should be made available" >&5 +echo "$as_me:$LINENO: checking which system macro packages should be made available" >&5 echo $ECHO_N "checking which system macro packages should be made available... $ECHO_C" >&6 if test "x$sys_tmac_file_prefix" = "xtmac."; then for f in $sys_tmac_prefix*; do @@ -4416,11 +5655,213 @@ elif test -n "$sys_tmac_prefix"; then done rm -f conftest.sol fi -echo "$as_me:4419: result: $tmac_wrap" >&5 +echo "$as_me:$LINENO: result: $tmac_wrap" >&5 echo "${ECHO_T}$tmac_wrap" >&6 -$srcdir/mkinstalldirs src/xditview -ac_config_files="$ac_config_files Makefile src/xditview/Imakefile" +make_html=html +make_install_html=install_html +# Extract the first word of "pnmcut", so it can be a program name with args. +set dummy pnmcut; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_pnmcut+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$pnmcut"; then + ac_cv_prog_pnmcut="$pnmcut" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_pnmcut="found" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_pnmcut" && ac_cv_prog_pnmcut="missing" +fi +fi +pnmcut=$ac_cv_prog_pnmcut +if test -n "$pnmcut"; then + echo "$as_me:$LINENO: result: $pnmcut" >&5 +echo "${ECHO_T}$pnmcut" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "pnmcrop", so it can be a program name with args. +set dummy pnmcrop; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_pnmcrop+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$pnmcrop"; then + ac_cv_prog_pnmcrop="$pnmcrop" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_pnmcrop="found" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_pnmcrop" && ac_cv_prog_pnmcrop="missing" +fi +fi +pnmcrop=$ac_cv_prog_pnmcrop +if test -n "$pnmcrop"; then + echo "$as_me:$LINENO: result: $pnmcrop" >&5 +echo "${ECHO_T}$pnmcrop" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "pnmtopng", so it can be a program name with args. +set dummy pnmtopng; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_pnmtopng+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$pnmtopng"; then + ac_cv_prog_pnmtopng="$pnmtopng" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_pnmtopng="found" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_pnmtopng" && ac_cv_prog_pnmtopng="missing" +fi +fi +pnmtopng=$ac_cv_prog_pnmtopng +if test -n "$pnmtopng"; then + echo "$as_me:$LINENO: result: $pnmtopng" >&5 +echo "${ECHO_T}$pnmtopng" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "gs gsos2", so it can be a program name with args. +set dummy gs gsos2; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_gs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$gs"; then + ac_cv_prog_gs="$gs" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_gs="found" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_gs" && ac_cv_prog_gs="missing" +fi +fi +gs=$ac_cv_prog_gs +if test -n "$gs"; then + echo "$as_me:$LINENO: result: $gs" >&5 +echo "${ECHO_T}$gs" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "psselect", so it can be a program name with args. +set dummy psselect; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_psselect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$psselect"; then + ac_cv_prog_psselect="$psselect" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_psselect="found" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_psselect" && ac_cv_prog_psselect="missing" +fi +fi +psselect=$ac_cv_prog_psselect +if test -n "$psselect"; then + echo "$as_me:$LINENO: result: $psselect" >&5 +echo "${ECHO_T}$psselect" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +case "x$pnmcut$pnmcrop$pnmtopng$gs$psselect" in +*missing*) + make_html= + make_install_html= + { echo "$as_me:$LINENO: WARNING: + + Since one or more of the above five programs can't be found in the path, + the HTML backend of groff (grohtml) won't work properly. Consequently, + no documentation in HTML format is built and installed. +" >&5 +echo "$as_me: WARNING: + + Since one or more of the above five programs can't be found in the path, + the HTML backend of groff (grohtml) won't work properly. Consequently, + no documentation in HTML format is built and installed. +" >&2;} ;; +esac + + + ac_config_files="$ac_config_files stamp-h" + + ac_config_files="$ac_config_files Makefile doc/Makefile src/xditview/Imakefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -4432,7 +5873,7 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overriden when +# `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. @@ -4451,12 +5892,12 @@ _ACEOF # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; - s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ - "s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | @@ -4496,67 +5937,224 @@ s/^[^=]*=[ ]*$//; }' fi -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\EOF -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g -t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g -t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -EOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conftest.sh +fi + -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:4534: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated automatically by configure. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done -debug=false -SHELL=\${CONFIG_SHELL-$SHELL} -ac_cs_invocation="\$0 \$@" + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac -_ACEOF + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } -cat >>$CONFIG_STATUS <<\_ACEOF -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} -# Name of the executable. -as_me=`echo "$0" |sed 's,.*[\\/],,'` + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr @@ -4582,24 +6180,20 @@ else fi rm -f conf$$ conf$$.exe conf$$.file -as_executable_p="test -f" - -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: else - as_unset=false + as_mkdir_p=false fi -# NLS nuisances. -$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } -$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } -$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } -$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } -$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } -$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } -$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } -$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + # IFS # We need space, tab and new line, in precisely that order. @@ -4608,10 +6202,34 @@ as_nl=' IFS=" $as_nl" # CDPATH. -$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } +$as_unset CDPATH exec 6>&1 +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.54. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF # Files that config.status was made for. @@ -4631,7 +6249,7 @@ if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the @@ -4645,17 +6263,22 @@ Usage: $0 [OPTIONS] [FILE]... --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files +Configuration headers: +$config_headers + Report bugs to ." -EOF +_ACEOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.50, +configured by $0, generated by GNU Autoconf 2.54, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 @@ -4664,9 +6287,9 @@ This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" -EOF +_ACEOF -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: @@ -4676,30 +6299,33 @@ do --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` - shift - set dummy "$ac_option" "$ac_optarg" ${1+"$@"} - shift + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift ;; - -*);; *) # This is not an option, so the user has probably given explicit # arguments. + ac_option=$1 ac_need_defaults=false;; esac - case $1 in + case $ac_option in # Handling of the options. -EOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:4702: error: ambiguous option: $1 + { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} @@ -4709,59 +6335,63 @@ Try \`$0 --help' for more information." >&2;} --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) - shift - CONFIG_FILES="$CONFIG_FILES $1" + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) - shift - CONFIG_HEADERS="$CONFIG_HEADERS $1" + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; - # Handling of arguments. - 'Makefile' ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - 'src/xditview/Imakefile' ) CONFIG_FILES="$CONFIG_FILES src/xditview/Imakefile" ;; - # This is an error. - -*) { { echo "$as_me:4725: error: unrecognized option: $1 + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; - *) { { echo "$as_me:4730: error: invalid argument: $1" >&5 -echo "$as_me: error: invalid argument: $1" >&2;} - { (exit 1); exit 1; }; };; + + *) ac_config_targets="$ac_config_targets $1" ;; + esac shift done -exec 5>>config.log -cat >&5 << _ACEOF +_ACEOF + -## ----------------------- ## -## Running config.status. ## -## ----------------------- ## -This file was extended by $as_me 2.50, executed with - > $ac_cs_invocation -on `(hostname || uname -n) 2>/dev/null | sed 1q` -_ACEOF -EOF -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "stamp-h" ) CONFIG_FILES="$CONFIG_FILES stamp-h" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "src/xditview/Imakefile" ) CONFIG_FILES="$CONFIG_FILES src/xditview/Imakefile" ;; + "src/include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/config.h:src/include/config.hin" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit $?); exit $?; }' 1 2 13 15 + trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. @@ -4779,9 +6409,9 @@ $debug || { (exit 1); exit 1; } } -EOF +_ACEOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. @@ -4794,6 +6424,12 @@ if test -n "\$CONFIG_FILES"; then sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t @@ -4809,18 +6445,15 @@ s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@DEFS@,$DEFS,;t t s,@LIBS@,$LIBS,;t t -s,@top_builddir@,$top_builddir,;t t +s,@groff_top_builddir@,$groff_top_builddir,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t @@ -4832,6 +6465,7 @@ s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@TTYDEVDIRS@,$TTYDEVDIRS,;t t +s,@OTHERDEVDIRS@,$OTHERDEVDIRS,;t t s,@LPR@,$LPR,;t t s,@LP@,$LP,;t t s,@LPQ@,$LPQ,;t t @@ -4841,12 +6475,14 @@ s,@PERLPATH@,$PERLPATH,;t t s,@YACC@,$YACC,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@INSTALL_INFO@,$INSTALL_INFO,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@LN_S@,$LN_S,;t t s,@SH_SCRIPT_SED_CMD@,$SH_SCRIPT_SED_CMD,;t t s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t s,@LIBM@,$LIBM,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@BROKEN_SPOOLER_FLAGS@,$BROKEN_SPOOLER_FLAGS,;t t @@ -4854,11 +6490,19 @@ s,@PAGE@,$PAGE,;t t s,@g@,$g,;t t s,@sys_tmac_prefix@,$sys_tmac_prefix,;t t s,@tmac_wrap@,$tmac_wrap,;t t +s,@pnmcut@,$pnmcut,;t t +s,@pnmcrop@,$pnmcrop,;t t +s,@pnmtopng@,$pnmtopng,;t t +s,@gs@,$gs,;t t +s,@psselect@,$psselect,;t t +s,@make_html@,$make_html,;t t +s,@make_install_html@,$make_install_html,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF -EOF +_ACEOF - cat >>$CONFIG_STATUS <<\EOF + cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 @@ -4897,8 +6541,8 @@ EOF fi fi # test -n "$CONFIG_FILES" -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in @@ -4912,7 +6556,8 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ @@ -4923,60 +6568,84 @@ echo X"$ac_file" | /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - { case "$ac_dir" in - [\\/]* | ?:[\\/]* ) as_incr_dir=;; - *) as_incr_dir=.;; -esac -as_dummy="$ac_dir" -for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do - case $as_mkdir_dir in - # Skip DOS drivespec - ?:) as_incr_dir=$as_mkdir_dir ;; - *) - as_incr_dir=$as_incr_dir/$as_mkdir_dir - test -d "$as_incr_dir" || mkdir "$as_incr_dir" - ;; - esac -done; } - - ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" else - ac_dir_suffix= ac_dots= - fi + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } - case $srcdir in - .) ac_srcdir=. - if test -z "$ac_dots"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; *) # Relative path. - ac_srcdir=$ac_dots$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_dots$srcdir ;; - esac + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_dots$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then - { echo "$as_me:4971: creating $ac_file" >&5 + { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: - # /* config.h. Generated automatically by config.status. */ - configure_input="Generated automatically from `echo $ac_file_in | - sed 's,.*/,,'` by configure." + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. @@ -4986,7 +6655,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:4989: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -4999,23 +6668,29 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:5002: error: cannot find input file: $f" >&5 + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } -EOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin @@ -5026,16 +6701,243 @@ s,@INSTALL@,$ac_INSTALL,;t t rm -f $tmp/out fi + # Run the commands associated with the file. + case $ac_file in + stamp-h ) echo timestamp > stamp-h ;; + esac done -EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if cmp -s $ac_file $tmp/config.h 2>/dev/null; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } -cat >>$CONFIG_STATUS <<\EOF + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } -EOF +_ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open @@ -5054,3 +6956,23 @@ if test "$no_create" != yes; then $ac_cs_success || { (exit 1); exit 1; } fi +{ echo "$as_me:$LINENO: + + Configuration completed. + + You can now say \`make' to compile the groff package and \`make install' + to install it afterwards. + + If you want to compile xditview, change the directory to \`src/xditview' + and follow the instructions given in the file \`INSTALL'. +" >&5 +echo "$as_me: + + Configuration completed. + + You can now say \`make' to compile the groff package and \`make install' + to install it afterwards. + + If you want to compile xditview, change the directory to \`src/xditview' + and follow the instructions given in the file \`INSTALL'. +" >&6;} diff --git a/contrib/groff/configure.ac b/contrib/groff/configure.ac index b8f111a..75c4799 100644 --- a/contrib/groff/configure.ac +++ b/contrib/groff/configure.ac @@ -1,5 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT +AC_CONFIG_HEADERS(src/include/config.h:src/include/config.hin) AC_CONFIG_SRCDIR([src/roff/groff/groff.cc]) dnl checks for programs GROFF_SRCDIR @@ -14,6 +15,7 @@ AC_PATH_PROG(PERLPATH, perl, /usr/bin/perl) GROFF_PROG_YACC AC_PROG_RANLIB GROFF_INSTALL_SH +GROFF_INSTALL_INFO AC_PROG_INSTALL AC_PROG_LN_S dnl use a dummy substitution if no csh hack is necessary to avoid errors @@ -22,20 +24,25 @@ GROFF_CSH_HACK(SH_SCRIPT_SED_CMD='1s/.*/:/', SH_SCRIPT_SED_CMD='1s/a/a/') AC_SUBST(SH_SCRIPT_SED_CMD) dnl checks for headers AC_CHECK_HEADERS(stdlib.h unistd.h dirent.h limits.h sys/dir.h \ - string.h strings.h math.h) + string.h strings.h math.h stdint.h sys/time.h) GROFF_ISC_SYSV3 GROFF_POSIX GROFF_SRAND +GROFF_NEED_DECLARATION(gettimeofday) GROFF_NEED_DECLARATION(hypot) GROFF_NEED_DECLARATION(popen) GROFF_NEED_DECLARATION(pclose) GROFF_NEED_DECLARATION(putenv) +GROFF_NEED_DECLARATION(strcasecmp) GROFF_NEED_DECLARATION(strncasecmp) GROFF_SYS_NERR GROFF_SYS_ERRLIST GROFF_OSFCN_H GROFF_LIMITS_H +GROFF_INTTYPES_H dnl checks for typedefs +GROFF_UNSIGNED_LONG_LONG +GROFF_UINTMAX_T GROFF_TIME_T AC_TYPE_SIGNAL GROFF_STRUCT_EXCEPTION @@ -45,9 +52,9 @@ dnl checks for functions AC_FUNC_MMAP saved_libs="$LIBS" LIBS="$LIBS -lc $LIBM" -AC_REPLACE_FUNCS(fmod strtol getcwd strerror putenv) +AC_REPLACE_FUNCS(fmod getcwd putenv snprintf strerror strtol) LIBS="$saved_libs" -AC_CHECK_FUNCS(rename strcasecmp strncasecmp strsep strdup) +AC_CHECK_FUNCS(gettimeofday isatty rename strcasecmp strncasecmp strsep) GROFF_MKSTEMP AC_DECL_SYS_SIGLIST dnl checks for compiler characteristics @@ -60,6 +67,18 @@ GROFF_BROKEN_SPOOLER_FLAGS GROFF_PAGE GROFF_G GROFF_TMAC -$srcdir/mkinstalldirs src/xditview -AC_CONFIG_FILES([Makefile src/xditview/Imakefile]) +GROFF_HTML_PROGRAMS +AC_CONFIG_FILES(stamp-h, [echo timestamp > stamp-h]) +AC_CONFIG_FILES([Makefile doc/Makefile src/xditview/Imakefile]) AC_OUTPUT +dnl +AC_MSG_NOTICE([ + + Configuration completed. + + You can now say `make' to compile the groff package and `make install' + to install it afterwards. + + If you want to compile xditview, change the directory to `src/xditview' + and follow the instructions given in the file `INSTALL'. +]) diff --git a/contrib/groff/contrib/eqn2graph/Makefile.sub b/contrib/groff/contrib/eqn2graph/Makefile.sub new file mode 100644 index 0000000..6ccdd98 --- /dev/null +++ b/contrib/groff/contrib/eqn2graph/Makefile.sub @@ -0,0 +1,19 @@ +MAN1=eqn2graph.n +CLEANADD=eqn2graph + +all: eqn2graph + +eqn2graph: eqn2graph.sh + rm -f $@; \ + sed -e "s|@g@|$(g)|g" \ + -e "s|@VERSION@|$(version)$(revision)|" \ + -e $(SH_SCRIPT_SED_CMD) $(srcdir)/eqn2graph.sh >$@; \ + chmod +x $@ + +install_data: eqn2graph + -test -d $(bindir) || $(mkinstalldirs) $(bindir) + -rm -f $(bindir)/eqn2graph + $(INSTALL_SCRIPT) eqn2graph $(bindir)/eqn2graph + +uninstall_sub: + -rm -f $(bindir)/eqn2graph diff --git a/contrib/groff/contrib/eqn2graph/eqn2graph.man b/contrib/groff/contrib/eqn2graph/eqn2graph.man new file mode 100644 index 0000000..aa71405 --- /dev/null +++ b/contrib/groff/contrib/eqn2graph/eqn2graph.man @@ -0,0 +1,97 @@ +.\" $Id: eqn2graph.man,v 1.2 2002/08/21 17:29:17 wlemb Exp $ +.\" This documentation is released to the public domain. +. +. +.\" Like TP, but if specified indent is more than half +.\" the current line-length - indent, use the default indent. +.de Tp +.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +.el .TP "\\$1" +.. +. +. +.TH EQN2GRAPH @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.IX eqn2graph +.SH NAME +eqn2graph \- convert an EQN equation into a cropped image +. +. +.SH SYNOPSIS +.B eqn2graph +[ +.B \-unsafe +] +[ +.BI \-format\ fmt +] +. +. +.SH DESCRIPTION +Reads an EQN equation (one line) as input; produces an image +file (by default in Portable Network Graphics format) suitable for the +Web as output. +.P +Your input EQN code should \fInot\fR have the .EQ/.EN preamble that +that normally precedes it within +.BR groff (@MAN1EXT@) +macros; nor do you need to have dollar-sign or other delimiters +around the equation. +.P +The output image will be a black-on-white graphic clipped to the +smallest possible bounding box that contains all the black pixels. +By specifying command-line options to be passed to +.BR convert (1) +you can give it a border, set the background transparent, set the +image's pixel density, or perform other useful transformations. +.P +This program uses +.BR @g@eqn (@MAN1EXT@), +.BR groff (@MAN1EXT@), +and the ImageMagick +.BR convert (1) +program. +These programs must be installed on your system and accessible on your +$PATH for \fBeqn2graph\fR to work. +. +. +.SH OPTIONS +.TP +.B \-unsafe +Run +.BR groff (@MAN1EXT@) +in the `unsafe' mode enabling the PIC macro +.B sh +to execute arbitrary commands. +The default is to forbid this. +.TP +.BI \-format\ fmt +Specify an output format; the default is PNG (Portable Network Graphics). +Any format that +.BR convert (1) +can emit is supported. +.PP +Command-line switches and arguments not listed above are passed to +.BR convert (1). +. +. +.SH FILES +.Tp \w'\fB@MACRODIR@/eqnrc'u+2n +.B @MACRODIR@/eqnrc +The +.BR @g@eqn (@MAN1EXT@) +initialization file. +. +. +.SH "SEE ALSO" +.BR @g@eqn (@MAN1EXT@), +.BR groff (@MAN1EXT@), +.BR gs (1), +.BR convert (1). +. +. +.SH AUTHOR +Eric S. Raymond . +. +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/contrib/groff/contrib/eqn2graph/eqn2graph.sh b/contrib/groff/contrib/eqn2graph/eqn2graph.sh new file mode 100644 index 0000000..e314dc9 --- /dev/null +++ b/contrib/groff/contrib/eqn2graph/eqn2graph.sh @@ -0,0 +1,74 @@ +#!/bin/sh +# +# eqn2graph -- compile EQN equation descriptions to bitmap images +# +# by Eric S. Raymond , July 2002 +# +# In Unixland, the magic is in knowing what to string together... +# +# Take an eqn equation on stdin, emit cropped bitmap on stdout. +# The pic markup should *not* be wrapped in .EQ/.EN, this script will do that. +# A -U option on the command line enables gpic/groff "unsafe" mode. +# A -format FOO option changes the image output format to any format +# supported by convert(1). All other options are passed to convert(1). +# The default format is PNG. +# +# This is separate from pic2graph because pic processing has some weird +# clipping effect on the output, mangling equations that are very wide +# or deep. Besides, this tool can supply its own delimiters. +# + +# Requires the groff suite and the ImageMagick tools. Both are open source. +# This code is released to the public domain. +# +# Here are the assumptions behind the option processing: +# +# 1. None of the options of eqn(1) are relevant. +# +# 2. Only the -U option of groff(1) is relevant. +# +# 3. Many options of convert(1) are potentially relevant, (especially +# -density, -interlace, -transparency, -border, and -comment). +# +# Thus, we pass -U to groff(1), and everything else to convert(1). +# +# $Id: eqn2graph.sh,v 1.2 2002/07/17 04:55:46 wlemb Exp $ +# +groff_opts="" +convert_opts="" +format="png" + +while [ "$1" ] +do + case $1 in + -unsafe) + groff_opts="-U";; + -format) + format=$2 + shift;; + -v | --version) + echo "GNU eqn2graph (groff) version @VERSION@" + exit 0;; + --help) + echo "usage: eqn2graph [ option ...] < in > out" + exit 0;; + *) + convert_opts="$convert_opts $1";; + esac + shift +done + +# Here goes: +# 1. Add .EQ/.EN. +# 2. Process through eqn(1) to emit troff markup. +# 3. Process through groff(1) to emit Postscript. +# 4. Use convert(1) to crop the Postscript and turn it into a bitmap. +tmp=/usr/tmp/eqn2graph-$$ +trap "rm ${tmp}.*" 0 2 15 +read equation +(echo ".EQ"; echo 'delim $$'; echo ".EN"; echo '$'"${equation}"'$') | \ + groff -e $groff_opts -Tps >${tmp}.ps \ + && convert -crop 0x0 $convert_opts ${tmp}.ps ${tmp}.${format} \ + && cat ${tmp}.${format} + +# End diff --git a/contrib/groff/contrib/groffer/ChangeLog b/contrib/groff/contrib/groffer/ChangeLog new file mode 100644 index 0000000..263dbcd --- /dev/null +++ b/contrib/groff/contrib/groffer/ChangeLog @@ -0,0 +1,460 @@ +2002-09-30 Bernd Warken + ________________________________________________________________ + * release of groffer 0.9.1 + + * TODO: remove done entries + - Remove request for different shells. + - Remove the 'sed' complaints. + +2002-07-15 Bernd Warken + + * groffer.sh: replace `sed' interface by direct `sed' + - This improves the performance of the shell programming parts + and shortens the groffer script by about 5%. + - Remove functions: string_del_append(), string_del_leading(), + string_del_trailing(), string_flatten(), string_get_before(), + string_get_leading(), string_replace_all(), string_sed_s(), + and their auxiliary functions. + - Replace all calls of these functions by direct `sed' commands. + - Define variables for special characters to ease `sed' calls. + - Remove `$APPEND'. + - Restrict list_from_string() to single character separators. + - Correct list_check() and base_name(). + - Add comments to all calls of `sed'. + + * groffer.sh: add run-time support for several shells + - New option `--shell': stop execution and rerun groffer under + the shell specified in the argument of `--shell'. + - If no shell was specified at run-time, `ash' is tried first; + if `ash' is not available continue with the shell with which + groffer was called from the command line, or with the shell + name in the first line of the script, actually `/bin/sh'. + +2002-07-12 Bernd Warken + ________________________________________________________________ + * fixes for groffer 0.9.0 + + * groffer.sh: enhance version information + `groffer -v|--version' now print: + - groffer's version number and date + - the string `is part of ' + - groff's version information (version number and copyright), + but not groff's `called subprograms' information. + + * groffer.sh: minor fixes + - Fix the argument parser to process argument `-' correctly. + - Some display programs have trouble with empty input; feed a + line consisting of a single space character in this case for + all display modes (not for source or groff modes). + + * TODO: + fix entry `shoop' (not 'shopt'). + +2002-06-28 Bernd Warken + ________________________________________________________________ + * release of groffer 0.9.0 + + * groffer.sh: new mode `pdf' + - PDF (Portable Document Format): + -> Transform groff `ps' output into pdf using `gs'. + -> Pro: PDF viewers provide text searching (!). + -> Con: the transformation is quite slow. + -> Not suitable as an auto mode. + - New options `--pdf', `--pdf-viewer', `--mode pdf'. + - Standard pdf viewers `xpdf' and `acroread'. + - For `xpdf', choose zoom `z 3' for 100 dpi, `z 2' for 75 dpi. + + * groffer.sh: support bzip2 decompression + - add test for `bzip2' with necessary options + - extend functions `catz()' and `save_stdin()'. + + * TODO + remove entry on `bzip' decompression (done). + + * groffer.man: + - Document new `pdf' features. + - Document new `bzip2' decompression. + - Fix documentation for `--auto-modes'. + + * groffer.sh: minor fixes + - Improve device tests in `tty' and `dvi' modes. + - Internally, map mode `auto' to '' to facilitate tests. + - Fix auto mode sequence to: `ps,x,tty' as was intended. + +2002-06-25 Bernd Warken + + * groffer.sh: + Fix `source' mode. + + * groffer.man: + Fix some indentations. + +2002-06-23 Bernd Warken + ________________________________________________________________ + * release of groffer 0.8 + + * Makefile.sub: add copyright section + + * groffer.man: + - Document the new options. + - Revise the documentation of the modes. + - Document the configuration files in new section `FILES'. + - Redesign section `EXAMPLES'. + - Remove documentation for `-W'. + + * groffer.sh: new debugging features + - Disabled by default; enabled by environment variables. + - Add landmark() to catch typos with quotes. + - Add a function call stack for suitable functions; implemented + as within the argument checker func_check(). + - This implies the need to provide `return' with some clean-up + facility; implemented as `eval "$_return_..."'. + - Add option `--debug' to enable debugging at run-time. + - Actually, the groffer script uses only shell builtins found + in `ash' (a subset of POSIX) and POSIX `sed' as the only + external shell utility. + + * groffer.sh: customization of viewers + - In `groff' mode, the groffer viewing facilities are disabled. + - The postprocessor option `-P' costumizes the viewer only in + some situations in the `groff' mode, so a new infrastructure + for viewer customization is necessary. + - Allow to specify arguments to the viewer programs specified + in `--*-viewer()'. + - Implement some of the essential X Toolkit resource options in + groffer, but with use a leading double minus. + -> `--bd': set border color. + -> `--bg', `--background': set background color. + -> `--bw': set border width. + -> `--display': set X display. + -> `--geometry': set size and position of viewer window. + -> `--fg', `--foreground': set foreground color. + -> `--ft', `--font': set font. + -> `--resolution': set X resolution in dpi. + -> `--title': set viewer window title. + -> `--xrm': set X resource. + - Remove misnamed option `--xrdb'. + + * groffer.sh: new mode structure + - New Postcript mode `ps' (`--ps'): + -> default viewers: gv,ghostview,gs_x11,gs; + -> `--ps-viewer' sets the Postscript viewer. + - New mode `www' (`--www') for displaying in a web browser: + -> default browsers: mozilla,netscape,opera,amaya,arena; + -> `--www-viewer' sets the web browser. + - New dvi mode (`--dvi'); default viewer `xdvi': + -> default viewers: xdvi,dvilx; + -> `--dvi-viewer' sets the dvi viewer. + - New mode `auto': + -> active if no other mode is given or by new option `--auto'; + -> selects from a sequence of modes that are tested until one + of them succeeds. + -> the default mode sequence is actually `ps', `x', `tty'. + -> `--default-modes' sets this mode sequence as a comma + separated string of program names, optionally each one + with arguments). + - New mode `groff': + -> process input like groff, ignore viewing options. + -> activated by new option `--groff'. + -> automatically active with one of `-V', `-X', `-Z'. + - Revise `tty' mode: + -> allow several text devices. + -> + - Reorganize the mode management: + -> new mode setting option `--mode'. + -> logically separate source, groff, and display modes. + -> intermediate output mode is now part of mode groff; remove + any special features around `-Z'. + - Update usage() to reflect the new option structure. + + * groffer.sh: add configuration files + - `/etc/groff/groffer.conf' system-wide configuration. + - `${HOME}/.groff/groffer.conf' user configuration. + - The configuration file are shell scripts for now; later + implementations can identify this from the `#! /bin/sh' line. + + * groffer.sh: new data structure `list': + - Implement a `list' data structure as a string consisting of + single-quoted elements, separated by a space character; + embedded single-quotes are escaped. + + * groffer.sh: new option parser based on `list': + - Write new option parser based on `list', compatible to both + POSIX getopts() and GNU getopt(). + - Long options are now available on GNU and non-GNU systems. + - Get rid of POSIX getopts() and GNU getopt(). + - the `-W--longopt' construct is now obsolete; remove it. + - add test/function for `unset'. + - Option strings are now implemented as `list's in order to + allow unusual characters in options. + - Parse $MANOPT first; translate essential arguments into + groffer options. + + * groffer.man: + - determine prompt length for `.Shell_cmd'* dynamically. + - naming scheme for static strings and registers changed to + `namespace:macro.variable'. + + +2002-06-16 Werner Lemberg + + * groffer.sh: + Implement man option `--ascii' by `-mtty-char'. + + +2002-05-31 Werner LEMBERG + + * groffer.man (@.Shell_cmd_width): + Increase to 4m (we use `sh#' as the prompt). + + +2002-05-31 Bernd Warken + ________________________________________________________________ + * release of groffer 0.7 + + * groffer.sh: remove incompatibilities with the `ash' shell: + - do not use `!command': + -> use `else' + -> write `_not_' equivalents for some functions + - do not use `[^]' in `case': + -> restructure some functions. + - only single-character names for loop variables: + -> spoils the paradigm of leading `_' for local variables. + - spurious trouble with `for i in ${var}': + -> use `eval set -- ${var}' and `for i in "$@"' + - do not change or use $IFS: + -> define new functions string_split() and `path_split()'. + -> result must be processed by `eval set --'. + -> solve conflicts with existing positional parameters. + - trouble with exporting external `$GROFF_*' variables: + -> hope that they were exported in the calling shell. + - not smart about additional blanks: + -> remove unnecessary white space. + + * groffer.sh: improve run-time speed: + - `ash' more than doubles the speed of `bash'. + - speed-up `man_setup()'. + + +2002-05-30 Werner Lemberg + + * groffer.man: + - remove some wrong `\:'. + - rename macro names that start with a `[' (clashes with refer). + - fix TP_header. + + +2002-05-28 Bernd Warken + ________________________________________________________________ + * release of groffer 0.6 + + This is almost a complete rewrite since groffer 0.5 . + ________________________________________________________________ + * Documentation + + * groffer.man: + - Apply the changes done in www.tmac (.URL and .MTO) + - Replace \fP by \f[]. + - Redesign and rewrite most macros. + - Include the documentation for the new features. + - Greatly enlarge section ENVIRONMENT + - Add examples. + + * TODO: + - Start a TODO file with several sections. + + * ChangeLog: + Due to the many changes, shorten and rearrange the entries + since groffer 0.5 . + ________________________________________________________________ + * Shell compatibility + + * groffer.sh: + - Due to possible conflicts in old BSD versions, `[]' was + replaced by `test'; the `test' options `-a' and `-o' were + replaced by multiple calls of `test'. + - Write interface to the `sed' command `s' to become + independent of the delimiter character. Rewrite all text + manipulating function to use this new scheme. The new + functions are named `string_*'. + - `tr' is not needed any longer, replaced by `sed'. + - `grep' is not needed any longer, mostly replaced by `case'. + - Revision of test for `getopt'. + - Remove `set -a'; explicitly export variables. + - The only external programs used are POSIX `sed' and the + fallback to `apropos'. All other program calls were + replaced by shell builtins and functions. + + ________________________________________________________________ + * Cosmetics + + * groffer.sh: + - Implement a prefix based naming scheme for local variables + and functions (OOP-like). + - Introduce variables for white space (better readability with + $IFS). + - Store the names of the processed filespecs into a variable + instead of a temporary file. + - Error-prone shell constructions were replaced by functions + with a simple interface. + - To avoid too long pipes, replace supercat() by do_fileargs(); + every input file is handled independently. + + ________________________________________________________________ + * New features: + - Add support for more X devices (e.g. X75-12 and X100-12). + - Add long option `--intermediate_output' to `-Z'. + - Make the options for mode selection clobber each other. + - Add option `--mode' with an argument having the following + values: + `X': force displaying in X, same as options `-X'; + `tty': display with a pager on text terminal; same as `--tty'; + `source', `default', `auto', etc. + - Make the handling of the X mode like in groff (e.g. -X -Tps). + - Make resolution for gxditview behave like groff (default + 75 dpi). + - Add environment variable $GROFFER_OPT to preset groffer + options. + + ________________________________________________________________ + * implement most of the functionality of GNU `man'. + + - Add all `man' long options to groffer. + - Add all `man' environment variables. + - Parse and use content of `$MANOPT'. + - The precedence of the options and environment variables + is regulated like in GNU `man'. + - Force the option `--manpath' to have a colon-separated + argument like GNU `man'. + - Support `man section name' calling convention. + - Remove all dependencies on `man -w'. + + * groffer.sh: + - Add the new features above. + - Rewrite the search algorithm for man pages. + - Remove searching with `man -w' (problems with space + characters in file names). + - Fix and complement usage(). + - The filespec parsers gets a function of its own do_manpage(). + + +2002-01-08 Bernd Warken + + * groffer 0.5 (beta) released + + * groffer.man: + - Fix hyphenation problems with macros describing options. + - Fix the handling of some `-' characters. + - Examples of shell commands now print in font CR instead of CB. + - Remove documentation for option `-X'. + - Add documentation for option `--dpi'. + + * groffer.sh: + - New method for creating temporary files, based on process + IDs. This is reliable enough and suitable for GNU and POSIX. + - Run gxditview in a new shell instantiation for having a clean + handling of the temporary files when running in the + background. + - Revision of the retrieving method for the window title. + - Empty input is now tolerated. + - Export the variables that are set before the call of `set -a'. + - Function usage() corrected and updated. + - Unnecessary stuff removed. + - Comments adjusted. + - Pass option `-X' to groff, i.e. force X output with 75 dpi. + - Implement option `--dpi' for setting the resolution for the X + viewer, which had already been documented in earlier versions. + +2002-01-07 Bernd Warken + + * groffer 0.4 (beta) released (as groff `contrib') + + * groffer.man: + - New features documented. + - Macros stream-lined. + - Section EXAMPLES added. + + * groffer.sh: + - System tests added/optimized. + - Speed/memory optimizations by defining some shell functions + alternatively depending on the text results. + - Use `gzip' for decompression instead of `zcat'. + - Signal handling added for clean exiting by `trap'. + - Temporary files exist only as long as necessary. + - Setup of path for man-pages moved after the option parsing. + - Fixed a bug in determining the path for man-pages. + - Fixed a bug in the handling of non-groffer options. + + * New features: + - New option --tty for forcing paging on text terminal. + - New option --no-man for disabling the man-page feature. + - Implement reserved POSIX -W feature to simulate long options. + - gxditview is now run as a background process. + +2002-01-05 Werner LEMBERG + + * Integrate groffer into groff's `contrib' tree. + + * Makefile: Replaced by... + Makefile.sub: New file. + + * groffer: Replaced by... + groffer.sh: New file. + + * groffer.man (OptDef): Add missing backslashes. + Update copyright. + +2001-12-15 Bernd Warken + + * groffer 0.3 (alpha) released (still stand-alone package). + + * GNU and POSIX are supported (POSIX without long options). + + * New options : --man, --mandb, --title, --xrdb + + * Support for command line arguments with embedded single space + characters (GNU only) . + + * Several search methods for man-pages when no `man -w' is + available ($MANPATH, mandb, a default path). + + * Language support for man-pages. + + * Recognize the following filespecs as man-page parameters: + man:name(section), man:name, name.section, name. + +2001-12-03 Bernd Warken + + * Stand-alone package for groffer 0.2 (alpha) created + Files: groffer, groffer.man, Makefile, TODO, ChangeLog + +2001-12-02 Bernd Warken + + * groffer 0.2 (alpha) program released. + + * Name changed from `groffview' to `groffer'. + + * Comments added. + + * Name changed from `groffview' to `groffer'. + + * Options harmonized with groff. + New options : -Q --source, -T --device, -X . + Other options known from groff are passed unchanged. + + * 100 dpi as default, 75 dpi only in emergency situations. + + * Bugs with temporary files fixed. + + * Code restructured and comments added. + +2001-11-28 Bernd Warken + + ***** groffview 0.1 (experimental) and groffview.man released + (predecessor of groffer, shell script) + + * Options : -h --help, -v --version + + * Search for man-pages based on $MANPATH + + * development of `groffview' shell script started diff --git a/contrib/groff/contrib/groffer/Makefile.sub b/contrib/groff/contrib/groffer/Makefile.sub new file mode 100644 index 0000000..4be6846 --- /dev/null +++ b/contrib/groff/contrib/groffer/Makefile.sub @@ -0,0 +1,47 @@ +# Makefile.sub for `groffer' (integration into the groff source tree) + +# File position: /contrib/groffer/Makefile.sub + +# Last update: 23 June 2002 + +# Copyright (C) 2001,2002 Free Software Foundation, Inc. +# Written by Werner Lemberg + +# This file is part of groff. + +# groff is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# groff is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +# License for more details. + +# You should have received a copy of the GNU General Public License +# along with groff; see the file COPYING. If not, write to the +# Free Software Foundation, 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA. + +######################################################################## + +MAN1=groffer.n +CLEANADD=groffer + +all: groffer + +groffer: groffer.sh + rm -f $@; \ + sed -e "s|@g@|$(g)|g" \ + -e "s|@VERSION@|$(version)$(revision)|" \ + -e $(SH_SCRIPT_SED_CMD) $(srcdir)/groffer.sh >$@; \ + chmod +x $@ + +install_data: groffer + -test -d $(bindir) || $(mkinstalldirs) $(bindir) + -rm -f $(bindir)/groffer + $(INSTALL_SCRIPT) groffer $(bindir)/groffer + +uninstall_sub: + -rm -f $(bindir)/groffer diff --git a/contrib/groff/contrib/groffer/TODO b/contrib/groff/contrib/groffer/TODO new file mode 100644 index 0000000..6ff8f65 --- /dev/null +++ b/contrib/groff/contrib/groffer/TODO @@ -0,0 +1,53 @@ +# TODO file for `groffer' + +# File position: /contrib/groffer/TODO + +# Last update: 30 Sep 2002 + +# Copyright (C) 2001,2002 Free Software Foundation, Inc. +# Written by Bernd Warken + +# This file is part of groff. + +# groff is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# groff is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +# License for more details. + +# You should have received a copy of the GNU General Public License +# along with groff; see the file COPYING. If not, write to the +# Free Software Foundation, 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA. + +######################################################################## + +TODO + +Optimization: +- Optimize man path determination in manpath_add_lang_sys() for speed + by building-up the man path only by and by as far as necessary + (not trivial). + +Features: +- Consider using the `shoop' package (OOP for `sh'). +- Revise option handling of `grog'. +- `gxditview' needs a complete shower. + +Revision: +- Should there be a native implementation for `--apropos'? +- Revise the `--all' feature to better reflect GNU man. +- The debug function stack is buggy (no effect on normal operation). + +Documentation: +- Write a README file. +- Improve the documentation of the search algorithm for man pages in + both the groffer script and the man page `groffer.man'. +- In `groff.man', add more documentation for parts that were taken over + from GNU `man'. +- The documentation in the headers for some function definitions in + `groffer.sh' needs to be updated. diff --git a/contrib/groff/contrib/groffer/groffer.man b/contrib/groff/contrib/groffer/groffer.man new file mode 100644 index 0000000..fd72504 --- /dev/null +++ b/contrib/groff/contrib/groffer/groffer.man @@ -0,0 +1,2836 @@ +.TH GROFFER @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +groffer \- display groff files and man\~pages on X and tty +. +.SH "SYNOPSIS" +.\" The .SH was moved to this place in order to appease `apropos'. +. +.\" -------------------------------------------------------------------- +.\" Legalize +.\" -------------------------------------------------------------------- +. +.ig +groffer.1 - man page for groffer (section 1). + +Source file position: /contrib/groffer/groffer.man +Installed position: $prefix/share/man/man1/groffer.1 + +Version : groffer 0.9.1 +Last update : 30 Sep 2002 + +This file is part of groff, the GNU roff type-setting system. + +Copyright (C) 2001, 2002 Free Software Foundation, Inc. +Written by Bernd Warken + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with the +Invariant Sections being this .ig-section and AUTHORS, with no +Front-Cover Texts, and with no Back-Cover Texts. + +A copy of the Free Documentation License is included as a file called +FDL in the main directory of the groff source package. +.. +. +.\" -------------------------------------------------------------------- +.\" Setup +.\" -------------------------------------------------------------------- +. +.mso www.tmac +. +.if n \{\ +. mso tty-char.tmac +. ftr CR R +. ftr CI I +. ftr CB B +.\} +. +.if '\*[.T]'dvi' \{\ +. ftr CB CW +.\} +. +.ds @- "\-\"" +.ds @-- "\-\^\-\"" +. +.ds @b- "\f[CB]-\f[]\"" +.ds @b-- "\f[CB]--\f[]\"" +. +.ds @i- "\f[CI]-\f[]\"" +.ds @i-- "\f[CI]--\f[]\"" +. +.ds Ellipsis .\|.\|.\" +. +.\" -------------------------------------------------------------------- +.\" setup for the macro definitions below +.\" +.\" naming: namespace:cathegory_macro.variable_name (experimental) +. +.\" -------------------------------------------------------------------- +.\" configuration of prompt for `.Shell_cmd'* macros +.ds groffer:Shell_cmd.prompt_text sh#\" prompt for shell commands +.ds groffer:Shell_cmd+.prompt_text >\" prompt on continuation lines +.ds groffer:Shell_cmd_base.prompt_font I\" font for prompts +. +.\" automatically determine setup from the configuration above +.als @f groffer:Shell_cmd_base.prompt_font\" +.als @t groffer:Shell_cmd.prompt_text\" +.als @t+ groffer:Shell_cmd+.prompt_text\" +.ds groffer:Shell_cmd.prompt \f[\*[@f]]\*[@t]\f[]\" needed +.ds groffer:Shell_cmd+.prompt \f[\*[@f]]\*[@t+]\f[]\" needed +.nr @w \w'\*[groffer:Shell_cmd.prompt]'\" +.nr @w+ \w'\*[groffer:Shell_cmd+.prompt]'\" +.ft \*[@f] +.\" Full prompt width is maximum of texts plus 1m +.nr groffer:Shell_cmd_base.prompt_width (\n[@w]>?\n[@w+]+1m)\" needed +.ft +.rm @f +.rm @f+ +.rm @t +.rm @t+ +.rr @w +.rr @w+ +. +.\" -------------------------------------------------------------------- +.\" static register for inter-macro communication in `.Synopsis'* +.nr groffer:Synopsis.level 0 +. +.\" -------------------------------------------------------------------- +.\" static registers for inter-macro communication in `.TP'* +.nr groffer:TP.level 0 +.rr groffer:TP_header.flag +.rr groffer:TP_body.flag +.rr groffer:TP.indent +. +. +.\" -------------------------------------------------------------------- +.\" Macro definitions +. +.\" Ignore all arguments like a comment, even after a .eo call. +.de c +.. +.c -------------------------------------------------------------------- +.c .CB (...) +.c +.c Print in constant-width bold font. +.c +.de CB +. ft CB +. Text \\$* +. ft +.. +.c -------------------------------------------------------------------- +.c .CI (...) +.c +.c Print in constant-width italic font. +.c +.de CI +. ft CI +. Text \\$* +. ft +.. +.c -------------------------------------------------------------------- +.c .CR (...) +.c +.c Print in constant-width roman font. +.c +.de CR +. ft CR +. Text \\$* +. ft +.. +.c -------------------------------------------------------------------- +.c .Error (...) +.c +.c Print error message to terminal and abort. +.c +.de Error +. tm \\$* +. ab +.. +.c -------------------------------------------------------------------- +.c .Env_var ( []) +.c +.c Display an environment variable, with optional punctuation. +.c +.de Env_var +. nh +. SM +. Text \f[CB]\\$1\f[]\\$2 +. hy +.. +.c -------------------------------------------------------------------- +.c .Opt_- ([]) +.c +.c Print `-' (minus sign); optional punctuation. +.c +.de Opt_- +. ie (\\n[.$] == 0) \ +. Opt_alt - "" +. el \ +. Opt_alt - "" "\\$1" +.. +.c -------------------------------------------------------------------- +.c .Opt_[-] ([]) +.c +.c Print `Opt_[-]' (minus sign in brackets); optional punctuation. +.c +.de Opt_[-] +. ie (\\n[.$] == 0) \ +. Opt_[alt] - "" +. el \ +. Opt_[alt] - "" "\\$1" +.. +.c -------------------------------------------------------------------- +.c .Opt_-- ([]) +.c +.c Print `--' (double minus); optional punctuation. +.c +.de Opt_-- +. ie (\\n[.$] == 0) \ +. Opt_alt -- "" +. el \ +. Opt_alt -- "" "\\$1" +.. +.c -------------------------------------------------------------------- +.c .Opt_[--] ([]) +.c +.c Print `Opt_[--]' (double minus in brackets); optional punctuation. +.c +.de Opt_[--] +. ie (\\n[.$] == 0) \ +. Opt_[alt] -- "" +. el \ +. Opt_[alt] -- "" "\\$1" +.. +.c -------------------------------------------------------------------- +.c .Opt_alt ([ ]... [ []]) +.c +.c Alternate options separated by a vertical bar. +.c +.c Arguments: +.c minus: either `-' or `--' (font CB). +.c opt: a name for an option, empty allowed (font CB). +.c arg: optionally, the argument to the option (font I). +.c punct: optional punctuation (in the starting font). +.c Result: +.c The minus/opt argument pairs, each +.c separated by a vertical bar `|', optionally add 'arg', separated +.c a space character ` '. +.c +.c Example: +.c .Opt_alt - T -- device -- device-troff device . +.c results in +.c -T|--device|--device-troff device. +.c +.de Opt_alt +. Opt_alt_base "" | "" \\$@ +.. +.c -------------------------------------------------------------------- +.c .Opt_[alt] ([ ]... [ []]) +.c +.c Alternate options in brackets for section SYNOPSIS. +.c +.c Arguments: +.c minus: either `-' or `--' (font CB). +.c opt: a name for an option, empty allowed (font CB). +.c arg: optionally, the argument to the option (font I). +.c punct: optional punctuation (in the starting font). +.c Global strings written to: +.c `@oa_prefix': left enclosing character (`[') +.c `@oa_sep': separator (`|') +.c `@oa_postfix': right enclosing character (`]') +.c Result: +.c The minus/opt argument pairs, each separated by a vertical +.c bar `|', optionally add 'arg', separated by a space character ` '. +.c +.c Example: +.c .Opt_[alt] - T -- device -- device-troff device . +.c results in +.c [-T|--device|--device-troff device]. +.c +.de Opt_[alt] +. Opt_alt_base [ | ] \\$@ +.. +.c -------------------------------------------------------------------- +.c .Opt_alt_base (
   [ ]... [arg [punct]])
+.c
+.c Alternating options; base macro for many others; do not use directly.
+.c
+.c Arguments:
+.c   
: prefix, resulted is preceded by this.
+.c   : separator between minux/opt pairs.
+.c   : postfix, is appended to the result.
+.c   : either `-' or `--' (font CB).
+.c   : a name for an option, empty allowed (font CB).
+.c   : optionally, the argument to the option (font I).
+.c   : optional punctuation (in the starting font).
+.c Result:
+.c   String `
' followed by the / argument pairs, each
+.c   separated by string `', optionally add '', separated by
+.c   a single space ` ', followed by the string `'.
+.c
+.de Opt_alt_base
+.  nr @font \\n[.f]\"
+.  if (\\n[.$] < 3) \
+.    Error .\\0: not enough arguments.
+.  ds @pre \)\\$1\)\"                   prefix
+.  ds @sep \)\\$2\)\"                   separator
+.  ds @post \)\\$3\)\"                  postfix
+.  shift 3
+.  nr @count 0
+.  ds @res \f[CR]\\*[@pre]\"
+.  while (\\n[.$] >= 2) \{\
+.    c                                  do the pairs, break on no `-'
+.    if !'\\$1'-' \{\
+.      if !'\\$1'--' \
+.        break
+.    \}
+.    c                                  separator
+.    if (\\n[@count] > 0) \
+.      as @res \f[CR]\\*[@sep]\"
+.    nr @count +1
+.    as @res \f[CB]\\$1\\$2\:\"           combine minus with option name
+.    shift 2
+.  \}
+.  if (\\n[.$] >= 3) \
+.    Error .\\0: wrong arguments: \\$@
+.  c                                     all pairs are done
+.  ie (\\n[.$] == 0) \
+.    as @res \f[CR]\\*[@post]\"
+.  el \{\
+.    c                                   optional option argument
+.    if !'\\$1'' \
+.      as @res \f[CR] \,\f[I]\\$1\"
+.    shift
+.    as @res \\f[CR]\\*[@post]\"         postfix
+.    if (\\n[.$] >= 1) \{\
+.      c                                 add punctuation
+.      as @res \f[\\n[@font]]\\$1\"
+.    \}
+.  \}
+.  nh
+.  Text \\*[@res]
+.  hy
+.  ft \\n[@font]
+.  rr @count
+.  rr @font
+.  rm @pre
+.  rm @post
+.  rm @sep
+.  rm @res
+..
+.c --------------------------------------------------------------------
+.c .Opt_def  ([ ]... [ []])
+.c
+.c Definitions of options in section OPTIONS.
+.c
+.c Arguments:
+.c   minus: either `-' or `--' (font CB).
+.c   opt: a name for an option, empty allowed (font CB).
+.c   arg: optionally, the argument to the option (font I).
+.c   punct: optional punctuation (in the starting font).
+.c Result:
+.c   The header for an indented paragraph, consisting of
+.c   minus/opt argument pairs, each, separated by a space
+.c   character ` ', optionally add 'arg', separated a space
+.c   character ` '.
+.c
+.c Example:
+.c  .Opt_def - T -- device -- device-troff device .
+.c  results in
+.c  -T --device --device-troff device.
+.c  as the header of for indented paragraph.
+.c
+.de Opt_def
+.  TP
+.    Opt_alt_base "" "\~|\~" "" \\$@
+..
+.c --------------------------------------------------------------------
+.c .Opt_element  ([ ]... [ []])
+.c
+.c Definitions of options in section OPTIONS.
+.c
+.c Arguments:
+.c   minus: either `-' or `--' (font CB).
+.c   opt: a name for an option, empty allowed (font CB).
+.c   arg: optionally, the argument to the option (font I).
+.c   punct: optional punctuation (in the starting font).
+.c Result:
+.c   The minus/opt argument pairs, each, separated by a space
+.c   character ` ', optionally add 'arg', separated a space
+.c   character ` '.
+.c
+.c Example:
+.c  .Opt_element - T -- device -- device-troff device .
+.c  results in
+.c  -T --device --device-troff device.
+.c
+.de Opt_element
+.  Opt_alt_base "" "\~" "" \\$@
+..
+.c --------------------------------------------------------------------
+.als Opt_list Opt_element
+.
+.c --------------------------------------------------------------------
+.c .Opt_long  ([ []])
+.c
+.c Print `--name' somewhere in the text; optional punctuation.
+.c
+.de Opt_long
+.  Opt_alt -- "\\$1" "" "\\$2"
+..
+.c --------------------------------------------------------------------
+.c .Opt_[long]  ([ []])
+.c
+.c Print `--name' somewhere in the text; optional punctuation.
+.c
+.de Opt_[long]
+.  Opt_[alt] -- "\\$1" "" "\\$2"
+..
+.c --------------------------------------------------------------------
+.c .Opt_short  ([ []])
+.c
+.c Print `-name' somewhere in the Text; optional punctuation.
+.c
+.de Opt_short
+.  Opt_alt - "\\$1" "" "\\$2"
+..
+.c --------------------------------------------------------------------
+.c .Opt_[short]  ([name [punct]])
+.c
+.c Print `[-name]' somewhere in the Text; optional punctuation.
+.c
+.de Opt_[short]
+.  Opt_[alt] - "\\$1" "" "\\$2"
+..
+.c --------------------------------------------------------------------
+.c .Shell_cmd  ( [] ...)
+.c
+.c A shell command line; display args alternating in fonts CR and CI.
+.c
+.c Examples:
+.c   .Shell_cmd "groffer --dpi 100 file"
+.c     result: `sh#  groffer --dpi 100 file'
+.c             with 'sh#' in font I, the rest in CR
+.c
+.c   .Shell_cmd groffer\~--dpi\~100\~file
+.c     result: the same as above
+.c
+.c   .Shell_cmd "groffer --dpi=" value " file"
+.c     result: sh#  groffer --dpi=value file
+.c             with `groffer --dpi=' and `file' in CR; `value' in CI
+.c
+.c   .Shell_cmd groffer\~--dpi= value \~file
+.c     result: the same as the previous example
+.c
+.de Shell_cmd
+.  groffer:Shell_cmd_base "\*[groffer:Shell_cmd.prompt]" \\$@
+..
+.c --------------------------------------------------------------------
+.c .Shell_cmd+  ( [] ...)
+.c
+.c A continuation line for .Shell_cmd.
+.c
+.de Shell_cmd+
+.  groffer:Shell_cmd_base "\*[groffer:Shell_cmd+.prompt]" \\$@
+..
+.c --------------------------------------------------------------------
+.c .Shell_cmd_base  ( [ [] ...])
+.c
+.c A shell command line; display args alternating in fonts CR and CI.
+.c Internal, do not use directly.
+.c
+.c Globals: read-only register @.Shell_cmd_width
+.c
+.de groffer:Shell_cmd_base
+.  if (\\n[.$] <= 0) \
+.    return
+.  nr @+font \\n[.f]\"
+.  ds @prompt \\$1\"
+.  ft CR
+.  c gap between prompt and command
+.  nr @+gap \\n[groffer:Shell_cmd_base.prompt_width]-\\w'\\*[@prompt]'\"
+.  ds @res \\*[@prompt]\h'\\n[@+gap]u'\"
+.  shift
+.  ds @cf CR\"
+.  while (\\n[.$] > 0) \{\
+.    as @res \\f[\\*[@cf]]\\$1\"
+.    shift
+.    ie '\\*[@cf]'CR' \
+.      ds @cf I\"
+.    el \
+.      ds @cf CR\"
+.  \}
+.  br
+.  ad l
+.  nh
+.  nf
+.  Text \\*[@res]\"
+.  fi
+.  hy
+.  ad
+.  br
+.  ft \\n[@+font]
+.  rr @+font
+.  rr @+gap
+.  rm @cf
+.  rm @res
+..
+.c --------------------------------------------------------------------
+.c .Synopsis  ()
+.c
+.c Begin a synopsis section, to be ended by a ./Synopsis macro.
+.c
+.de Synopsis
+.  if (\\n[groffer:Synopsis.level] > 0) \
+.    Error .\\$0: previous .Synopsis was not closed by ./Synopsis.
+.  nh
+.  ds @1 \\$1\"
+.  nr @old_indent \\n(.i
+.  ad l
+.  in +\w'\fB\\*[@1]\0'u
+.  ti \\n[@old_indent]u
+.  B \\*[@1]\0\c
+.  rr @old_indent
+.  rm @1
+.  nr groffer:Synopsis.level +1\"        marker for ./Synopsis
+..
+.c  --------------------------------------------------------------------
+.c ./Synopsis  ()
+.c
+.c Close a synopsis section opened by the previous .Synopsis macro.
+.c
+.de /Synopsis
+.  if (\\n[groffer:Synopsis.level] <= 0) \
+.    Error .\\$0: no previous call of .Synopsis
+.  br
+.  ad
+.  in
+.  hy
+.  nr groffer:Synopsis.level -1
+..
+.c  --------------------------------------------------------------------
+.c .Text  (...)
+.c
+.c Treat the arguments as text, no matter how they look.
+.c
+.de Text
+.  if (\\n[.$] == 0) \
+.    return
+.  nop \)\\$*\)
+..
+.c --------------------------------------------------------------------
+.c .Topic  ([])
+.c
+.c A bulleted paragraph
+.c
+.de Topic
+.  ie (\\n[.$] = 0) \
+.    ds @indent 2m\"
+.  el \
+.    ds @indent \\$1\"
+.  TP \\*[@indent]
+.  Text \[bu]
+.  rm @indent
+..
+.c --------------------------------------------------------------------
+.c .TP+  ()
+.c
+.c Continuation line for .TP header.
+.c
+.de TP+
+.  br
+.  ns
+.  TP \\$1
+..
+.c --------------------------------------------------------------------
+.c .TP_header  ([])
+.c
+.c Start a multi-line header for a .TP-like paragraph
+.c
+.de TP_header
+.  if (\\n[groffer:TP.level] < 0) \
+.    Error .\\$0: wrong level.
+.  nr groffer:TP.level +1
+.  P
+.  ie (\\n[.$] == 0) \
+.    rr groffer:TP.indent
+.  el \
+.    nr groffer:TP.indent \\$1
+.  nr groffer:TP_header.flag 1
+..
+.c --------------------------------------------------------------------
+.c .TP_body  ([])
+.c
+.c End a previous .TP-header and beging the body of the paragraph.
+.c
+.de TP_body
+.  if !rgroffer:TP_header.flag \
+.    Error .\\$0: no previous call of .TP_header
+.  if (\\n[groffer:TP.level] <= 0) \
+.    Error .\\$0: wrong level.
+.  br
+.  ie (\\n[.$] == 0) \{\
+.    ie rgroffer:TP.indent \{\
+.      RS \\n[groffer:TP.indent]u
+.    \}
+.    el \
+.      RS
+.  \}
+.  el \
+.    RS \\$1u
+.  rr groffer:TP.indent
+.  rr groffer:TP_header.flag
+.  nr groffer:TP_body.flag 1
+..
+.c --------------------------------------------------------------------
+.c TP_end  ()
+.c
+.c End of former .TP_body paragraph.
+.c
+.de TP_end
+.  if !rgroffer:TP_body.flag \
+.    Error .\\$0: no previous .TP_body.
+.  if (\\n[groffer:TP.level] <= 0) \
+.    Error TP_end: wrong level.
+.  nr groffer:TP.level -1
+.  rr grogger:TP.indent
+.  rr groffer:TP_header.flag
+.  rr groffer:TP_body.flag
+.  br
+.  RE
+..
+.
+.\" End of macro definitions
+.
+.
+.\" --------------------------------------------------------------------
+.\" SH "SYNOPSIS"
+.\" --------------------------------------------------------------------
+.
+.ad l
+.Synopsis groffer
+.RI [ viewing_options ]
+.RI [ man_options ]
+.RI [ groff_options ]
+.Opt_[--]
+.RI [ "filespec" "\*[Ellipsis]]"
+./Synopsis
+.
+.Synopsis groffer
+.Opt_alt - h -- help
+./Synopsis
+.
+.Synopsis groffer
+.Opt_alt - v -- version
+./Synopsis
+.
+.
+.TP
+.I viewing_options
+These options determine and configure the display mode.
+.
+They were synchronized with the options of both
+.BR groff (@MAN1EXT@)
+and GNU
+.BR man (1).
+As groff uses almost any letter in its option set, only long option
+names are available for most features.
+.
+If none of these options is used groffer tries to find a suitable
+display mode automatically.
+.
+.
+.RS
+.
+.P
+.Opt_[alt] - Q -- source
+.Opt_[alt] - T -- device device
+.Opt_[alt] -- auto-modes mode1,mode2,\*[Ellipsis]
+.Opt_[alt] -- debug
+.Opt_[alt] -- default
+.Opt_[alt] -- dvi
+.Opt_[alt] -- dvi-viewer prog
+.Opt_[alt] -- groff
+.Opt_[alt] -- location
+.Opt_[alt] -- mode display_mode
+.Opt_[alt] -- pager program
+.Opt_[alt] -- pdf
+.Opt_[alt] -- pdf-viewer prog
+.Opt_[alt] -- ps
+.Opt_[alt] -- ps-viewer prog
+.Opt_[alt] -- shell
+.Opt_[alt] -- tty
+.Opt_[alt] -- www
+.Opt_[alt] -- www-viewer prog
+.Opt_[alt] -- x
+.Opt_[alt] -- x-viewer prog
+.
+.
+.P
+The following long options were adapted from the corresponding X
+Toolkit options with a single leading minus; see
+.BR X (1).
+.
+.
+.P
+.Opt_[alt] -- bd
+.Opt_[alt] -- bg -- background
+.Opt_[alt] -- bw
+.Opt_[alt] -- display
+.Opt_[alt] -- fg -- foreground
+.Opt_[alt] -- ft -- font
+.Opt_[alt] -- geometry size_pos
+.Opt_[alt] -- resolution value
+.Opt_[alt] -- rv
+.Opt_[alt] -- title string
+.Opt_[alt] -- xrm X_resource
+.
+.RE
+.
+.
+.TP
+.I groff_options
+Any combination of (short) options from the
+.BR groff (@MAN1EXT@)
+program is accepted; the options that are not explicitly handled by
+groffer are transparently passed to groff.
+.
+Due to the automatism in groffer, none of these groff options should
+be necessary, except for advanced usage.
+.
+.
+.RS
+.
+.P
+Because of the special outputting behavior of the groff options
+.Opt_short V,
+.Opt_short X,
+and
+.Opt_short Z,
+groffer was designed to be switched into
+.I groff
+mode by each of these options; in this mode, the groffer viewing
+features are disabled.
+.
+.P
+The other groff options do not switch the mode, but allow to customize
+the formatting process.
+.
+Useful groff formatting options include
+.Opt_short m
+(to add macro files that cannot be recognized by grog), and
+.Opt_short T
+(to specify an alternative device for the modes
+.I tty
+and
+.IR x ).
+.
+.RE
+.
+.
+.TP
+.I man_options
+These options regulate whether and how man pages are searched.
+.
+They are compatible with the long options of the
+.I GNU man
+program.
+.
+.
+.RS
+.
+.P
+.Opt_[alt] -- all
+.Opt_[alt] -- ascii
+.Opt_[alt] -- apropos
+.Opt_[alt] -- ditroff
+.Opt_[alt] -- extension suffix
+.Opt_[alt] -- locale language
+.Opt_[alt] -- local-file
+.Opt_[alt] -- man
+.Opt_[alt] -- manpath dir1:dir2:\*[Ellipsis]
+.Opt_[alt] -- no-location
+.Opt_[alt] -- no-man
+.Opt_[alt] -- sections sec1:sec2:\*[Ellipsis]
+.Opt_[alt] -- systems sys1,sys2,\*[Ellipsis]
+.Opt_[alt] -- troff-device device
+.Opt_[alt] -- whatis
+.
+.
+.P
+The GNU
+.I man
+long options that are not mentioned are recognized, but they are just
+ignored because of alternative implementations.
+.
+The full set of long and short options of the GNU man program can be
+passed via the environment variable
+.Env_var $MANOPT ;
+see
+.BR man (1)
+if your system has GNU man installed.
+.
+.RE
+.
+.
+.TP
+.I filespec
+is a sequence of file names or templates for searching
+man\~pages, see
+.BR man (1).
+A
+.I filespec
+can have one of the following forms.
+.
+.
+.RS
+.
+.TP 10m
+.I filename
+the path name of an existing file.
+.
+.
+.TP
+.Opt_short
+stands for standard input (can occur several times).
+.
+.
+.TP
+.BI man: name ( section )
+search the man\~page
+.I name
+in section\~\c
+.IR section .
+.
+.
+.TP
+.BI man: name . section
+search the man\~page
+.I name
+in section\~\c
+.IR section .
+.
+.
+.TP
+.BI man: name
+search the man\~page
+.I name
+in the lowest available section.
+.
+.
+.TP
+.IB name ( section )
+search the man\~page
+.I name
+in section\~\c
+.IR section .
+.
+.
+.TP
+.IB name . section
+search the man\~page
+.I name
+in section\~\c
+.IR section .
+.
+.
+.TP
+.I standard_section
+if this is `1', \*[Ellipsis], `9', `o', or `n' try to retrieve the
+next argument as a man\~page in this section.
+.
+.
+.TP
+.I name
+search for the man\~page
+.I name
+in the lowest available section.
+.
+.
+.P
+No
+.I filespec
+parameters means standard input.
+.
+.RE
+.
+.
+.P
+For details on the options, see section
+.BR OPTIONS .
+.
+.
+.\" --------------------------------------------------------------------
+.SH DESCRIPTION
+.\" --------------------------------------------------------------------
+.
+The
+.I groffer
+program is part of
+.BR groff (@MAN7EXT@).
+It can be used to display arbitrary documents written in the
+.BR roff (@MAN7EXT@)
+formatting language in several different ways, in an X window viewer
+program or in a text terminal.
+.
+The viewer programs can be chosen as the groff native viewer
+.BR gxditview (@MAN1EXT@),
+a Postcript or dvi display program, or a web browser.
+.
+.
+.P
+A search facility for manual pages (
+.IR man\~pages )
+is provided.
+.
+Almost the whole functionality of the
+.I GNU man
+program was provided or suitably adapted.
+.
+This makes the groffer program a valuable tool on systems with a poor
+.I man
+system.
+.
+.
+.P
+The program always concatenates all input specified by the non-option
+parameters of the calling command line or standard input.
+.
+Compressed standard input or files are decompressed on-the-fly.
+.
+.
+.P
+Normally, the input is run through the
+.BR groff (@MAN1EXT@)
+text processor before being displayed.
+.
+By using the option
+.Opt_short Q ,
+the roff source code is displayed without formatting.
+.
+.
+.P
+The formatting process can be regulated by all options that are
+available groff.
+.
+By using the
+.Opt_short T
+option, groffer can be switched to behave exactly like groff without
+using its viewer facilities, but additionally with the search and
+decompression features.
+.
+.
+.P
+All necessary options can be determined automatically.
+.
+For example, the groffer program internally uses the
+.BR grog (@MAN1EXT@)
+program to determine from the unformatted document which preprocessors
+should be run and which macro files should be included.
+.
+But all parts of the program can be controlled manually by suitable
+options.
+.
+.
+.\" --------------------------------------------------------------------
+.SH OPTIONS
+.\" --------------------------------------------------------------------
+.
+The groffer program provides its own parser for command line options
+that is compatible to both POSIX
+.BR getopts (1)
+and GNU
+.BR getopt (1).
+The command line behaves as usually.
+.
+For completeness, the details are provided here.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Option Parsing"
+.\" --------------------------------------------------------------------
+.
+The following types of options are supported, equally on all systems
+that are able to run the groffer program:
+.
+.
+.Topic
+single character options are always preceded by a single minus
+character, for example,
+.Opt_short c .
+.
+.
+.Topic
+the argument for a single character option is the next command line
+argument, for example,
+.Opt_alt - o\~ arg ,
+or can be appended to the option character within the same argument
+.Opt_alt - o arg .
+.
+.
+.Topic
+clusters of such single character options without an argument,
+eventually terminated by a single character option with an argument;
+for example,
+.Opt_alt - abo arg
+is equivalent to
+.Opt_short a\~\c
+.Opt_short b\~\c
+.Opt_short o\~\c
+.I arg .
+.
+.
+.Topic
+Long options, that means option with names longer than one character
+are always prededed by a double minus; an option argument can either
+go to the next command line argument or be appended with an equal sign
+to the argument; for example,
+.Opt_alt -- long= arg
+is equivalent to
+.Opt_alt -- long\~ arg .
+.
+.
+.Topic
+An argument of
+.Opt_--
+ends option parsing; all further command line arguments are
+interpreted as filespec arguments.
+.
+.
+.Topic
+By default, all command line arguments that are neither options nor
+option arguments are interpreted as filespec parameters and stored
+until option parsing has finished.
+.
+For example, the command line
+.Shell_cmd "groffer file1 -a -o arg file 2"
+is, by default, equivalent to
+.Shell_cmd "groffer -a -o arg -- file1 file 2"
+.
+.
+.Topic
+This behavior can be changed by setting the environment variable
+.Env_var $POSIXLY_CORRECT
+to a non-empty value; in this case, option processing is stopped as
+soon as the first non-option argument is found.
+.
+For example, in posixly correct mode, the command line
+.Shell_cmd "groffer file1 -a -o arg file 2"
+is equivalent to
+.Shell_cmd "groffer -- file1 -a -o arg file 2"
+As this leads to unwanted behavior in most cases, most people do not
+want to set
+.Env_var $POSIXLY_CORRECT .
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Compatibility with Options from other Programs"
+.\" --------------------------------------------------------------------
+.
+All short options of
+.I groffer
+are compatible with the short options of
+.BR groff (@MAN1EXT@).
+.
+Some of the
+.I groff
+options were given a special meaning within
+.IR groffer .
+.
+All other
+.I groff
+options are supported by
+.IR groffer ,
+but they are just transparently transferred to
+.I groff
+without any intervention.
+.
+Therefore these transparent options are not documented here, but in
+.BR groff (@MAN1EXT@).
+.
+.
+.P
+All long options of
+.I groffer
+are compatible with the long options of
+.BR man (1).
+.
+Most of the
+.I man
+long options were implemented as native options into
+.IR groffer .
+.
+These options are documented in the following; the other
+.I man
+options are recognized, but ignored.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Native groffer Options"
+.\" --------------------------------------------------------------------
+.
+.Opt_def - h
+Print usage message to standard error and exit.
+.
+.
+.Opt_def - Q
+Output the roff source code of the input files unprocessed.
+.
+This is the equivalent
+.Opt_long mode\~source .
+.
+.
+.Opt_def - T devname
+Switch to
+.Opt_long mode\~device ,
+.
+thus disabling the
+.I groffer
+viewing.
+.
+Instead, the input is formatted and postprocessed using plain
+.I groff
+with
+.I devname
+as the output device.
+.
+The allowed device names are listed in
+.BR groff (@MAN1EXT@).
+.
+Note that this forces all device names that begin with the letter
+.I X
+to be displayed with
+.BR gxditview (@MAN1EXT@);
+all other device names generate output for the specified device; this
+is printed onto standard output without a pager.
+.
+.
+.Opt_def - v
+Print version information onto standard error.
+.
+.
+.Opt_def - V
+Switch into
+.I groff
+mode and format the input with groff option
+.Opt_short V ;
+this produces the groff calling pipe without formatting the input.
+.
+This an advanced option from
+.BR groff (@MAN1EXT@) ,
+only useful for debugging.
+.
+.
+.Opt_def - X
+Switch into
+.I groff
+mode and format the input with groff option
+.Opt_short X ;
+actually, this formats the input and displays it with
+.BR gxditview (@MAN1EXT@) .
+.
+This differs from groffer's mode
+.I x
+because groffer's viewer options are not used, but the viewer is
+configured like in groff with the groff option
+.Opt_short P .
+This option is inhereted from
+.BR groff (@MAN1EXT@) .
+.
+.
+.Opt_def - Z
+Switch into
+.I groff
+mode and format the input with groff option
+.Opt_short Z ;
+this produces the groff intermediate output without postprocessing; see
+.BR groff_out (@MAN1EXT@) .
+This an advanced option from
+.BR groff (@MAN1EXT@) ,
+useful for debugging.
+.
+.
+.Opt_def -- all
+In searching man pages, retrieve all suitable ones instead of only one.
+.
+.
+.Opt_def -- apropos
+Instead of displaying, start the `apropos' command for searching
+within man page descriptions; only kept for compatibility with `man'.
+.
+.
+.Opt_def -- auto-modes mode1,mode2,\*[Ellipsis]
+Set the sequence of modes for default mode to the comma separated list
+given in the argument.
+.
+.
+.Opt_def -- background color
+This is equivalent to
+.Opt_long bg .
+.
+.
+.Opt_def -- bd pixels
+Specifies the color of the border surrounding the viewer
+window.
+.
+This is an adaption of the X Toolkit option
+.Opt_short bd .
+.
+The argument is an X color name, see
+.BR (1)
+for details.
+.
+.
+.Opt_def -- bg color
+Set the background color of the viewer window.
+.
+This is an adaption of the X Toolkit option
+.Opt_short bg .
+.
+The argument is an X color name, see
+.BR (1)
+for details.
+.
+.
+.Opt_def -- bw pixels
+Specifies the width in pixels of the border surrounding the viewer
+window (not available for all viewers).
+.
+This is an adaption of the X Toolkit option
+.Opt_short bw .
+.
+.
+.Opt_def -- debug
+Print debugging information.
+.
+Actually, a function call stack is printed if an error occurs.
+.
+.
+.Opt_def -- default
+Reset all configuration from previously processed command line options
+to the default values.
+.
+This is useful to wipe out all effects of former options and restart
+option processing using only the rest of the command line.
+.
+.
+.Opt_def -- device
+Eqivalent to
+.Opt_short T .
+.
+.
+.Opt_def -- display X-display
+Set the X display on which the viewer program shall be started, see
+.BR X (1)
+for the syntax of the argument.
+.
+.
+.Opt_def -- ditroff
+Eqivalent to
+.Opt_short Z .
+This is kept for compatibiliy with GNU
+.BR man (1).
+.
+.
+.Opt_def -- dvi
+Choose dvi mode; the formatted input is displayed with the  
+by default, the formatted input is displayed with the
+.BR xdvi (1)
+program.
+.
+.
+.Opt_def -- dvi-viewer prog
+Set the viewer program for dvi mode.
+.
+This can be a file name or a program to be searched in
+.Env_var $PATH .
+.
+Known dvi viewers inlude
+.BR xdvi (1)
+and
+.BR dvilx (1)
+.
+In each case, arguments can be provided additionally.
+.
+.
+.Opt_def -- extension suffix
+Restrict man\~page search to file names that have
+.I suffix
+appended to their section element.
+.
+For example, in the file name
+.I /usr/share/man/man3/terminfo.3ncurses.gz
+the man\~page extension is
+.IR ncurses .
+.
+Originates from GNU
+.IR man .
+.
+.
+.Opt_def -- foreground color
+This is equivalent to
+.Opt_short fg .
+.
+.
+.Opt_def -- fg color
+Set the foreground color of the viewer window.
+.
+This is an adaption of the X Toolkit option
+.Opt_short bg .
+.
+The argument is an X color name, see
+.BR (1)
+for details.
+.
+.
+.Opt_def -- font font_name
+This is equivalent to
+.Opt_short ft .
+.
+.
+.Opt_def -- ft font_name
+Set the font used by the viewer window.
+.
+This is an adaption of the X Toolkit option
+.Opt_short ft .
+.
+The argument is an X font name, see
+.BR (1)
+for details.
+.
+.
+.Opt_def -- geometry size_pos
+Set the geometry of the display window, that means its size and its
+starting position.
+.
+See
+.BR X (1)
+for details on the syntax of the argument.
+.
+If the actual display mode is not X then this option is ignored.
+.
+.
+.Opt_def -- groff
+Set
+.I groff
+mode.
+.
+Switch groffer to process the input like
+.BR groff (@MAN1EXT@).
+.
+This disables the groffer viewing features, all groffer viewing
+options are ignored.
+.
+.
+.Opt_def -- help
+Eqivalent to
+.Opt_short h .
+.
+.
+.Opt_def -- location
+Print the location of the retrieved files to standard error.
+.
+.
+.Opt_def -- locale language
+.
+Set the language for man pages.
+.
+This option originates from GNU
+.BR man (1).
+.
+.
+.Opt_def -- man
+Check the non-option command line arguments (filespecs) first on being
+man\~pages, then whether they represent an existing file.
+.
+By default, a filespec is first tested if it is an existing file.
+.
+.
+.Opt_def -- manpath "'dir1:dir2:\*[Ellipsis]'"
+Use the specified search path for retrieving man\~pages instead of the
+program defaults.
+.
+If the argument is set to the empty string "" the search for man\~page
+is disabled.
+.
+.
+.Opt_def -- mode value
+.
+Set the display mode.
+.
+The following mode values are recognized:
+.
+.
+.RS
+.
+.
+.TP
+.B auto
+Display in the default manner; this actually means to try the modes
+.IR ps ,
+.IR x ,
+and
+.I tty
+in this sequence.
+.
+Useful for restoring default mode when a different mode was specified
+with
+.Env_var $GROFFER_OPT .
+.
+.
+.TP
+.B dvi
+Display formatted input in a dvi viewer program; equivalent to
+.Opt_long dvi .
+.
+.
+.TP
+.B pdf
+Display formatted input in a PDF (Portable Document Format) viewer
+program; equivalent to
+.Opt_long pdf .
+.
+.
+.TP
+.B ps
+Display formatted input in a Postscript viewer program; equivalent to
+.Opt_long ps .
+.
+.
+.TP
+.B tty
+Display formatted input in a text terminal; equivalent to
+.Opt_long tty .
+.
+.
+.TP
+.B www
+Display formatted input in a internet browser program; equivalent to
+.Opt_long www .
+.
+.
+.TP
+.B x
+Display formatted input in a native roff viewer such as
+.BR gxditview (@MAN1EXT@); equivalent to
+.Opt_long x .
+.
+.
+.P
+The following modes do not use the
+.I groffer
+viewing features.
+.
+They are only interesting for advanced applications.
+.
+.
+.TP
+.B groff
+Generate device output with plain
+.I groff
+without using the special viewing features of
+.IR groffer .
+If no device was specified by option
+.Opt_short T
+the
+.I groff
+default
+.B ps
+is assumed.
+.
+.
+.TP
+.B source
+Display source code; same as
+.Opt_short Q .
+.
+.
+.RE
+.
+.
+.Opt_def -- no-location
+Do not display the location of retireved files; this resets a former
+call to
+.Opt_long location .
+.
+.
+.Opt_def -- no-man
+Do not check for man\~pages.
+.
+.
+.Opt_def -- pager
+Set the pager program in tty mode; default is
+.IR less .
+.
+.
+.Opt_def -- pdf
+Choose pdf mode (Portable Document Format).
+.
+By default, the input is formatted by groff using the Postscript
+device, then it is transformed into the PDF file format using
+.BR gs (1)
+(this is quite slow), and finally displayed either with the
+.BR xpdf (1)
+or the
+.BR acroread (1)
+program; this can be configured with option
+.Opt_long viewer-pdf .
+.
+PDF has a big advantage because the text is displayed graphically and
+is searchable nevertheless; but as thtransformation into pdf takes a
+considerable amount of time, the pdf mode is not suitable as a default
+device for the auto mode.
+.
+The only device that is compatible to this mode is
+.IR ps ,
+which is also the default when no device is specified.
+.
+.
+.Opt_def -- pdf-viewer prog
+Set the viewer program for
+.I pdf
+mode.
+.
+This can be a file name or a program to be searched in
+.Env_var $PATH .
+.
+In each case, arguments can be provided additionally.
+.
+.
+.Opt_def -- ps
+Choose ps mode (Postscript).
+.
+By default, the formatted input is displayed with the
+.BR ghostview (@MAN1EXT@)
+program; this can be configured with option
+.Opt_long viewer-ps .
+.
+The only device that is compatible to this mode is
+.IR ps ,
+which is also the default when no device is specified.
+.
+.
+.Opt_def -- ps-viewer prog
+Set the viewer program for
+.I ps
+mode.
+.
+This can be a file name or a program to be searched in
+.Env_var $PATH .
+.
+Common Postscript viewers inlude
+.BR gv (1),
+.BR ghostview (1),
+and
+.BR gs (1),
+.
+In each case, arguments can be provided additionally.
+.
+.
+.Opt_def -- resolution value
+Set X resolution in dpi (dots per inch) in some viewer programs.
+.
+The only supported dpi values are
+.B 75
+and
+.BR 100 .
+This is an adaption of the X Toolkit option
+.Opt_short resolution .
+.
+.
+.Opt_def -- rv
+Reverse foreground and background color of the viewer window.
+.
+This is an adaption of the X Toolkit option
+.Opt_short rv .
+This feature is not available in all viewer programs.
+.
+.
+.Opt_def -- sections
+Restrict searching for man pages to the given
+.IR sections ,
+a colon-separated list.
+.
+.
+.Opt_def -- shell "shell_program"
+Specify the shell under which the groffer script should be run.
+.
+The script first tests whether this option is set (either within
+.Env_var $GROFF_OPT
+or as a command line option); if so, the script is rerun under the
+shell program specified with the option argument.
+.
+.
+.Opt_def -- source
+Equivalent to
+.Opt_short Q .
+.
+.
+.Opt_def -- systems
+Search for man pages for the given operating systems; the argument
+.I systems
+is a comma-separated list.
+.
+.
+.Opt_def -- title "'some text'"
+Set the title for the viewer window.
+.
+This feature is not available in all viewer programs.
+.
+.
+.Opt_def -- to-postproc opt_or_arg
+Eqivalent to
+.Opt_short P .
+.
+.
+.Opt_def -- troff-device
+Eqivalent to
+.Opt_short T .
+This option is only kept for compatibility with GNU
+.BR man (1).
+.
+.
+.Opt_def -- tty
+Choose tty display mode, that means displaying in a text pager even
+when in X; eqivalent to
+.Opt_long mode\~tty .
+.
+.
+.Opt_def -- version
+Eqivalent to
+.Opt_short v .
+.
+.
+.Opt_def -- whatis
+Instead of displaying the content, get the one-liner description from
+the retrieved man page files \[em] or say that it is not a man page.
+.
+.
+.Opt_def -- where
+Eqivalent to
+.Opt_long location .
+.
+.
+.Opt_def -- www
+Choose www mode (html), display in a web browser program, which can be
+specified with option
+.Opt_long www-viewer .
+By default, the existence of a sequence of standard web browsers is
+tested, starting with
+.BR mozilla (1)
+and
+.BR netscape (1)
+.
+.
+.Opt_def -- www-viewer prog
+Set the web browser program for viewing in
+.I www
+mode.
+.
+Each program that accepts html input and allows the
+.BI file://localhost/ dir / file
+syntax on the command line is suitable; it can be the path name of an
+executable file or a program in
+.Env_var $PATH .
+.
+In each case, arguments can be provided additionally.
+.
+.
+.Opt_def -- x
+Choose
+.I x
+mode (view in X roff viewer).
+.
+By default, the formatted input is displayed with the
+.BR gxditview (@MAN1EXT@)
+program, being distributed together with groff, or with
+.BR xditview (1),
+which is distributed as a standard X tool.
+.
+This can be configured with option
+.Opt_long x-viewer .
+.
+The only devices (option
+.Opt_short T )
+that are compatible with this mode are
+.IR X75 ,
+.IR X100 ,
+.IR X75-12 ,
+.IR X100-12 ,
+and
+.I ps
+(the default device).
+.
+.
+.Opt_def -- x-viewer prog
+Set the viewer program for
+.I x
+mode.
+.
+Suitable viewer programs are
+.BR gxditview (@MAN1EXT@)
+and
+.BR xditview (1).
+.
+But the argument can be any executable file or a program in
+.Env_var $PATH .
+.
+In each case, arguments can be provided additionally.
+.
+.
+.TP
+.Opt_--
+Signals the end of option processing; all remaining arguments are
+interpreted as
+.I filespec
+parameters.
+.
+.
+.P
+Besides these, groffer accepts all arguments that are valid for the
+.BR groff (@MAN1EXT@)
+program.
+.
+All non-groffer options are sent unmodified via grog to groff.
+.
+Postprocessors, macro packages, compatibility with classical troff,
+and much more can be manually specified.
+.
+.
+.\" --------------------------------------------------------------------
+.SH "OUTPUT MODES"
+.\" --------------------------------------------------------------------
+.
+By default, the groffer program formats the input and then
+automatically chooses a suitable display mode, but the user can also
+choose between the following modes:
+.
+.Topic
+graphically display the formatted input with an X window program,
+including
+.
+.RS
+.Topic
+with X window roff viewers such as
+.BR gxditview (@MAN1EXT@)
+.RI ( x
+mode),
+.
+.Topic
+in a dvi viewer program
+.RI ( dvi
+mode),
+.
+.Topic
+in a Postscript viewer
+.RI ( ps
+mode),
+.
+.Topic
+in a PDF viewer
+.RI ( pdf
+mode),
+.
+.Topic
+in a web browser
+.RI ( www
+mode),
+.RE
+.
+.Topic
+display formatted input in a pager on the text terminal
+.RI ( tty
+mode),
+.
+.Topic
+run groffer like groff, but with decompression and man\~page searching
+.RI ( groff
+mode); this includes things like generating the groff intermediate
+output.
+.
+.Topic
+stream the unformatted source code of the input onto standard output
+.RI ( source
+mode),
+.
+.
+.P
+By
+.IR default ,
+.I groffer
+first tries whether
+.B x
+mode is possible, then
+.B ps
+mode, and finally
+.B tty
+mode.
+.
+This mode testing sequence for
+.B default
+mode can be changed by specifying a comma separated list of modes
+with the option
+.Opt_long default-modes.
+.
+.
+.P
+The searching for man\~pages and the decompression of the input are
+active in every mode.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Graphical Display Modes"
+.\" --------------------------------------------------------------------
+.
+The graphical display modes work only in the X window environment (or
+similar implementations within other windowing environments).
+.
+The environment variable
+.Env_var $DISPLAY
+or the option
+.Opt_long display
+are used for specifying the X display to be used; if neither is
+specified, groffer assumes that no X is running.
+.
+.
+.P
+A certain graphical display mode can be selected by one of the options
+.Opt_long dvi ,
+.Opt_long pdf ,
+.Opt_long ps ,
+.Opt_short X ,
+and
+.Opt_long www .
+.
+By default, some graphical modes are tried first.  If none succeeds
+groffer switches to
+.B tty
+mode.
+.
+.
+.P
+The graphical modes can be customized by options that were named
+according to the resource options in the
+.BR X (1)
+Toolkit but using a leading double minus instead of the single minus
+used by X.
+.
+These include
+.Opt_long background ,
+.Opt_long foreground ,
+.Opt_long geometry ,
+.Opt_long resolution ,
+.Opt_long title ,
+.Opt_long xrm ,
+etc.
+.
+.
+.P
+The
+.I pdf
+mode has a major advantage \[em] it is the only graphical diplay mode
+that allows to search for text within the viewer; this can be a really
+important feature.
+.
+Unfortunately, it takes a long time to transform the input into the
+PDF format, so it was not chosen as the major mode.
+.
+You can change this by the options
+.Opt_long pdf
+and
+.Opt_long auto-modes .
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Displaying on a tty"
+.\" --------------------------------------------------------------------
+.
+If the variable
+.Env_var $DISPLAY
+is not set or empty, groffer assumes that it should produce output on
+a text terminal.
+.
+This mode can also be forced by option
+.Opt_long tty .
+.
+.
+.P
+In the actual implementation, the groff output device
+.I latin1
+is chosen and the processed output is piped into a pager program.
+.
+This can be changed by specifying option
+.Opt_long tty-device .
+.
+.
+.P
+The pager to be used can be specified by option
+.Opt_long pager
+by the environment variable
+.Env_var $PAGER .
+If this is not set or empty the
+.BR less (1)
+program is used as the default pager.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Non-displaying Modes"
+.\" --------------------------------------------------------------------
+.
+There are some special modes that do not display the formatted output
+in a viewer program.
+.
+These modes are regarded as advanced, they are useful for debugging
+purposes.
+.
+.
+.TP
+.I source mode
+Instead of displaying the formatted output, it is also possible to
+have the roff source code streamed onto the standard output.
+.
+This mode must be requested by one of the options
+.Opt_short Q
+or
+.Opt_long source .
+.
+.
+.TP
+.I groff mode
+This mode disables the groffer viewing facilities.
+.
+The input is handled as usual with decompression and man\~page
+searching, but then it is passed to groff using only the options
+provided by groff.
+.
+This enables the user to save the generated output into a file or pipe
+it into another program.
+.
+In this mode, the input is formatted, but not postprocessed; see
+.BR groff_out (@MAN5EXT@)
+for details.
+.
+This mode is activated automatically by the three groff options
+.Opt_short V
+(print roff pipe, no formatting),
+.Opt_short X
+(display with gxditview in groff's native way, using
+.Opt_short P
+for customization), and
+.Opt_short Z
+(disable post-processing, thus producing the groff intermediate output).
+.
+.
+.\" --------------------------------------------------------------------
+.SH "FILE PARAMETERS"
+.\" --------------------------------------------------------------------
+.
+The non-option command line parameters determine which files should be
+displayed.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Filespecs"
+.\" --------------------------------------------------------------------
+.
+The default behavior of groffer is to first test whether the file
+parameter is represents a local file; if not, it is assumed to
+represent a filespec for searching one or more man\~page.
+.
+This behavior can be modified by options.
+.
+.
+.TP
+.Opt_long man
+forces to interpret all file parameters as filespecs for searching
+man\~pages.
+.
+.TP
+.Opt_long no-man
+.TP+
+.Opt_long local-file
+disable the man searching; so only local files are displayed.
+.
+.
+.P
+The following parameter formats are recognized to represent a wanted
+man\~page.
+.
+.
+.TP
+.BI man: name ( section )
+the quasi-URL notation used in many Desktop systems to 
+represent the man\~page
+.I name
+in
+.IR section .
+.
+.
+.TP
+.BI man: name
+search the man\~page
+.I name
+in the lowest section.
+The corresponding command with the man program would be
+.Shell_cmd man\~ name
+.
+.
+.TP
+.IB name . section
+the man\~page
+.I name
+in
+.IR section .
+The corresponding command with the man program would be
+.Shell_cmd man\~ section\~name
+.
+.
+.TP
+.I name
+if
+.I name
+is not an existing file search for the man\~page
+.I name
+in the lowest section just like
+.Shell_cmd man\~ name
+.
+.
+.TP
+.I section name
+Even this curious construct known from the various
+.I man
+programs is handled.
+.
+For example,
+.Shell_cmd "groffer 7 groff"
+was modelled according to
+.Shell_cmd "man 7 groff"
+retrieves the man\~page named
+.I groff
+in section 7.
+.
+Only a few standard section names are accepted, being actually the
+number sections
+.I 1, 2, 3, 4, 5, 6, 7, 8,
+and
+.IR 9,
+and the lower case letters
+.I `o'
+and
+.IR `n' .
+.
+.
+.P
+If neither a local file nor a man\~page was retrieved for some file
+parameter a warning is issued on standard error, but processing is
+continued.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Man\~Page Searching"
+.\" --------------------------------------------------------------------
+.
+The groffer program provides a search facility for system manual pages
+(man\~pages).
+.
+All long options, all environment variables, and most of the
+functionality of the GNU
+.BR man (1)
+program were implemented.
+.
+.
+.P
+Preformatted man\~pages (cat\~pages) are intentionally excluded from
+the search because groffer is a roff program that wants to format by
+its own, not spit out stuff that was digested previously by someone
+else.
+.
+With the excellent performance of the actual computers, the
+preformatted man\~pages aren't necessary any longer.
+.
+Due to their inflexible nature, they tend to provoke some trouble with
+changing line lengths and different environments in networks.
+.
+.
+.P
+The algorithm for retrieving man\~pages uses five search methods.
+.
+They are successively tried until a method works.
+.
+.
+.Topic
+The search path can be manually specified by using the option
+.Opt_long manpath .
+An empty argument disables the man\~page searching.
+.
+This overwrites the other methods.
+.
+.
+.Topic
+If this is not available the environment variable
+.Env_var $MANPATH
+is searched.
+.
+.
+.Topic
+If this is empty, the program tries to read it from the environment
+variable
+.Env_var $MANOPT .
+.
+.Topic
+If this does not work, the
+.BR manpath (1)
+program for determining a path of man directories is tried.
+.
+.
+.Topic
+If this does not work a reasonable default path is searched for
+man\~pages.
+.
+.
+.P
+After this, the path elements for the language (locale) and operating
+system specific man\~pages are added to the man\~path; their sequence
+is determined automatically.
+.
+For example, both
+.I /usr/share/man/linux/fr
+and
+.I /usr/share/man/fr/linux
+for french linux man\~pages are found.
+.
+The language and operating system names are determined from both
+environment variables and command line options.
+.
+.
+.P
+The locale (language) is determined like in GNU man, that is from
+highest to lowest precedence:
+.Topic
+.Opt_long locale
+.
+.Topic
+.Env_var $GROFFER_OPT
+.
+.Topic
+.Env_var $MANOPT
+.
+.Topic
+.Env_var $LCALL
+.
+.Topic
+.Env_var $LC_MESSAGES
+.
+.Topic
+.Env_var $LANG .
+.
+.
+.P
+The language locale is usually specified in the POSIX 1003.1 based
+format:
+.P
+\f[I]\f[][\f[CB]_\f[]\f[I]\f[][\f[CB].\f[]\
+\f[I]\f[][\f[CB],\f[]\f[I]\f[]]]],
+.P
+but the two-letter code in
+.I 
+is sufficient for most purposes.
+.
+.
+.P
+If no man\~pages for a complicated locale are found the country part
+consisting of the first two characters (without the `\f[CB]_\f[]',
+`\f[CB].\f[]', and `\f[CB],\f[]', parts) of the locale is searched as
+well.
+.
+.
+.P
+If still not found the corresponding man\~page in the default language
+is used instead.
+.
+As usual, this default can be specified by one of \f[CR]C\f[] or
+\f[CR]POSIX\f[].
+.
+The man\~pages in the default language are usually in English.
+.
+.
+.P
+Several operating systems can be given by appending their names,
+separated by a comma.
+.
+This is then specified by the environment variable
+.Env_var $SYSTEM
+or by the command line option
+.Opt_long systems .
+The precedence is similar to the locale case above from highest to
+lowest precedence:
+.
+Topic
+.Opt_long systems
+.
+.Topic
+.Env_var $GROFFER_OPT
+.
+.Topic
+.Env_var $MANOPT
+.
+.Topic
+.Env_var $SYSTEM .
+.
+.
+.P
+When searching for man\~pages this man\~path with the additional
+language and system specific directories is used.
+.
+.
+.P
+The search can further be restricted by limiting it to certain
+sections.
+.
+A single section can be specified within a filespec, several sections
+as a colon-separated list in command line option
+.Opt_long sections
+or environment variable
+.Env_var $MANSECT .
+.
+When no section was specified a set of standard sections is searched
+until a suitable man\~page was found.
+.
+.
+.P
+Finally, the search can be restricted to a so-called
+.IR extension .
+This is a postfix that acts like a subsection.
+.
+It can be specified by
+.Opt_long extension
+or environment variable
+.Env_var $EXTENSION .
+.
+.
+.P
+For further details on man\~page searching, see
+.BR man (1).
+.
+.
+.\" --------------------------------------------------------------------
+.SS Decompression
+.\" --------------------------------------------------------------------
+.
+The program has a decompression facility.
+.
+If standard input or a file that was retrieved from the command line
+parameters is compressed with a format that is supported by either
+.BR gzip (1)
+or
+.BR bzip2 (1)
+it is decompressed on-the-fly.
+.
+This includes the GNU
+.BR .gz ,
+.BR .bz2 ,
+and the traditional
+.B .Z
+compression.
+.
+The program displays the concatenation of all decompressed input in
+the sequence that was specified on the command line.
+.
+.
+.\" --------------------------------------------------------------------
+.SH "ENVIRONMENT"
+.\" --------------------------------------------------------------------
+.
+The groffer programs supports many system variables, most of them by
+courtesy of other programs.
+.
+All environment variables of
+.BR groff (@MAN1EXT@)
+and GNU
+.BR man (1)
+and some standard system variables are honored.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Native groffer Variables"
+.\" --------------------------------------------------------------------
+.
+.TP
+.Env_var $GROFFER_OPT
+Store options for a run of groffer.
+.
+The options specified in this variable are overridden by the options
+given on the command line.
+.
+The content of this variable is run through the shell builitin `eval';
+so arguments containing white-space or special shell characters should
+be quoted.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "System Variables"
+.\" --------------------------------------------------------------------
+.
+The groffer program is a shell script that is run through
+.BR /bin/sh ,
+which can be internally linked to programs like
+.BR bash (1).
+The corresponding system environment is automatically effective.
+.
+The following variables have a special meaning for groffer.
+.
+.
+.TP
+.Env_var $DISPLAY
+If this variable is set this indicates that the X window system is
+running.
+.
+Testing this variable decides on whether graphical or text output is
+generated.
+.
+This variable should not be changed by the user carelessly, but it can
+be used to start the graphical groffer on a remote X terminal.
+.
+For example, depending on your system, groffer can be started on the
+second monitor by the command
+.Shell_cmd DISPLAY=:0.1\~groffer\~ what.ever &
+.
+.
+.TP
+.Env_var $LC_ALL
+.TP+
+.Env_var $LC_MESSAGES
+.TP+
+.Env_var $LANG
+If one of these variables is set (in the above sequence), its content
+is interpreted as the locale, the language to be used, especially when
+retrieving man\~pages.
+.
+A locale name is typically of the form
+.IR language [\c
+.B _\c
+.IR territory [\c
+.B .\c
+.IR codeset [\c
+.B @\c
+.IR modifier ]]],
+where
+.I language
+is an ISO 639 language code,
+.I territory
+is an ISO 3166 country code, and
+.I codeset
+is a character set or encoding identifier like ISO-8859-1 or UTF-8;
+see
+.BR setlocale (3).
+.
+The locale values\~\c
+.B C
+and
+.B POSIX
+stand for the default, i.e. the man\~page directories without a
+language prefix.
+.
+This is the same behavior as when all 3\~variables are unset.
+.
+.
+.TP
+.Env_var $PAGER
+This variable can be used to set the pager for the tty output.
+.
+For example, to disable the use of a pager completely set this
+variable to the
+.BR cat (1)
+program
+.Shell_cmd PAGER=cat\~groffer\~ anything
+.
+.
+.TP
+.Env_var $PATH
+All programs within the groffer shell script are called without a
+fixed path.
+.
+Thus this environment variable determines the set of programs used
+within the run of groffer.
+.
+.
+.TP
+.Env_var $POSIXLY_CORRECT
+If set to a non-empty value this chooses the POSIX mode for option
+processing, that means that option processing will be finished as soon
+as a non-option argument is found.
+.
+Usually, you do not want to set this environment variable.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Groff Variables"
+.\" --------------------------------------------------------------------
+.
+The groffer program internally calls groff, so all environment
+variables documented in
+.BR groff (@MAN1EXT@)
+are internally used within groffer as well; see there for details.
+.
+The following variables have a direct meaning for the groffer program.
+.
+.TP
+.Env_var $GROFF_TMPDIR
+If the value of this variable is an existing, writable directory,
+groffer uses it for storing its temporary files, just as groff does.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Man Variables"
+.\" --------------------------------------------------------------------
+.
+Parts of the functionality of the man program were implemented in
+groffer; support for all environment variables documented in
+.BR man (1)
+was added to groffer, but the meaning was slightly modified due to the
+different approach in groffer; but the user interface is the same.
+.
+The man environment variables can be overwritten by options provided
+with
+.Env_var $MANOPT ,
+which in turn is overwritten by the command line.
+.
+.
+.TP
+.Env_var $EXTENSION
+Restrict the search for man\~pages to files having this extension.
+.
+This is overridden by option
+.Opt_long extension ;
+see there for details.
+.
+.
+.TP
+.Env_var $MANOPT
+This variable contains options as a preset for
+.BR man (1).
+As not all of these are relevant for groffer only the essential parts
+of its value are extracted.
+.
+The options specified in this variable overwrite the values of the
+other environment variables taht are specific to man.
+.
+All options specified in this variable are overridden by the options
+given on the command line.
+.
+.
+.TP
+.Env_var $MANPATH
+If set, this variable contains the directories in which the man\~page
+trees are stored.
+.
+This is overridden by option
+.Opt_long manpath .
+.
+.
+.TP
+.Env_var $MANSECT
+If this is a colon separated list of section names, the search for
+man\~pages is restricted to those manual sections in that order.
+.
+This is overridden by option
+.Opt_long sections .
+.
+.
+.TP
+.Env_var $SYSTEM
+If this is set to a comma separated list of names these are interpreted
+as man\~page trees for different operating systems.
+.
+This variable can be overwritten by option
+.Opt_long systems ;
+see there for details.
+.
+.
+.P
+The environment variable
+.Env_var $MANROFFSEQ
+is ignored by groffer because the necessary preprocessors are
+determined automatically.
+.
+.
+.\" --------------------------------------------------------------------
+.SH "FILES"
+.\" --------------------------------------------------------------------
+.
+The groffer program can be preconfigured by two configuration files.
+.
+Both of them are shell scripts that are called at the beginning of
+groffer using the `\c
+.CB .\~\c
+.IR filename '
+syntax.
+.
+.
+.TP
+.CB /etc/groff/groffer.conf
+System-wide configuration file for groffer.
+.
+.
+.TP
+.CB $HOME/.groff/groffer.conf
+User-specific configuration file for groffer, where
+.Env_var $HOME
+denotes the user's home directory.
+.
+This script is called after the system-wide configuration file to
+enable overriding by the user.
+.
+.
+.P
+It makes sense to use these configuration files for the following
+tasks:
+.
+.Topic
+Preset environment variables recognized by groffer; preferably a
+variable should only be set when it is unset in order not to override
+a user-provided value.
+.
+.Topic
+Preset command line options by prepending them to
+.Env_var $GROFFER_OPT ;
+prepending should be preferred to appending and setting in order not
+to delete the environment variable provided by the 
+.
+.Topic
+Write functions for calling viewer programs in a special way and feed
+them into the
+.Opt_long \f[I]*\f[]-viewer
+options.
+.
+Note that the name of such a function must coincide with some existing
+program in the system path
+.Env_var $PATH
+in order to be recognized by groffer.
+.
+.
+.P
+As an example, consider the following configuration file.
+.
+.P
+.ft CR
+.nh
+.nf
+#! /bin/sh
+# ~/.groff/groffer.conf
+if test "$DISPLAY" = ""; then
+  DISPLAY='localhost:0.0';
+fi;
+GROFF_OPT="--resolution=100 $GROFF_OPT";
+gxditview()
+{
+  /usr/local/bin/gxditview --fg DarkBlue "$@";
+}
+.fi
+.hy
+.ft
+.
+.
+.P
+This has the following effects:
+.Topic
+allows to start groffer in a graphical mode even from a text
+terminal;
+.Topic
+all graphical modes use a resolution of 100 dpi where applicable;
+.Topic
+the
+.BR gxditview (@MAN1EXT@)
+program is told to use
+.I DarkBlue
+as the text color.
+.
+These configurations can be overridden by command line options and by
+environment variable
+.Env_var $GROFFER_OPT .
+.
+.
+.\" --------------------------------------------------------------------
+.SH "EXAMPLES"
+.\" --------------------------------------------------------------------
+.
+The usage of groffer is very easy.
+.
+Usually, it is just called with a file name or man\~page.
+.
+The following examples, however, show that groffer has much more fancy
+capabilities.
+.
+.
+.TP
+.Shell_cmd "groffer\~/usr/local/share/doc/groff/meintro.ms.gz"
+Decompress, format and display the compressed file
+.I meintro.ms.gz
+in the directory
+.IR /usr/local/share/doc/groff ,
+using a default graphical viewer when in X window, or the
+.BR less (1)
+pager program when not in X.
+.
+.
+.TP
+.Shell_cmd "groffer\~groff.7\~groff\~\[cq]troff(1)\[cq]\~man:roff"
+.
+The arguments that are not existing files are looked-up as the
+following man\~pages:
+.I groff
+(in section\~7),
+.I groff
+(automatic search, should be found in section\~1),
+.I troff
+(in section\~1),
+and
+.I roff
+(in the section with the lowest number, being\~7 in this case).
+.
+The quotes around
+.I \[cq]troff(1)\[cq]
+are necessary because the paranthesis are special shell characters;
+escaping them with a backslash character
+.I \[rs](
+and
+.I \[rs])
+would be possible, too.
+.
+The formatted files are concatenated and displayed in one piece.
+.
+.
+.TP
+.Shell_cmd "LANG=de\~groffer\~--man\~--www\~--www-viever=netscape\~ls"
+.
+Retrieve the German man\~page for the
+.B ls
+program (or the English one if there is a German version), decompress
+it, format it into the html format and view the result in the default
+web browser
+.I netscape .
+The option
+.Opt_long man
+guarantees that the man\~page is retrieved, even when a local file
+.I ls
+exists in the actual directory.
+.
+.
+.TP
+.Shell_cmd "groffer\~-Q\~'man:roff(7)'"
+.
+Print the unformatted content of the man\~page called
+.I roff
+in section 7 on standard output.
+.
+.
+.TP
+.Shell_cmd "groffer\~-Z\~-mfoo"
+.
+Decompress the standard input, switch to
+.I groff
+mode, format the input with groff using the macro package foo, but do
+not postprocess the result, thus producing the intermediate output.
+.
+.
+.TP
+.Shell_cmd "echo\~'\[rs]f[CB]WOW!'\~|"
+.TP+
+.Shell_cmd+ "groffer --x --bg red --fg yellow --geometry 200x100"
+.
+Display \f[CB]WOW!\f[] in a small window in constant-width bold font,
+using color yellow on red background.
+.
+.
+.\" --------------------------------------------------------------------
+.SH "COMPATIBILITY"
+.\" --------------------------------------------------------------------
+.
+The
+.B groffer
+shell script is compatible to both POSIX and GNU.
+.
+POSIX compatibility refers to
+.B IEEE P1003.2/D11.2
+of September 1991, a very early version of this standard.
+.
+The script uses only a quite restricted set of shell language elements
+and shell builtins, common to all POSIX versions; the only external
+program used is `sed', again only the most basic POSIX features of
+`sed' are used.
+.
+The groffer script should work on most actual free and commercial
+operating systems.
+.
+.
+.P
+The groffer program provides its own parser for command line options;
+it can handle option arguments and file names containing white space
+and a large set of special characters.
+.
+.
+.P
+The groffer shell script was tested with the following common
+implementations of the POSIX shell:
+.BR ash (1),
+.BR bash (1),
+.BR ksh (1),
+and POSIX
+.BR sh (1),
+and others.
+.
+Free POSIX compatible shells and shell utilities for most operating
+systems are available at the
+.URL http://\:www.gnu.org/software/ "GNU software archive" .
+.
+.
+.P
+The best performance was obtained with the
+.I ash
+shell; so groffer tries to run under
+.I ash
+whenever possible.
+.
+The procedure to determine the shell to run groffer was programmed to
+be as follows:
+.
+.
+.Topic
+the argument of the command line option
+.Opt_long shell ;
+if not set
+.
+.Topic
+the argument of the option
+.Opt_long shell
+in the environment variable
+.Env_var $GROFF_OPT ;
+if not set
+.
+.Topic
+try
+.IR ash ;
+if not available
+.
+.Topic
+continue with the shell under which the script was started in the
+first place.
+.
+.
+.\" --------------------------------------------------------------------
+.SH "SEE ALSO"
+.\" --------------------------------------------------------------------
+.
+.TP
+.BR groff (@MAN1EXT@)
+.TP+
+.BR troff (@MAN1EXT@)
+Details on the options and environment variables available in groff;
+all of them can be used with groffer.
+.
+.
+.TP
+.BR grog (@MAN1EXT@)
+Internally, groffer tries to guess the groff command line options from
+the input using this program.
+.
+.
+.TP
+.BR groff_out (@MAN5EXT@)
+Documentation on the groff intermediate output (ditroff output).
+.
+.
+.TP
+.BR xdvi (1)
+.TP+
+.BR dvilx (1)
+Viewers for groffer's
+.I dvi
+mode.
+.
+.
+.TP
+.BR gv (1)
+.TP+
+.BR ghostview (1)
+Viewers for groffer's
+.I ps
+mode.
+.
+.
+.TP+
+.BR gs (1)
+Transformer from
+.I ps
+to
+.IR pdf ;
+and a
+.I ps
+viewer.
+.
+.
+.TP
+.BR xpdf (1)
+Viewers for
+.I pdf
+files.
+.
+.
+.TP
+.BR gxditview (@MAN1EXT@)
+.TP+
+.BR xditview (1x)
+Viewers for groffer's
+.I x
+mode.
+.
+.
+.TP
+.BR gzip (1)
+.TP+
+.BR bzip2 (1)
+The decompression programs supported by groffer.
+.
+.
+.TP
+.BR man (1)
+The standard program to diplay man\~pages.
+.
+The information there is only useful if it is the man\~page for
+.IR "GNU\~man" .
+Then it documents the options and environment variables that are
+supported by groffer.
+.
+.
+.\" --------------------------------------------------------------------
+.SH "AUTHOR"
+.\" --------------------------------------------------------------------
+.
+Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+.
+.P
+This document is distributed under the terms of the FDL (GNU Free
+Documentation License) version 1.1 or later.
+.
+You should have received a copy of the FDL on your system, it is also
+available on-line at the
+.URL http://\:www.gnu.org/\:copyleft/\:fdl.html "GNU copyleft site" .
+.
+.P
+This document is part of
+.IR groff ,
+the GNU roff distribution.
+.
+It was written by
+.MTO bwarken@mayn.de "Bernd Warken" .
+.
+.
+\" --------------------------------------------------------------------
+.\" Emacs settings
+.\" --------------------------------------------------------------------
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
diff --git a/contrib/groff/contrib/groffer/groffer.sh b/contrib/groff/contrib/groffer/groffer.sh
new file mode 100644
index 0000000..6cabefa
--- /dev/null
+++ b/contrib/groff/contrib/groffer/groffer.sh
@@ -0,0 +1,4419 @@
+#!/bin/sh
+
+# groffer - display groff files
+
+# File position: /contrib/groffer/groffer
+
+# Copyright (C) 2001,2002 Free Software Foundation, Inc.
+# Written by Bernd Warken 
+
+# This file is part of groff.
+
+# groff is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+# License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with groff; see the file COPYING.  If not, write to the
+# Free Software Foundation, 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
+
+export _PROGRAM_NAME;
+export _PROGRAM_VERSION;
+export _LAST_UPDATE;
+
+_PROGRAM_NAME='groffer';
+_PROGRAM_VERSION='0.9.1';
+_LAST_UPDATE='30 Sep 2002';
+
+########################################################################
+# Determine the shell under which to run this script;
+# if `ash' is available restart the script using `ash';
+# otherwise just go on.
+
+if test "${_groffer_run}" != 'second'; then
+  # only reached during the first run of the script
+
+  export GROFFER_OPT;
+  export _groffer_run;
+  export _this;
+
+
+  #_this="@BINDIR@/${_PROGRAM_NAME}";
+  _this='groffer.sh';
+
+  ###########################
+  # _get_opt_shell ("$@")
+  #
+  # Determine whether `--shell' was specified in $GROFF_OPT or in $*;
+  # if so echo its argument.
+  #
+  _get_opt_shell()
+  {
+    local i;
+    local _sh;
+    case " ${GROFFER_OPT} $*" in
+      *\ --shell\ *|*\ --shell=*)
+        (
+          eval set -- "${GROFFER_OPT}" '"$@"';
+          _sh='';
+          for i in "$@"; do
+            case "$1" in
+              --shell)
+                if test "$#" -ge 2; then
+                  _sh="$2";
+                  shift;
+                fi;
+                ;;
+              --shell=?*)
+                # delete up to first `=' character
+                _sh="$(echo -n "$1" | sed -e 's/^[^=]*=//')";
+                ;;
+            esac;
+            shift;
+          done;
+          echo -n "${_sh}";
+        )
+        ;;
+    esac;
+  }
+
+
+  ###########################
+  # _test_on_shell ()
+  #
+  # Test whether  is a shell program of Bourne type (POSIX sh).
+  #
+  _test_on_shell()
+  {
+    if test "$#" -le 0 || test "$1" = ''; then
+      return 1;
+    fi;
+    # do not quote $1 to allow arguments
+    test "$($1 -c 's=ok; echo -n "$s"' 2>/dev/null)" = 'ok';
+  }
+
+  # do the shell determination
+  _shell="$(_get_opt_shell "$@")";
+  if test "${_shell}" = ''; then
+    _shell='ash';
+  fi;
+  if _test_on_shell "${_shell}"; then
+    _groffer_run='second';
+    # do not quote $_shell to allow arguments
+    exec ${_shell} "${_this}" "$@";
+    exit;
+  fi;
+
+  # clean-up of shell determination
+  unset _shell;
+  unset _this;
+  unset _groffer_run;
+  _get_opt_shell()
+  {
+    return 0;
+  }
+  _test_on_shell()
+  {
+    return 0;
+  }
+
+fi;
+
+
+########################################################################
+# diagnostic messages
+#
+export _DEBUG;
+_DEBUG='no';			# disable debugging information
+#_DEBUG='yes';			# enable debugging information
+
+export _DEBUG_LM;
+_DEBUG_LM='no';			# disable landmark messages
+#_DEBUG_LM='yes';		# enable landmark messages
+
+
+########################################################################
+#                          Description
+########################################################################
+
+# Display groff files and man pages on X or tty, even when compressed.
+
+
+### Usage
+
+# Input comes from either standard input or command line parameters
+# that represent either names of exisiting roff files or standardized
+# specifications for man pages.  All of these can be compressed in a
+# format that is decompressible by `gzip'.
+
+# The following displaying modes are available:
+# - Display formatted input with the X roff viewer `gxditview',
+# - with a Prostcript viewer,
+# - with a dvi viewer,
+# - with a web browser.
+# - Display formatted input in a text terminal using a text device.
+# - Generate output for some groff device on stdout without a viewer.
+# - Output only the source code without any groff processing.
+# - Generate the troff intermediate output on standard output
+#   without groff postprocessing.
+# By default, the program tries to display with `gxditview' (1); if
+# this does not work, text display (2) is used.
+
+
+### Error handling
+
+# Error handling and exit behavior is complicated by the fact that
+# `exit' can only escape from the current shell; trouble occurs in
+# subshells.  This was solved by sending kill signals, see
+# $_PROCESS_ID and error().
+
+
+### Compatibility
+
+# This shell script is compatible to the both the GNU and the POSIX
+# shell and utilities.  Care was taken to restrict the programming
+# technics used here in order to achieve POSIX compatibility as far
+# back as POSIX P1003.2 Draft 11.2 of September 1991.
+
+# The only non-builtin used here is POSIX `sed'.  This script was
+# tested under `bash', `ash', and `ksh'.  The speed under `ash' is
+# more than double when compared to the larger shells.
+
+# This script provides its own option parser.  It is compatible to the
+# usual GNU style command line (option clusters, long options, mixing
+# of options and non-option file names), except that it is not
+# possible to abbreviate long option names.
+
+# The mixing of options and file names can be prohibited by setting
+# the environment variable `$POSIXLY_CORRECT' to a non-empty value.
+# This enables the rather wicked POSIX behavior to terminate option
+# parsing when the first non-option command line argument is found.
+
+
+########################################################################
+#            Survey of functions defined in this document
+########################################################################
+
+# The elements specified within paranthesis `(<>)' give hints to what
+# the arguments are meant to be; the argument names are irrelevant.
+# <>?     0 or 1
+# <>*     arbitrarily many such arguments, incl. none
+# <>+     one or more such arguments
+# <>      exactly 1
+
+# A function that starts with an underscore `_' is an internal
+# function for some function.  The internal functions are defined just
+# after their corresponding function; they are not mentioned in the
+# following.
+
+# abort (text>*)
+# base_name (path)
+# catz ()
+# clean_up ()
+# clean_up_secondary ()
+# diag (text>*)
+# dirname_append ( [])
+# dirname_chop ()
+# do_filearg ()
+# do_nothing ()
+# echo2 (*)
+# echo2n (*)
+# error (*)
+# get_first_essential (*)
+# is_dir ()
+# is_empty ()
+# is_equal ( )
+# is_file ()
+# is_not_empty ()
+# is_not_equal ( )
+# is_not_file ()
+# is_not_prog ()
+# is_prog ()
+# is_yes ()
+# leave ()
+# landmark ()
+# list_append ( ...)
+# list_check ()
+# list_from_args (...)
+# list_from_cmdline (    [...])
+# list_from_split ( )
+# list_has ( )
+# list_has_not ( )
+# list_length ()
+#   main_*(), see after the functions
+# man_do_filespec ()
+# man_setup ()
+# man_register_file ( [ [
]]) +# man_search_section (
) +# man_set() +# manpath_add_lang( ) +# manpath_add_system() +# manpath_from_path () +# normalize_args ( *) +# path_chop () +# path_clean () +# path_contains ( ) +# path_not_contains ( ) +# path_split () +# register_file () +# register_title () +# reset () +# save_stdin () +# string_contains ( ) +# string_not_contains ( ) +# tmp_cat () +# tmp_create (?) +# to_tmp () +# usage () +# version () +# warning () +# whatis () +# where () + + +######################################################################## +# Environment Variables +######################################################################## + +# Environment variables that exist only for this file start with an +# underscore letter. Global variables to this file are written in +# upper case letters, e.g. $_GLOBAL_VARIABLE; temporary variables +# start with an underline and use only lower case letters and +# underlines, e.g. $_local_variable . + +# [A-Z]* system variables, e.g. $MANPATH +# _[A-Z_]* global file variables, e.g. $_MAN_PATH +# _[a-z_]* temporary variables, e.g. $_manpath + +# Due to incompatibilities of the `ash' shell, the name of loop +# variables in `for' must be single character +# [a-z] local loop variables, e.g. $i + + +######################################################################## +# External environment variables + +# If these variables are exported here then the `ash' shell coughs +# when calling `groff' in `main_display()'. + +if test "${GROFFER_EXPORT_EXTERNALS}" = 'yes'; then + + # external system environment variables that are explicitly used + export DISPLAY; # Presets the X display. + export LANG; # For language specific man pages. + export LC_ALL; # For language specific man pages. + export LC_MESSAGES; # For language specific man pages. + export PAGER; # Paging program for tty mode. + export PATH; # Path for the programs called (: list). + + # groffer native environment variables + export GROFFER_OPT # preset options for groffer. + + # all groff environment variables are used, see groff(1) + export GROFF_BIN_PATH; # Path for all groff programs. + export GROFF_COMMAND_PREFIX; # '' (normally) or 'g' (several troffs). + export GROFF_FONT_PATH; # Path to non-default groff fonts. + export GROFF_TMAC_PATH; # Path to non-default groff macro files. + export GROFF_TMPDIR; # Directory for groff temporary files. + export GROFF_TYPESETTER; # Preset default device. + + # all GNU man environment variables are used, see man(1). + export MANOPT; # Preset options for man pages. + export MANPATH; # Search path for man pages (: list). + export MANROFFSEQ; # Ignored because of grog guessing. + export MANSECT; # Search man pages only in sections (:). + export SYSTEM; # Man pages for different OS's (, list). + +fi; + + +######################################################################## +# read-only variables (global to this file) +######################################################################## + +# characters + +export _BQUOTE; +export _BSLASH; +export _DQUOTE; +export _NEWLINE; +export _LBRACK; +export _LPAR; +export _RBRACK; +export _RPAR; +export _SPACE; +export _SQUOTE; +export _TAB; + +_BQUOTE='`'; +_BSLASH='\'; +_DQUOTE='"'; +_NEWLINE=' +'; +_LBRACK='['; +_LPAR='('; +_RBRACK=']'; +_RPAR=')'; +_SPACE=' '; +_SQUOTE="'"; +_TAB=' '; + +# function return values; `0' means ok; other values are error codes +export _BAD; +export _BAD2; +export _BAD3; +export _ERROR; +export _GOOD; +export _NO; +export _OK; +export _YES; + +_GOOD='0'; # return ok +_BAD='1'; # return negatively, error code `1' +_BAD2='2'; # return negatively, error code `2' +_BAD3='3'; # return negatively, error code `3' +_ERROR='255'; # for syntax errors; no `-1' in `ash' + +_NO="${_BAD}"; +_YES="${_GOOD}"; +_OK="${_GOOD}"; + +# quasi-functions, call with `eval' +export return_ok; +export return_good; +export return_bad; +export return_yes; +export return_no; +export return_error; +return_ok="func_pop; return ${_OK}"; +return_good="func_pop; return ${_GOOD}"; +return_bad="func_pop; return ${_BAD}"; +return_yes="func_pop; return ${_YES}"; +return_no="func_pop; return ${_NO}"; +return_error="func_pop; return ${_ERROR}"; + + +export _CONFFILES; +_CONFFILES="/etc/groff/groffer.conf ${HOME}/.groff/groffer.conf"; + +export _DEFAULT_MODES; +_DEFAULT_MODES='ps,x,tty'; +export _DEFAULT_RESOLUTION; +_DEFAULT_RESOLUTION='100'; + +export _DEFAULT_TTY_DEVICE; +_DEFAULT_TTY_DEVICE='latin1'; + +# _VIEWER_* viewer programs for different modes (only X is necessary) +# _VIEWER_* a comma-separated list of viewer programs (with options) +export _VIEWER_DVI; # viewer program for dvi mode +export _VIEWER_PS; # viewer program for ps mode +export _VIEWER_WWW_X; # viewer program for www mode in X +export _VIEWER_WWW_TTY; # viewer program for www mode in tty +_VIEWER_DVI='xdvi,dvilx'; +_VIEWER_PDF='xpdf,acroread'; +_VIEWER_PS='gv,ghostview,gs_x11,gs'; +_VIEWER_WWW='mozilla,netscape,opera,amaya,arena'; +_VIEWER_X='gxditview,xditview'; + +# Search automatically in standard sections `1' to `8', and in the +# traditional sections `9', `n', and `o'. On many systems, there +# exist even more sections, mostly containing a set of man pages +# special to a specific program package. These aren't searched for +# automatically, but must be specified on the command line. +export _MAN_AUTO_SEC; +_MAN_AUTO_SEC="'1' '2' '3' '4' '5' '6' '7' '8' '9' 'n' 'o'" + +export _PROCESS_ID; # for shutting down the program +_PROCESS_ID="$$"; + + +############ the command line options of the involved programs +# +# The naming scheme for the options environment names is +# $_OPTS__[_] +# +# : program name GROFFER, GROFF, or CMDLINE (for all +# command line options) +# : LONG (long options) or SHORT (single character options) +# : ARG for options with argument, NA for no argument; +# without _ both the ones with and without arg. +# +# Each option that takes an argument must be specified with a +# trailing : (colon). + +# exports +export _OPTS_GROFFER_SHORT_NA; +export _OPTS_GROFFER_SHORT_ARG; +export _OPTS_GROFFER_LONG_NA; +export _OPTS_GROFFER_LONG_ARG; +export _OPTS_GROFF_SHORT_NA; +export _OPTS_GROFF_SHORT_ARG; +export _OPTS_GROFF_LONG_NA; +export _OPTS_GROFF_LONG_ARG; +export _OPTS_MAN_SHORT_ARG; +export _OPTS_MAN_SHORT_NA; +export _OPTS_MAN_LONG_ARG; +export _OPTS_MAN_LONG_NA; +export _OPTS_GROFFER_LONG; +export _OPTS_GROFFER_SHORT; +export _OPTS_GROFF_LONG; +export _OPTS_GROFF_SHORT; +export _OPTS_CMDLINE_SHORT_NA; +export _OPTS_CMDLINE_SHORT_ARG; +export _OPTS_CMDLINE_SHORT; +export _OPTS_CMDLINE_LONG_NA; +export _OPTS_CMDLINE_LONG_ARG; +export _OPTS_CMDLINE_LONG; + + +###### native groffer options + +_OPTS_GROFFER_SHORT_NA="'h' 'Q' 'v' 'V' 'X' 'Z'"; +_OPTS_GROFFER_SHORT_ARG="'T'"; + +_OPTS_GROFFER_LONG_NA="'all' 'apropos' 'ascii' 'auto' 'default' 'dvi' \ +'groff' 'help' 'intermediate-output' 'local-file' 'location' 'man' \ +'no-location' 'no-man' 'pdf' 'ps' 'rv' 'source' 'tty' 'tty-device' \ +'version' 'whatis' 'where' 'www' 'x'"; + +_OPTS_GROFFER_LONG_ARG="'background' 'bd' 'bg' 'bw' 'default-modes' \ +'device' 'display' 'dvi-viewer' 'extension' 'fg' 'fn' 'font' \ +'foreground' 'geometry' 'locale' 'manpath' 'mode' 'pager' \ +'pdf-viewer' 'ps-viewer' 'resolution' 'sections' 'shell' \ +'systems' 'title' 'troff-device' 'www-viewer' 'xrm' 'x-viewer'"; + +##### options inhereted from groff + +_OPTS_GROFF_SHORT_NA="'a' 'b' 'c' 'e' 'g' 'i' 'l' 'p' 's' 't' 'z' \ +'C' 'E' 'G' 'N' 'R' 'S' 'U' 'V'"; +_OPTS_GROFF_SHORT_ARG="'d' 'f' 'F' 'I' 'L' 'm' 'M' 'n' 'o' 'P' 'r' \ +'w' 'W'"; +_OPTS_GROFF_LONG_NA=""; +_OPTS_GROFF_LONG_ARG=""; + +###### man options (for parsing $MANOPT only) + +_OPTS_MAN_SHORT_NA="'7' 'a' 'c' 'd' 'D' 'f' 'h' 'k' 'l' 't' 'u' \ +'V' 'w' 'Z'"; +_OPTS_MAN_SHORT_ARG="'e' 'L' 'm' 'M' 'p' 'P' 'r' 'S' 'T'"; + +_OPTS_MAN_LONG_NA="'all' 'ascii' 'apropos' 'catman' 'debug' 'default' \ +'ditroff' 'help' 'local-file' 'location' 'troff' 'update' 'version' \ +'whatis' 'where'"; + +_OPTS_MAN_LONG_ARG="'extension' 'locale' 'manpath' \ +'pager' 'preprocessor' 'prompt' 'sections' 'systems' 'troff-device'"; + +###### collections of options + +# groffer + +_OPTS_GROFFER_LONG="${_OPTS_GROFFER_LONG_ARG} ${_OPTS_GROFFER_LONG_NA}"; +_OPTS_GROFFER_SHORT=\ +"${_OPTS_GROFFER_SHORT_ARG} ${_OPTS_GROFFER_SHORT_NA}"; + +# groff + +_OPTS_GROFF_LONG="${_OPTS_GROFF_LONG_ARG} ${_OPTS_GROFF_LONG_NA}"; +_OPTS_GROFF_SHORT="${_OPTS_GROFF_SHORT_ARG} ${_OPTS_GROFF_SHORT_NA}"; + +# all command line options + +_OPTS_CMDLINE_SHORT_NA="\ +${_OPTS_GROFFER_SHORT_NA} ${_OPTS_GROFF_SHORT_NA}"; +_OPTS_CMDLINE_SHORT_ARG="\ +${_OPTS_GROFFER_SHORT_ARG} ${_OPTS_GROFF_SHORT_ARG}"; +_OPTS_CMDLINE_SHORT="${_OPTS_GROFFER_SHORT} ${_OPTS_GROFF_SHORT}"; + +_OPTS_CMDLINE_LONG_NA="${_OPTS_GROFFER_LONG_NA} \ +${_OPTS_GROFF_LONG_NA} ${_OPTS_MAN_LONG_NA}"; +_OPTS_CMDLINE_LONG_ARG="${_OPTS_GROFFER_LONG_ARG} \ +${_OPTS_GROFF_LONG_ARG} ${_OPTS_MAN_LONG_ARG}"; +_OPTS_CMDLINE_LONG="${_OPTS_GROFFER_LONG} ${_OPTS_GROFF_LONG}"; + + +######################################################################## +# read-write variables (global to this file) +######################################################################## + +export _ADDOPTS_GROFF; # Transp. options for groff (`eval'). +export _ADDOPTS_POST; # Transp. options postproc (`eval'). +export _ADDOPTS_X; # Transp. options X postproc (`eval'). +export _DEFAULT_MODES; # Set default modes. +export _DISPLAY_MODE; # Display mode. +export _DISPLAY_PROG; # Viewer program to be used for display. +export _DISPLAY_ARGS; # X resources for the viewer program. +export _FILEARGS; # Stores filespec parameters. +export _FUNC_STACK; # Store debugging information. +export _REGISTERED_TITLE; # Processed file names. +# _HAS_* from availability tests +export _HAS_COMPRESSION; # `yes' if compression is available +export _HAS_OPTS_GNU; # `yes' if GNU `getopt' is available +export _HAS_OPTS_POSIX; # `yes' if POSIX `getopts' is available +# _MAN_* finally used configuration of man searching +export _MAN_ALL; # search all man pages per filespec +export _MAN_ENABLE; # enable search for man pages +export _MAN_EXT; # extension for man pages +export _MAN_FORCE; # force file parameter to be man pages +export _MAN_IS_SETUP; # setup man variables only once +export _MAN_LANG; # language for man pages +export _MAN_LANG_DONE; # language dirs added to man path +export _MAN_PATH; # search path for man pages +export _MAN_SEC; # sections for man pages; sep. `:' +export _MAN_SEC_DONE; # sections added to man path +export _MAN_SYS; # system names for man pages; sep. `,' +export _MAN_SYS; # system names added to man path +# _MANOPT_* as parsed from $MANOPT +export _MANOPT_ALL; # $MANOPT --all +export _MANOPT_EXTENSION; # $MANOPT --extension +export _MANOPT_LANG; # $MANOPT --locale +export _MANOPT_PATH; # $MANOPT --manpath +export _MANOPT_PAGER; # $MANOPT --pager +export _MANOPT_SEC; # $MANOPT --sections +export _MANOPT_SYS; # $MANOPT --systems +# _OPT_* as parsed from groffer command line +export _OPT_ALL; # display all suitable man pages. +export _OPT_APROPOS; # branch to `apropos' program. +export _OPT_BD; # set border color in some modes. +export _OPT_BG; # set background color in some modes. +export _OPT_BW; # set border width in some modes. +export _OPT_DEBUG; # print debugging information on stderr. +export _OPT_DEFAULT_MODES; # `,'-list of modes when no mode given. +export _OPT_DEVICE; # device option. +export _OPT_DISPLAY; # set X display. +export _OPT_FG; # set foreground color in some modes. +export _OPT_FN; # set font in some modes. +export _OPT_GEOMETRY; # set size and position of viewer in X. +export _OPT_LANG; # set language for man pages +export _OPT_LOCATION; # print processed file names to stderr +export _OPT_MODE; # values: X, tty, Q, Z, "" +export _OPT_MANPATH; # manual setting of path for man-pages +export _OPT_PAGER; # specify paging program for tty mode +export _OPT_RESOLUTION; # set X resolution in dpi +export _OPT_RV; # reverse fore- and background colors. +export _OPT_SECTIONS; # sections for man page search +export _OPT_SYSTEMS; # man pages of different OS's +export _OPT_TITLE; # title for gxditview window +export _OPT_TTY_DEVICE; # set device for tty mode. +export _OPT_V; # groff option -V. +export _OPT_VIEWER_DVI; # viewer program for dvi mode +export _OPT_VIEWER_PDF; # viewer program for pdf mode +export _OPT_VIEWER_PS; # viewer program for ps mode +export _OPT_VIEWER_WWW; # viewer program for www mode +export _OPT_VIEWER_X; # viewer program for x mode +export _OPT_WHATIS; # print the one-liner man info +export _OPT_X; # groff option -X. +export _OPT_XRM; # specify X resource. +export _OPT_Z; # groff option -Z. +# _TMP_* temporary files +export _TMP_DIR; # directory for temporary files +export _TMP_CAT; # stores concatenation of everything +export _TMP_PREFIX; # dir and base name for temporary files +export _TMP_STDIN; # stores stdin, if any + +# these variables are preset in section `Preset' after the rudim. test + + +######################################################################## +# Test of rudimentary shell functionality +######################################################################## + + +######################################################################## +# Test of `test'. +# +test "a" = "a" || exit 1; + + +######################################################################## +# Test of `echo' and the `$()' construct. +# +echo -n '' >/dev/null || exit "${_ERROR}"; +if test "$(echo -n 'te' && echo -n '' && echo -n 'st')" != "test"; then + exit "${_ERROR}"; +fi; + + +######################################################################## +# Test of function definitions. +# +_t_e_s_t_f_u_n_c_() +{ + return "${_OK}"; +} + +if _t_e_s_t_f_u_n_c_ 2>/dev/null; then + : +else + echo 'shell does not support function definitions.' >&2; + exit "${_ERROR}"; +fi; + + +######################################################################## +# Preset and reset of read-write global variables +######################################################################## + + +# For variables that can be reset by option `--default', see reset(). + +_FILEARGS=''; + +# _HAS_* from availability tests +_HAS_COMPRESSION=''; +_HAS_OPTS_GNU=''; +_HAS_OPTS_POSIX=''; + +# _TMP_* temporary files +_TMP_DIR=''; +_TMP_CAT=''; +_TMP_PREFIX=''; +_TMP_STDIN=''; + + +######################################################################## +# reset () +# +# Reset the variables that can be affected by options to their default. +# +reset() +{ + if test "$#" -ne 0; then + error "reset() does not have arguments."; + fi; + + _ADDOPTS_GROFF=''; + _ADDOPTS_POST=''; + _ADDOPTS_X=''; + _DISPLAY_ARGS=''; + _DISPLAY_MODE=''; + _DISPLAY_PROG=''; + _REGISTERED_TITLE=''; + + # _MAN_* finally used configuration of man searching + _MAN_ALL='no'; + _MAN_ENABLE='yes'; # do search for man-pages + _MAN_EXT=''; + _MAN_FORCE='no'; # first local file, then search man page + _MAN_IS_SETUP='no'; + _MAN_LANG=''; + _MAN_LANG_DONE='no'; + _MAN_PATH=''; + _MAN_SEC=''; + _MAN_SEC_DONE='no'; + _MAN_SYS=''; + _MAN_SYS_DONE='no'; + + # _MANOPT_* as parsed from $MANOPT + _MANOPT_ALL='no'; + _MANOPT_EXTENSION=''; + _MANOPT_LANG=''; + _MANOPT_PATH=''; + _MANOPT_PAGER=''; + _MANOPT_SEC=''; + _MANOPT_SYS=''; + + # _OPT_* as parsed from groffer command line + _OPT_ALL='no'; + _OPT_APROPOS='no'; + _OPT_BD=''; + _OPT_BG=''; + _OPT_BW=''; + _OPT_DEBUG='no'; + _OPT_DEFAULT_MODES=''; + _OPT_DEVICE=''; + _OPT_DISPLAY=''; + _OPT_FG=''; + _OPT_FN=''; + _OPT_GEOMETRY=''; + _OPT_LANG=''; + _OPT_LOCATION='no'; + _OPT_MODE=''; + _OPT_MANPATH=''; + _OPT_PAGER=''; + _OPT_RESOLUTION=''; + _OPT_RV=''; + _OPT_SECTIONS=''; + _OPT_SYSTEMS=''; + _OPT_TITLE=''; + _OPT_TTY_DEVICE=''; + _OPT_V='no'; + _OPT_VIEWER_DVI=''; + _OPT_VIEWER_PDF=''; + _OPT_VIEWER_PS=''; + _OPT_VIEWER_WWW=''; + _OPT_VIEWER_X=''; + _OPT_WHATIS='no'; + _OPT_X='no'; + _OPT_XRM=''; + _OPT_Z='no'; + +} + +reset; + + +######################################################################## +# Functions for error handling and debugging +######################################################################## + + +############## +# landmark () +# +# Print to standard error as a debugging aid. +# +# Globals: $_DEBUG_LM +# +landmark() +{ + if test "${_DEBUG_LM}" = 'yes'; then + echo ">>> $*" >&2; + fi; +} + +landmark "1: debugging functions"; + + +############## +# clean_up () +# +# Clean up at exit. +# +clean_up() +{ + clean_up_secondary; + rm -f "${_TMP_CAT}"; +} + + +############## +# clean_up_secondary () +# +# Clean up temporary files without $_TMP_CAT. +# +clean_up_secondary() +{ + rm -f "${_TMP_STDIN}"; +} + + +############## +# echo2 (*) +# +# Output to stderr. +# +# Arguments : arbitrary text. +# +echo2() +{ + echo "$*" >&2; +} + + +############## +# echo2n (*) +# +# Output to stderr. +# +# Arguments : arbitrary text. +# +echo2n() +{ + echo -n "$*" >&2; +} + + +############# +# diag (text>*) +# +# Output a diagnostic message to stderr +# +diag() +{ + echo2 '>>>>>'"$*"; +} + + +############# +# error (*) +# +# Print an error message to standard error; exit with an error condition +# +error() +{ + local i; + local _code; + _code="${_ERROR}"; + case "$#" in + 0) true; ;; + 1) echo2 'groffer error: '"$1"; ;; + 2) + echo2 'groffer error: '"$1"; + _code="$2"; + ;; + *) echo2 'groffer error: wrong number of arguments in error().'; ;; + esac; + if test "${_DEBUG}" = 'yes'; then + func_stack_dump; + fi; + clean_up; + kill "${_PROCESS_ID}" >/dev/null 2>&1; + kill -9 "${_PROCESS_ID}" >/dev/null 2>&1; + exit "${_code}"; +} + + +############# +# abort (*) +# +# Terminate program with error condition +# +abort() +{ + error "Program aborted."; + exit 1; +} + + +############# +# func_check ( "$@") +# +# Check number of arguments and register to _FUNC_STACK. +# +# Arguments: >=3 +# : name of the calling function. +# : a relational operator: = != < > <= >= +# : number of arguments to be checked against +# "$@": the arguments of the calling function. +# +func_check() +{ + local _comp; + local _fname; + local _nargs; + local _op; + local _s; + if test "$#" -lt 3; then + error 'func_check() needs at least 3 arguments.'; + fi; + _fname="$1"; + case "$3" in + 1) + _nargs="$3"; + _s=''; + ;; + 0|[2-9]) + _nargs="$3"; + _s='s'; + ;; + *) + error "func_check(): third argument must be a digit."; + ;; + esac; + case "$2" in + '='|'-eq') + _op='-eq'; + _comp='exactly'; + ;; + '>='|'-ge') + _op='-ge'; + _comp='at least'; + ;; + '<='|'-le') + _op='-le'; + _comp='at most'; + ;; + '<'|'-lt') + _op='-lt'; + _comp='less than'; + ;; + '>'|'-gt') + _op='-gt'; + _comp='more than'; + ;; + '!='|'-ne') + _op='-ne'; + _comp='not'; + ;; + *) + error \ + 'func_check(): second argument is not a relational operator.'; + ;; + esac; + shift 3; + if test "$#" "${_op}" "${_nargs}"; then + do_nothing; + else + error \ + "${_fname}"'() needs '"${_comp} ${_nargs}"' argument'"${_s}"'.'; + fi; + if test "${_DEBUG}" = 'yes'; then + func_push "${_fname} $*"; + fi; +} + + +############# +# func_pop () +# +# Retrieve the top element from the stack. +# +# The stack elements are separated by `!'; the popped element is +# identical to the original element, except that all `!' characters +# were removed. +# +# Arguments: 1 +# +func_pop() +{ + if test "${_DEBUG}" = 'yes'; then + if test "$#" -ne 0; then + error 'func_pop() does not have arguments.'; + fi; + case "${_FUNC_STACK}" in + '') + error 'func_pop(): stack is empty.'; + ;; + *!*) + # split at first bang `!'. + _FUNC_STACK="$(echo -n ${_FUNC_STACK} \ + | sed -e 's/^[^!]*!//')"; + ;; + *) + _FUNC_STACK=''; + ;; + esac; + fi; +} + + +############# +# func_push () +# +# Store another element to stack. +# +# The stack elements are separated by `!'; if contains a `!' +# it is removed first. +# +# Arguments: 1 +# +func_push() +{ + local _element; + if test "${_DEBUG}" = 'yes'; then + if test "$#" -ne 1; then + error 'func_push() needs 1 argument.'; + fi; + case "$1" in + *'!'*) + # remove all bangs `!'. + _element="$(echo -n "$1" | sed -e 's/!//g')"; + ;; + *) + _element="$1"; + ;; + esac; + if test "${_FUNC_STACK}" = ''; then + _FUNC_STACK="${_element}"; + else + _FUNC_STACK="${_element}!${_FUNC_STACK}"; + fi; + fi; +} + + +############# +# func_stack_dump () +# +# Print the content of the stack. Ignore the arguments. +# +func_stack_dump() +{ + diag 'call stack:'; + case "${_FUNC_STACK}" in + *!*) + _rest="${_FUNC_STACK}"; + while test "${_rest}" != ''; do + # get part before the first bang `!'. + diag "$(echo -n "${_rest}" | sed -e 's/^\([^!]*\)!.*$/\1/')"; + # delete part up to the first bang `!'. + _rest="$(echo -n "${_rest}" | sed -e 's/^!*[^!]*!*//')"; + done; + ;; + *) + diag "${_FUNC_STACK}"; + ;; + esac; +} + + +######################################################################## +# System Test +######################################################################## + +landmark "2: system test"; + +# Test the availability of the system utilities used in this script. + + +######################################################################## +# Test of `true'. +# +if true >/dev/null 2>&1; then + true; +else + true() + { + return "${_GOOD}"; + } + + false() + { + return "${_BAD}"; + } +fi; + + +######################################################################## +# Test of `unset'. +# +_test='test'; +if unset _test >/dev/null 2>&1 && test "${_test}" = ''; then + true; +else + unset() + { + for v in "$@"; do + eval "$v"=''; + done; + } +fi; +unset _test; + +######################################################################## +# Test of builtin `local' +# + +_t_e_s_t_f_u_n_c_() +{ + local _test >/dev/null 2>&1 || return "${_BAD}"; +} + +if _t_e_s_t_f_u_n_c_; then + : +else + local() + { + if test "$1" != ''; then + error "overriding global variable \`$1' with local value."; + fi; + } +fi; + + +######################################################################## +# Test of global setting in functions +# +_global='outside'; +_clobber='outside'; + +_t_e_s_t_f_u_n_c_() +{ + local _clobber; + _global='inside'; + _clobber='inside'; +} + +_t_e_s_t_f_u_n_c_; +if test "${_global}" != 'inside' || test "${_clobber}" != 'outside'; +then + error "Cannot assign to global variables from within functions."; +fi; + +unset _global; +unset _clobber; + + +######################################################################## +# Test of function `sed'. +# +if test "$(echo xTesTx \ + | sed -e 's/^.\([Tt]e*x*sTT*\).*$/\1/' \ + | sed -e '\|T|s||t|g')" != 'test'; +then + error 'Test of "sed" command failed.'; +fi; + + +######################################################################## +# Test of function `cat'. +# +if test "$(echo test | cat)" != "test"; then + error 'Test of "cat" command failed.'; +fi; + + +######################################################################## +# Test for compression. +# +if test "$(echo 'test' | gzip -c -d -f - 2>/dev/null)" = 'test'; then + _HAS_COMPRESSION='yes'; + if echo 'test' | bzip2 -c 2>/dev/null | bzip2 -t 2>/dev/null \ + && test "$(echo 'test' | bzip2 -c 2>/dev/null \ + | bzip2 -d -c 2>/dev/null)" \ + = 'test'; then + _HAS_BZIP='yes'; + else + _HAS_BZIP='no'; + fi; +else + _HAS_COMPRESSION='no'; + _HAS_BZIP='no'; +fi; + + +######################################################################## +_t_e_s_t_f_u_n_c_() +{ + : +} + + +######################################################################## +# Definition of normal Functions +######################################################################## +landmark "3: functions"; + +######################################################################## +# abort (*) +# +# Unconditionally terminate the program with error code; +# useful for debugging. +# +# defined above + + +######################################################################## +# base_name () +# +# Get the file name part of , i.e. delete everything up to last +# `/' from the beginning of . +# +# Arguments : 1 +# Output : the file name part (without slashes) +# +base_name() +{ + func_check base_name = 1 "$@"; + case "$1" in + */) + do_nothing; + ;; + */*) + # delete everything up to last slash `/'. + echo -n "$1" | sed -e '\|^.*/*\([^/]*\)$|s||\1|'; + ;; + *) + echo -n "$1"; + ;; + esac; + eval "${return_ok}"; +} + + +######################################################################## +# catz () +# +# Decompress if possible or just print to standard output. +# +# gzip, bzip2, and .Z decompression is supported. +# +# Arguments: 1, a file name. +# Output: the content of , possibly decompressed. +# +if test "${_HAS_COMPRESSION}" = 'yes'; then + catz() + { + func_check catz = 1 "$@"; + case "$1" in + '') + error 'catz(): empty file name'; + ;; + '-') + error 'catz(): for standard input use save_stdin()'; + ;; + esac; + if is_yes "${_HAS_BZIP}"; then + if bzip2 -t "$1" 2>/dev/null; then + bzip2 -c -d "$1" 2>/dev/null; + eval "${return_ok}"; + fi; + fi; + gzip -c -d -f "$1" 2>/dev/null; + eval "${return_ok}"; + } +else + catz() + { + func_check catz = 1 "$@"; + cat "$1"; + eval "${return_ok}"; + } +fi; + + +######################################################################## +# clean_up () +# +# Do the final cleaning up before exiting; used by the trap calls. +# +# defined above + + +######################################################################## +# clean_up_secondary () +# +# Do the second but final cleaning up. +# +# defined above + + +######################################################################## +# diag (*) +# +# Print marked message to standard error; useful for debugging. +# +# defined above + + +######################################################################## +landmark '4: dirname()*'; +######################################################################## + +####################################################################### +# dirname_append ( ) +# +# Append `name' to `dir' with clean handling of `/'. +# +# Arguments : 2 +# Output : the generated new directory name / +# +dirname_append() +{ + func_check dirname_append = 2 "$@"; + local _res; + if is_empty "$1"; then + error "dir_append(): first argument is empty."; + fi; + if is_empty "$2"; then + echo -n "$1"; + else + dirname_chop "$1"/"$2"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# dirname_chop () +# +# Remove unnecessary slashes from directory name. +# +# Argument: 1, a directory name. +# Output: path without double, or trailing slashes. +# +dirname_chop() +{ + func_check dirname_chop = 1 "$@"; + local _arg; + local _res; + local _sep; + # replace all multiple slashes by a single slash `/'. + _res="$(echo -n "$1" | sed -e '\|///*|s||/|g')"; + case "${_res}" in + ?*/) + # remove trailing slash '/'; + echo -n "${_res}" | sed -e '\|/$|s|||'; + ;; + *) echo -n "${_res}"; ;; + esac; + eval "${return_ok}"; +} + + +######################################################################## +# do_filearg () +# +# Append the file, man-page, or standard input corresponding to the +# argument to the temporary file. If this is compressed in the gzip +# or Z format it is decompressed. A title element is generated. +# +# Argument either: +# - name of an existing files. +# - `-' to represent standard input (several times allowed). +# - `man:name.(section)' the man-page for `name' in `section'. +# - `man:name.section' the man-page for `name' in `section'. +# - `man:name' the man-page for `name' in the lowest `section'. +# - `name.section' the man-page for `name' in `section'. +# - `name' the man-page for `name' in the lowest `section'. +# Globals : +# $_TMP_STDIN, $_MAN_ENABLE, $_MAN_IS_SETUP, $_OPT_MAN +# +# Output : none +# Return : $_GOOD if found, ${_BAD} otherwise. +# +do_filearg() +{ + func_check do_filearg = 1 "$@"; + local _filespec; + local i; + _filespec="$1"; + # store sequence into positional parameters + case "${_filespec}" in + '') + eval "${return_good}"; + ;; + '-') + register_file '-'; + eval "${return_good}"; + ;; + */*) # with directory part; so no man search + set -- 'File'; + ;; + *) + if is_yes "${_MAN_ENABLE}"; then + if is_yes "${_MAN_FORCE}"; then + set -- 'Manpage' 'File'; + else + set -- 'File' 'Manpage'; + fi; + else + set -- 'File'; + fi; + ;; + esac; + for i in "$@"; do + case "$i" in + File) + if test -f "${_filespec}"; then + if test -r "${_filespec}"; then + register_file "${_filespec}"; + eval "${return_good}"; + else + echo2 "could not read \`${_filespec}'"; + eval "${return_bad}"; + fi; + else + continue; + fi; + ;; + Manpage) # parse filespec as man page + if is_not_yes "${_MAN_IS_SETUP}"; then + man_setup; + fi; + if man_do_filespec "${_filespec}"; then + eval "${return_good}"; + else + continue; + fi; + ;; + esac; + done; + eval "${return_bad}"; +} # do_filearg() + + +######################################################################## +# do_nothing () +# +# Dummy function. +# +do_nothing() +{ + return "${_OK}"; +} + + +######################################################################## +# echo2 (*) +# +# Print to standard error with final line break. +# +# defined above + + +######################################################################## +# echo2n (*) +# +# Print to standard error without final line break. +# +# defined above + + +######################################################################## +# error (*) +# +# Print error message and exit with error code. +# +# defined above + + +######################################################################## +# func_check ( "$@") +# +# Check number of arguments and register to _FUNC_STACK. +# +# Arguments: >=3 +# : name of the calling function. +# : a relational operator: = != < > <= >= +# : number of arguments to be checked against +# "$@": the arguments of the calling function. +# +# defined above + +######################################################################### +# func_pop () +# +# Delete the top element from the function call stack. +# +# defined above + + +######################################################################## +# func_push () +# +# Store another element to function call stack. +# +# defined above + + +######################################################################## +# func_stack_dump () +# +# Print the content of the stack. +# +# defined above + + +######################################################################## +# get_first_essential (*) +# +# Retrieve first non-empty argument. +# +# Return : `1' if all arguments are empty, `0' if found. +# Output : the retrieved non-empty argument. +# +get_first_essential() +{ + func_check get_first_essential '>=' 0 "$@"; + local i; + if test "$#" -eq 0; then + eval "${return_ok}"; + fi; + for i in "$@"; do + if is_not_empty "$i"; then + echo -n "$i"; + eval "${return_ok}"; + fi; + done; + eval "${return_bad}"; +} + + +######################################################################## +landmark '5: is_*()'; +######################################################################## + +######################################################################## +# is_dir () +# +# Test whether `name' is a directory. +# +# Arguments : 1 +# Return : `0' if arg1 is a directory, `1' otherwise. +# +is_dir() +{ + func_check is_dir = 1 "$@"; + if is_not_empty "$1" && test -d "$1" && test -r "$1"; then + eval "${return_yes}"; + else + eval "${return_no}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# is_empty () +# +# Test whether `string' is empty. +# +# Arguments : <=1 +# Return : `0' if arg1 is empty or does not exist, `1' otherwise. +# +is_empty() +{ + func_check is_empty = 1 "$@"; + if test -z "$1"; then + eval "${return_yes}"; + else + eval "${return_no}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# is_equal ( ) +# +# Test whether `string1' is equal to . +# +# Arguments : 2 +# Return : `0' both arguments are equal strings, `1' otherwise. +# +is_equal() +{ + func_check is_equal = 2 "$@"; + if test "$1" = "$2"; then + eval "${return_yes}"; + else + eval "${return_no}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# is_file () +# +# Test whether `name' is a readable file. +# +# Arguments : 1 +# Return : `0' if arg1 is a readable file, `1' otherwise. +# +is_file() +{ + func_check is_file = 1 "$@"; + if is_not_empty "$1" && test -f "$1" && test -r "$1"; then + eval "${return_yes}"; + else + eval "${return_no}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# is_not_dir () +# +# Test whether `name' is not a readable directory. +# +# Arguments : 1 +# Return : `0' if arg1 is a directory, `1' otherwise. +# +is_not_dir() +{ + func_check is_not_dir = 1 "$@"; + if is_dir "$1"; then + eval "${return_no}"; + else + eval "${return_yes}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# is_not_empty () +# +# Test whether `string' is not empty. +# +# Arguments : <=1 +# Return : `0' if arg1 exists and is not empty, `1' otherwise. +# +is_not_empty() +{ + func_check is_not_empty = 1 "$@"; + if is_empty "$1"; then + eval "${return_no}"; + else + eval "${return_yes}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# is_not_equal ( ) +# +# Test whether `string1' and differ. +# +# Arguments : 2 +# +is_not_equal() +{ + func_check is_not_equal = 2 "$@"; + if is_equal "$1" "$2"; then + eval "${return_no}"; + else + eval "${return_yes}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# is_not_file () +# +# Test whether `name' is a not readable file. +# +# Arguments : >=1 (empty allowed), more args are ignored +# +is_not_file() +{ + func_check is_not_file '>=' 1 "$@"; + if is_file "$1"; then + eval "${return_no}"; + else + eval "${return_yes}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# is_not_prog () +# +# Verify that arg is a not program in $PATH. +# +# Arguments : >=1 (empty allowed) +# more args are ignored, this allows to specify progs with arguments +# +is_not_prog() +{ + func_check is_not_prog '>=' 1 "$@"; + if where "$1" >/dev/null; then + eval "${return_no}"; + else + eval "${return_yes}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# is_not_yes () +# +# Test whether `string' is not "yes". +# +# Arguments : 1 +# +is_not_yes() +{ + func_check is_not_yes = 1 "$@"; + if test "$1" = 'yes'; then + eval "${return_no}"; + else + eval "${return_yes}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# is_prog () +# +# Determine whether arg is a program in $PATH +# +# Arguments : >=1 (empty allowed) +# more args are ignored, this allows to specify progs with arguments +# +is_prog() +{ + func_check is_prog '>=' 1 "$@"; + if where "$1" >/dev/null; then + eval "${return_yes}"; + else + eval "${return_no}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# is_yes () +# +# Test whether `string' has value "yes". +# +# Arguments : <=1 +# Return : `0' if arg1 is `yes', `1' otherwise. +# +is_yes() +{ + func_check is_yes = 1 "$@"; + if test "$1" = 'yes'; then + eval "${return_yes}"; + else + eval "${return_no}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# landmark () +# +# Print debugging information on standard error if $_DEBUG_LM is `yes'. +# +# Globals: $_DEBUG_LM +# +# Defined in section `Debugging functions'. + + +######################################################################## +# leave () +# +# Clean exit without an error. +# +leave() +{ + clean_up; + exit "${_OK}"; +} + + +######################################################################## +landmark '6: list_*()'; +######################################################################## + +######################################################################## +# list_append ( ...) +# +# Arguments: >=2 +# : a space-separated list of single-quoted elements. +# : some sequence of characters. +# Output: +# if is empty: "'' '...'" +# otherwise: " '' ..." +# +list_append() +{ + func_check list_append '>=' 2 "$@"; + local _element; + local _res; + _res="$1"; + shift; + for s in "$@"; do + case "$s" in + *\'*) + # escape each single quote by replacing each "'" (squote) + # by "'\''" (squote bslash squote squote); + # note that the backslash must be doubled for `sed'. + _element="$(echo -n "$s" | sed -e 's/'"${_SQUOTE}"'/&\\&&/g')"; + ;; + *) + _element="$s"; + ;; + esac; + _res="${_res} '${_element}'"; + done; + echo -n "${_res}"; + eval "${return_ok}"; +} + + +######################################################################## +# list_check () +# +# Check whether is a space-separated list of '-quoted elements. +# +# If the test fails an error is raised. +# If the test succeeds the argument is echoed. +# +# Testing criteria: +# A list has the form "'first' 'second' '...' 'last'". +# So it has a leading and a final quote and the elements are separated +# by "' '" constructs. If these are all removed there should not be +# any single-quotes left. Watch out for escaped single quotes; they +# have the form '\'' (sq bs sq sq). +# +# Arguments: 1 +# Output: the argument unchanged, it the check succeeded. +# +list_check() +{ + func_check list_check = 1 "$@"; + local _list; + if is_empty "$1"; then + eval "${return_ok}"; + fi; + case "$1" in + \'*\') _list="$1"; ;; + *) + error "list_check() bad list: $1" + ;; + esac; + # Remove leading single quote, + # remove final single quote, + # remove escaped single quotes (squote bslash squote squote) + # [note that `sed' doubles the backslash (bslash bslash)], + # remove field separators (squote space squote). + _list="$(echo -n "${_list}" \ + | sed -e 's/^'"${_SQUOTE}"'//' \ + | sed -e 's/'"${_SQUOTE}"'$//' \ + | sed -e \ + 's/'"${_SQUOTE}${_BSLASH}${_BSLASH}${_SQUOTE}${_SQUOTE}"'//g' \ + | sed -e 's/'"${_SQUOTE}${_SPACE}${_SPACE}"'*'"${_SQUOTE}"'//g')"; + case "${_list}" in + *\'*) # criterium fails if squote is left + error 'list_check() bad list: '"${_list}"; + ;; + esac; + echo -n "$1"; + eval "${return_ok}"; +} + + +######################################################################## +# list_element_from_arg () +# +# Arguments: 1 +# : some sequence of characters (also single quotes allowed). +# Output: the list element generated from . +# +list_element_from_arg() +{ + func_check list_element_from_arg = 1 "$@"; + local _res; + echo -n "'"; + # replace each single quote "'" by "'\''". + echo -n "$1" | sed -e 's/'\''/&\\&&/g'; # ' for emacs + echo -n "'"; + eval "${return_ok}"; +} + + +######################################################################## +# list_from_args (...) +# +# Generate a space-separated list of single-quoted elements from args. +# +# Arguments: +# : some sequence of characters. +# Output: "'' '...'" +# +list_from_args() +{ + func_check list_from_args '>=' 1 "$@"; + local _list; + _list=""; + for s in "$@"; do + _list="$(list_append "${_list}" "$s")"; + done; + echo -n "${_list}"; + eval "${return_ok}"; +} + + +######################################################################## +# list_from_cmdline ( [...]) +# +# Transform command line arguments into a normalized form. +# +# Options, option arguments, and file parameters are identified and +# output each as a single-quoted argument of its own. Options and +# file parameters are separated by a '--' argument. +# +# Arguments: >=4 +# : space-separated list of short options without an arg. +# : space-separated list of short options that have an arg. +# : space-separated list of long options without an arg. +# : space-separated list of long options that have an arg. +# ...: the arguments from the command line (by "$@"). +# +# Globals: $POSIXLY_CORRECT (only kept for compatibility). +# +# Output: ['-[-]opt' ['optarg']]... '--' ['filename']... +# +# Example: +# list_normalize 'a b' 'c' '' 'long' -a f1 -bcarg --long=larg f2 +# will result in printing: +# '-a' '-b' '-c' 'arg' '--long' 'larg' '--' 'f1' 'f2' +# If $POSIXLY_CORRECT is not empty, the result will be: +# '-a' '--' 'f1' '-bcarg' '--long=larg' 'f2' +# +# Rationale: +# In POSIX, the first non-option ends the option processing. +# In GNU mode (default), non-options are sorted behind the options. +# +# Use this function only in the following way: +# eval set -- "$(args_norm '...' '...' '...' '...' "$@")"; +# while test "$1" != '--'; do +# case "$1" in +# ... +# esac; +# shift; +# done; +# shift; #skip '--' +# # all positional parameters ("$@") left are file name parameters. +# +list_from_cmdline() +{ + func_check list_from_cmdline '>=' 4 "$@"; + local _fparams; + local _fn; + local _result; + local _long_a; + local _long_n; + local _short_a; + local _short_n; + _short_n="$(list_check "$1")"; # short options, no argument + _short_a="$(list_check "$2")"; # short options with argument + _long_n="$(list_check "$3")"; # long options, no argument + _long_a="$(list_check "$4")"; # long options with argument + shift 4; + _fn='list_from_cmdline():'; # for error messages + if test "$#" -eq 0; then + echo -n "'--'"; + eval "${return_ok}"; + fi; + _fparams=''; + _result=''; + while test "$#" -ge 1; do + _arg="$1"; + shift; + case "$_arg" in + --) break; ;; + --?*) + # delete leading '--'; + _opt="$(echo -n "${_arg}" | sed -e 's/^..//')"; + if list_has "${_long_n}" "${_opt}"; then + # long option, no argument + _result="$(list_append "${_result}" "--${_opt}")"; + continue; + fi; + if list_has "${_long_a}" "${_opt}"; then + # long option with argument + _result="$(list_append "${_result}" "--${_opt}")"; + if test "$#" -le 0; then + error "${_fn} no argument for option --${_opt}." + fi; + _result="$(list_append "${_result}" "$1")"; + shift; + continue; + fi; + # test on `--opt=arg' + if string_contains "${_opt}" '='; then + # extract option by deleting from the first '=' to the end + _lopt="$(echo -n "${_opt}" | sed -e 's/=.*$//')"; + if list_has "${_long_a}" "${_lopt}"; then + # get the option argument by deleting up to first `=' + _optarg="$(echo -n "${_opt}" | sed -e 's/^[^=]*=//')"; + _result="$(list_append "${_result}" \ + "--${_lopt}" "${_optarg}")"; + continue; + fi; + fi; + error "${_fn} --${_opt} is not an option." + ;; + -?*) # short option (cluster) + # delete leading `-'; + _rest="$(echo -n "${_arg}" | sed -e 's/^.//')"; + while is_not_empty "${_rest}"; do + # get next short option from cluster (first char of $_rest) + _optchar="$(echo -n "${_rest}" | sed -e 's/^\(.\).*$/\1/')"; + # remove first character from ${_rest}; + _rest="$(echo -n "${_rest}" | 's/^.//')"; + if list_has "${_short_n}" "${_optchar}"; then + _result="$(list_append "${_result}" "-${_optchar}")"; + continue; + elif list_has "${_short_a}" "${_optchar}"; then + # remove leading character + case "${_optchar}" in + /) # cannot use normal `sed' separator + _rest="$(echo -n "${_rest}" | sed -e '\|^.|s|||')"; + ;; + ?) + _rest="$(echo -n "${_rest}" | sed -e 's/^.//')"; + ;; + *) + error "${_fn} several chars parsed for short option." + ;; + esac; + if is_empty "${_rest}"; then + if test "$#" -ge 1; then + _result="$(list_append "${_result}" \ + "-${_optchar}" "$1")"; + shift; + continue; + else + error \ + "${_fn}"' no argument for option -'"${_optchar}." + fi; + else # rest is the argument + _result="$(list_append "${_result}" \ + "-${_optchar}" "${_rest}")"; + _rest=''; + continue; + fi; + else + error "${_fn} unknown option -${_optchar}." + fi; + done; + ;; + *) + # Here, $_arg is not an option, so a file parameter. + # When $POSIXLY_CORRECT is set this ends option parsing; + # otherwise, the argument is stored as a file parameter and + # option processing is continued. + _fparams="$(list_append "${_fparams}" "${_arg}")"; + if is_not_empty "$POSIXLY_CORRECT"; then + break; + fi; + ;; + esac; + done; + _result="$(list_append "${_result}" '--')"; + if is_not_empty "${_fparams}"; then + _result="${_result} ${_fparams}"; + fi; + if test "$#" -gt 0; then + _result="$(list_append "${_result}" "$@")"; + fi; + echo -n "$_result"; + eval "${return_ok}"; +} # list_from_cmdline() + + +######################################################################## +# list_from_lists ( ...) +# +# Generate a list from the concatenation of the lists in the arguments. +# +# Arguments: >=2 +# : string of space-separated single-quoted elements. +# Output: "'' ..." +# +list_from_lists() +{ + func_check list_from_lists '>=' 2 "$@"; + _list=''; + echo -n "$*"; + eval "${return_ok}"; +} + +######################################################################## +# list_from_split ( ) +# +# In escape white space and replace each by space. +# +# Arguments: 2: a that is to be split into parts divided by +# +# Output: the resulting string +# +list_from_split() +{ + func_check list_from_split = 2 "$@"; + local _s; + + # precede each space or tab by a backslash `\' (doubled for `sed') + _s="$(echo -n "$1" | sed -e 's/\(['"${_SPACE}${_TAB}"']\)/\\\1/g')"; + + # replace split character of string by the list separator ` ' (space). + case "$2" in + /) # cannot use normal `sed' separator + echo -n "${_s}" | sed -e '\|'"$2"'|s|| |g'; + ;; + ?) # use normal `sed' separator + echo -n "${_s}" | sed -e 's/'"$2"'/ /g'; + ;; + ??*) + error 'list_from_split(): separator must be a single character.'; + ;; + esac; + eval "${return_ok}"; +} + + +######################################################################## +# list_has ( ) +# +# Arguments: 2 +# : a space-separated list of single-quoted elements. +# : some sequence of characters. +# Output: +# if is empty: "'' '...'" +# otherwise: " '' ..." +# +list_has() +{ + func_check list_has = 2 "$@"; + if is_empty "$1"; then + eval "${return_no}"; + fi; + _list="$1"; + _element="$2"; + case "$2" in + \'*\') _element="$2"; ;; + *) _element="'$2'"; ;; + esac; + if string_contains "${_list}" "${_element}"; then + eval "${return_yes}"; + else + eval "${return_no}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# list_has_not ( ) +# +# Arguments: 2 +# : a space-separated list of single-quoted elements. +# : some sequence of characters. +# Output: +# if is empty: "'' '...'" +# otherwise: " '' ..." +# +list_has_not() +{ + func_check list_has_not = 2 "$@"; + if is_empty "$1"; then + eval "${return_yes}"; + fi; + _list="$1"; + _element="$2"; + case "$2" in + \'*\') _element="$2"; ;; + *) _element="'$2'"; ;; + esac; + if string_contains "${_list}" "${_element}"; then + eval "${return_no}"; + else + eval "${return_yes}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# list_length () +# +# Arguments: 1 +# : a space-separated list of single-quoted elements. +# Output: the number of elements in +# +list_length() +{ + func_check list_length = 1 "$@"; + eval set -- "$1"; + echo -n "$#"; + eval "${return_ok}"; +} + + +######################################################################## +# list_prepend ( ...) +# +# Insert new at the beginning of +# +# Arguments: >=2 +# : a space-separated list of single-quoted elements. +# : some sequence of characters. +# Output: +# if is empty: "'' ..." +# otherwise: "'' ... " +# +list_prepend() +{ + func_check list_prepend '>=' 2 "$@"; + local _res; + _res="$1"; + shift; + for s in "$@"; do + # escape single quotes in list style (squote bslash squote squote). + _element="$(echo -n "$s" | sed -e 's/'\''/&\\&&/g')"; + _res="'${_element}' ${_res}"; + done; + echo -n "${_res}"; + eval "${return_ok}"; +} + + +######################################################################## +landmark '7: man_*()'; +######################################################################## + +######################################################################## +# man_do_filespec () +# +# Print suitable man page(s) for filespec to $_TMP_CAT. +# +# Arguments : 2 +# : argument of the form `man:name.section', `man:name', +# `man:name(section)', `name.section', `name'. +# +# Globals : $_OPT_ALL +# +# Output : none. +# Return : `0' if man page was found, `1' else. +# +# Only called from do_fileargs(), checks on $MANPATH and +# $_MAN_ENABLE are assumed. +# +man_do_filespec() +{ + func_check man_do_filespec = 1 "$@"; + local _got_one; + local _name; + local _prevsec; + local _res; + local _section; + local _spec; + local _string; + local s; + if is_empty "${MANPATH}"; then + eval "${return_bad}"; + fi; + if is_empty "$1"; then + eval "${return_bad}"; + fi; + _spec="$1"; + _name=''; + _section=''; + case "${_spec}" in + */*) # not a man spec when it contains '/' + eval "${return_bad}"; + ;; + man:?*\(?*\)) # man:name(section) + _name="$(echo -n "${_spec}" \ + | sed -e 's/^man:\(..*\)(\(..*\))$/\1/')"; + _section="$(echo -n "${_spec}" \ + | sed -e 's/^man:\(..*\)(\(..*\))$/\2/')"; + ;; + man:?*.?*) # man:name.section + _name="$(echo -n "${_spec}" \ + | sed -e 's/^man:\(..*\)\.\(..*\)$/\1/')"; + _section="$(echo -n "${_spec}" \ + | sed -e 's/^man:\(..*\)\.\(..*\)$/\2/')"; + ;; + man:?*) # man:name + _name="$(echo -n "${_spec}" | sed -e 's/^man://')"; + ;; + ?*\(?*\)) # name(section) + _name="$(echo -n "${_spec}" \ + | sed -e 's/^\(..*\)(\(..*\))$/\1/')"; + _section="$(echo -n "${_spec}" \ + | sed -e 's/^\(..*\)(\(..*\))$/\2/')"; + ;; + ?*.?*) # name.section + _name="$(echo -n "${_spec}" \ + | sed -e 's/^\(..*\)\.\(..*\)$/\1/')"; + _section="$(echo -n "${_spec}" \ + | sed -e 's/^\(..*\)\.\(..*\)$/\2/')"; + ;; + ?*) + _name="${_filespec}"; + ;; + esac; + if is_empty "${_name}"; then + eval "${return_bad}"; + fi; + _got_one='no'; + if is_empty "${_section}"; then + eval set -- "${_MAN_AUTO_SEC}"; + for s in "$@"; do + if man_search_section "${_name}" "$s"; then # found + if is_yes "${_MAN_ALL}"; then + _got_one='yes'; + else + eval "${return_good}"; + fi; + fi; + done; + else + if man_search_section "${_name}" "${_section}"; then + eval "${return_good}"; + else + eval "${return_bad}"; + fi; + fi; + if is_yes "${_MAN_ALL}" && is_yes "${_got_one}"; then + eval "${return_good}"; + fi; + eval "${return_bad}"; +} # man_do_filespec() + + +######################################################################## +# man_register_file ( [
]) +# +# Write a found man page file and register the title element. +# +# Arguments: 1, 2, or 3; maybe empty +# Output: none +# +man_register_file() +{ + func_check man_register_file '>=' 2 "$@"; + case "$#" in + 2|3) do_nothing; ;; + *) + error "man_register_file() expects 2 or 3 arguments."; + ;; + esac; + if is_empty "$1"; then + error 'man_register_file(): file name is empty'; + fi; + to_tmp "$1"; + case "$#" in + 2) + register_title "man:$2"; + eval "${return_ok}"; + ;; + 3) + register_title "$2($3)"; + eval "${return_ok}"; + ;; + esac; + eval "${return_ok}"; +} + + +######################################################################## +# man_search_section (
) +# +# Retrieve man pages. +# +# Arguments : 2 +# Globals : $_MAN_PATH, $_MAN_EXT +# Return : 0 if found, 1 otherwise +# +man_search_section() +{ + func_check man_search_section = 2 "$@"; + local _dir; + local _ext; + local _got_one; + local _name; + local _prefix + local _section; + local d; + local f; + if is_empty "${_MAN_PATH}"; then + eval "${return_bad}"; + fi; + if is_empty "$1"; then + eval "${return_bad}"; + fi; + if is_empty "$2"; then + eval "${return_bad}"; + fi; + _name="$1"; + _section="$2"; + eval set -- "$(path_split "${_MAN_PATH}")"; + _got_one='no'; + if is_empty "${_MAN_EXT}"; then + for d in "$@"; do + _dir="$(dirname_append "$d" "man${_section}")"; + if is_dir "${_dir}"; then + _prefix="$(dirname_append "${_dir}" "${_name}.${_section}")"; + for f in $(echo -n ${_prefix}*); do + if is_file "$f"; then + if is_yes "${_got_one}"; then + register_file "$f"; + elif is_yes "${_MAN_ALL}"; then + man_register_file "$f" "${_name}"; + else + man_register_file "$f" "${_name}" "${_section}"; + eval "${return_good}"; + fi; + _got_one='yes'; + fi; + done; + fi; + done; + else + _ext="${_MAN_EXT}"; + # check for directory name having trailing extension + for d in "$@"; do + _dir="$(dirname_append $d man${_section}${_ext})"; + if is_dir "${_dir}"; then + _prefix="$(dirname_append "${_dir}" "${_name}.${_section}")"; + for f in ${_prefix}*; do + if is_file "$f"; then + if is_yes "${_got_one}"; then + register_file "$f"; + elif is_yes "${_MAN_ALL}"; then + man_register_file "$f" "${_name}"; + else + man_register_file "$f" "${_name}" "${_section}"; + eval "${return_good}"; + fi; + _got_one='yes'; + fi; + done; + fi; + done; + # check for files with extension in directories without extension + for d in "$@"; do + _dir="$(dirname_append "$d" "man${_section}")"; + if is_dir "${_dir}"; then + _prefix="$(dirname_append "${_dir}" \ + "${_name}.${_section}${_ext}")"; + for f in ${_prefix}*; do + if is_file "$f"; then + if is_yes "${_got_one}"; then + register_file "$f"; + elif is_yes "${_MAN_ALL}"; then + man_register_file "$f" "${_name}"; + else + man_register_file "$f" "${_name}" "${_section}"; + eval "${return_good}"; + fi; + _got_one='yes'; + fi; + done; + fi; + done; + fi; + if is_yes "${_MAN_ALL}" && is_yes "${_got_one}"; then + eval "${return_good}"; + fi; + eval "${return_bad}"; +} # man_search_section() + + +######################################################################## +# man_setup () +# +# Setup the variables $_MAN_* needed for man page searching. +# +# Globals: +# in: $_OPT_*, $_MANOPT_*, $LANG, $LC_MESSAGES, $LC_ALL, +# $MANPATH, $MANROFFSEQ, $MANSEC, $PAGER, $SYSTEM, $MANOPT. +# out: $_MAN_PATH, $_MAN_LANG, $_MAN_SYS, $_MAN_LANG, $_MAN_LANG2, +# $_MAN_SEC, $_MAN_ALL +# in/out: $_MAN_ENABLE +# +# The precedence for the variables related to `man' is that of GNU +# `man', i.e. +# +# $LANG; overridden by +# $LC_MESSAGES; overridden by +# $LC_ALL; this has the same precedence as +# $MANPATH, $MANROFFSEQ, $MANSEC, $PAGER, $SYSTEM; overridden by +# $MANOPT; overridden by +# the groffer command line options. +# +man_setup() +{ + func_check main_man_setup = 0 "$@"; + local _lang; + + if is_yes "${_MAN_IS_SETUP}"; then + eval "${return_ok}"; + fi; + _MAN_IS_SETUP='yes'; + + if is_not_yes "${_MAN_ENABLE}"; then + eval "${return_ok}"; + fi; + + # determine basic path for man pages + _MAN_PATH="$(get_first_essential \ + "${_OPT_MANPATH}" "${_MANOPT_PATH}" "${MANPATH}")"; + if is_empty "${_MAN_PATH}"; then + if is_prog 'manpath'; then + _MAN_PATH="$(manpath 2>/dev/null)"; # not always available + fi; + fi; + if is_empty "${_MAN_PATH}"; then + manpath_set_from_path; + else + _MAN_PATH="$(path_clean "${_MAN_PATH}")"; + fi; + if is_empty "${_MAN_PATH}"; then + _MAN_ENABLE="no"; + eval "${return_ok}"; + fi; + + _MAN_ALL="$(get_first_essential "${_OPT_ALL}" "${_MANOPT_ALL}")"; + if is_empty "${_MAN_ALL}"; then + _MAN_ALL='no'; + fi; + + _MAN_SYS="$(get_first_essential \ + "${_OPT_SYSTEMS}" "${_MANOPT_SYS}" "${SYSTEM}")"; + _lang="$(get_first_essential \ + "${_OPT_LANG}" "${LC_ALL}" "${LC_MESSAGES}" "${LANG}")"; + case "${_lang}" in + C|POSIX) + _MAN_LANG=""; + _MAN_LANG2=""; + ;; + ?) + _MAN_LANG="${_lang}"; + _MAN_LANG2=""; + ;; + *) + _MAN_LANG="${_lang}"; + # get first two characters of $_lang + _MAN_LANG2="$(echo -n "${_lang}" | sed -e 's/^\(..\).*$/\1/')"; + ;; + esac; + # from now on, use only $_LANG, forget about $_OPT_LANG, $LC_*. + + manpath_add_lang_sys; # this is very slow + + _MAN_SEC="$(get_first_essential \ + "${_OPT_SECT}" "${_MANOPT_SEC}" "${MANSEC}")"; + if is_empty "${_MAN_PATH}"; then + _MAN_ENABLE="no"; + eval "${return_ok}"; + fi; + + _MAN_EXT="$(get_first_essential \ + "${_OPT_EXTENSION}" "${_MANOPT_EXTENSION}")"; + eval "${return_ok}"; +} # man_setup() + + +######################################################################## +landmark '8: manpath_*()'; +######################################################################## + +######################################################################## +# manpath_add_lang_sys () +# +# Add language and operating system specific directories to man path. +# +# Arguments : 0 +# Output : none +# Globals: +# in: $_MAN_SYS: has the form `os1,os2,...', a comma separated +# list of names of operating systems. +# $_MAN_LANG and $_MAN_LANG2: each a single name +# in/out: $_MAN_PATH: has the form `dir1:dir2:...', a colon +# separated list of directories. +# +manpath_add_lang_sys() +{ + func_check manpath_add_lang_sys = 0 "$@"; + local p; + local _mp; + if is_empty "${_MAN_PATH}"; then + eval "${return_ok}"; + fi; + # twice test both sys and lang + eval set -- "$(path_split "${_MAN_PATH}")"; + _mp=''; + for p in "$@"; do # loop on man path directories + _mp="$(_manpath_add_lang_sys_single "${_mp}" "$p")"; + done; + eval set -- "$(path_split "${_mp}")"; + for p in "$@"; do # loop on man path directories + _mp="$(_manpath_add_lang_sys_single "${_mp}" "$p")"; + done; + _MAN_PATH="$(path_chop "${_mp}")"; + eval "${return_ok}"; +} + + +_manpath_add_lang_sys_single() +{ + # To the directory in $1 append existing sys/lang subdirectories + # Function is necessary to split the OS list. + # + # globals: in: $_MAN_SYS, $_MAN_LANG, $_MAN_LANG2 + # argument: 2: `man_path' and `dir' + # output: colon-separated path of the retrieved subdirectories + # + local d; +# if test "$#" -ne 2; then +# error "manpath_add_system_single() needs 2 arguments."; +# fi; + _res="$1"; + _parent="$2"; + eval set -- "$(list_from_split "${_MAN_SYS}" ',')"; + for d in "$@" "${_MAN_LANG}" "${_MAN_LANG2}"; do + _dir="$(dirname_append "${_parent}" "$d")"; + if path_not_contains "${_res}" "${_dir}" && is_dir "${_dir}"; then + _res="${_res}:${_dir}"; + fi; + done; + if path_not_contains "${_res}" "${_parent}"; then + _res="${_res}:${_parent}"; + fi; + path_chop "${_res}"; +} + +# end manpath_add_lang_sys () + + +######################################################################## +# manpath_set_from_path () +# +# Determine basic search path for man pages from $PATH. +# +# Return: `0' if a valid man path was retrieved. +# Output: none +# Globals: +# in: $PATH +# out: $_MAN_PATH +# +manpath_set_from_path() +{ + func_check manpath_set_from_path = 0 "$@"; + local _base; + local _mandir; + local _manpath; + local d; + local e; + _manpath=''; + + # get a basic man path from $PATH + if is_not_empty "${PATH}"; then + eval set -- "$(path_split "${PATH}")"; + for d in "$@"; do + # delete the final `/bin' part + _base="$(echo -n "$d" | sed -e '\|//*bin/*$|s|||')"; + for e in /share/man /man; do + _mandir="${_base}$e"; + if test -d "${_mandir}" && test -r "${_mandir}"; then + _manpath="${_manpath}:${_mandir}"; + fi; + done; + done; + fi; + + # append some default directories + for d in /usr/local/share/man /usr/local/man \ + /usr/share/man /usr/man \ + /usr/X11R6/man /usr/openwin/man \ + /opt/share/man /opt/man \ + /opt/gnome/man /opt/kde/man; do + if path_not_contains "${_manpath}" "$d" && is_dir "$d"; then + _manpath="${_manpath}:$d"; + fi; + done; + + _MAN_PATH="${_manpath}"; + eval "${return_ok}"; +} # manpath_set_from_path() + + +######################################################################## +landmark '9: path_*()'; +######################################################################## + +######################################################################## +# path_chop () +# +# Remove unnecessary colons from path. +# +# Argument: 1, a colon separated path. +# Output: path without leading, double, or trailing colons. +# +path_chop() +{ + func_check path_chop = 1 "$@"; + local _res; + + # replace multiple colons by a single colon `:' + # remove leading and trailing colons + echo -n "$1" | sed -e 's/:::*/:/g' | + sed -e 's/^:*//' | + sed -e 's/:*$//'; + eval "${return_ok}"; +} + + +######################################################################## +# path_clean () +# +# Remove non-existing directories from a colon-separated list. +# +# Argument: 1, a colon separated path. +# Output: colon-separated list of existing directories. +# +path_clean() +{ + func_check path_clean = 1 "$@"; + local _arg; + local _dir; + local _res; + local i; + if test "$#" -ne 1; then + error 'path_clean() needs 1 argument.'; + fi; + _arg="$1"; + eval set -- "$(path_split "${_arg}")"; + _res=""; + for i in "$@"; do + if is_not_empty "$i" \ + && path_not_contains "${_res}" "$i" \ + && is_dir "$i"; + then + case "$i" in + ?*/) _res="${_res}$(dirname_chop "$i")"; ;; + *) _res="${_res}:$i"; + esac; + fi; + done; + if path_chop "${_res}"; then + eval "${return_ok}"; + else + eval "${return_badk}"; + fi; +} + + +######################################################################## +# path_contains ( ) +#- +# Test whether `dir' is contained in `path', a list separated by `:'. +# +# Arguments : 2 arguments. +# Return : `0' if arg2 is substring of arg1, `1' otherwise. +# +path_contains() +{ + func_check path_contains = 2 "$@"; + case ":$1:" in + *":$2:"*) + eval "${return_yes}"; + ;; + *) + eval "${return_no}"; + ;; + esac; + eval "${return_ok}"; +} + + +######################################################################## +# path_not_contains ( ) +#- +# Test whether `dir' is not contained in colon separated `path'. +# +# Arguments : 2 arguments. +# +path_not_contains() +{ + func_check path_not_contains = 2 "$@"; + if path_contains "$1" "$2"; then + eval "${return_no}"; + else + eval "${return_yes}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# path_split () +# +# In `path' escape white space and replace each colon by a space. +# +# Arguments: 1: a colon-separated path +# Output: the resulting list, process with `eval set --' +# +path_split() +{ + func_check path_split = 1 "$@"; + list_from_split "$1" ':'; + eval "${return_ok}"; +} + + +######################################################################## +# reset () +# +# Reset the variables that can be affected by options to their default. +# +# +# Defined in section `Preset' after the rudimentary shell tests. + + +######################################################################## +landmark '10: register_*()'; +######################################################################## + +######################################################################## +# register_file () +# +# Write a found file and register the title element. +# +# Arguments: 1: a file name +# Output: none +# +register_file() +{ + func_check register_file = 1 "$@"; + if is_empty "$1"; then + error 'register_file(): file name is empty'; + fi; + if is_equal "$1" '-'; then + to_tmp "${_TMP_STDIN}"; + register_title '-'; + else + to_tmp "$1"; + register_title "$(base_name "$1")"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# register_title () +# +# Create title element from and append to $_REGISTERED_TITLE +# +# Globals: $_REGISTERED_TITLE (rw) +# +register_title() +{ + func_check register_title = 1 "$@"; + local _title; + if is_empty "$1"; then + eval "${return_ok}"; + fi; + _title="$(base_name "$1")"; # remove directory part + + # remove extension `.gz' + _title="$(echo -n "${_title}" | sed -e 's/\.gz$//')"; + # remove extension `.Z' + _title="$(echo -n "${_title}" | sed -e 's/\.Z$//')"; + + if is_empty "${_title}"; then + eval "${return_ok}"; + fi; + _REGISTERED_TITLE="${_REGISTERED_TITLE} ${_title}"; + eval "${return_ok}"; +} + + +######################################################################## +# save_stdin () +# +# Store standard input to temporary file (with decompression). +# +if test "${_HAS_COMPRESSION}" = 'yes'; then + save_stdin() + { + local _f; + func_check save_stdin = 0 "$@"; + _f="$(tmp_create)"; + cat >"${_f}"; + catz "${_f}" >"${_TMP_STDIN}"; + rm -f "${_f}"; + eval "${return_ok}"; + } +else + save_stdin() + { + func_check save_stdin = 0 "$@"; + cat >"${_TMP_STDIN}"; + eval "${return_ok}"; + } +fi; + + +######################################################################## +landmark '11: stack_*()'; +######################################################################## + +######################################################################## +# string_contains ( ) +# +# Test whether `part' is contained in `string'. +# +# Arguments : 2 text arguments. +# Return : `0' if arg2 is substring of arg1, `1' otherwise. +# +string_contains() +{ + func_check string_contains = 2 "$@"; + case "$1" in + *"$2"*) + eval "${return_yes}"; + ;; + *) + eval "${return_no}"; + ;; + esac; + eval "${return_ok}"; +} + + +######################################################################## +# string_not_contains ( ) +# +# Test whether `part' is not substring of `string'. +# +# Arguments : 2 text arguments. +# Return : `0' if arg2 is substring of arg1, `1' otherwise. +# +string_not_contains() +{ + func_check string_not_contains = 2 "$@"; + if string_contains "$1" "$2"; then + eval "${return_no}"; + else + eval "${return_yes}"; + fi; + eval "${return_ok}"; +} + + +######################################################################## +landmark '12: tmp_*()'; +######################################################################## + +######################################################################## +# tmp_cat () +# +# output the temporary cat file (the concatenation of all input) +# +tmp_cat() +{ + cat "${_TMP_CAT}"; +} + + +######################################################################## +# tmp_create (?) +# +# create temporary file +# +# It's safe to use the shell process ID together with a suffix to +# have multiple temporary files. +# +# Output : name of created file +# +tmp_create() +{ + func_check tmp_create '<=' 1 "$@"; + local _tmp; + _tmp="${_TMP_PREFIX}${_PROCESS_ID}$1"; + echo -n >"${_tmp}"; + echo -n "${_tmp}"; + eval "${return_ok}"; +} + + +######################################################################## +# to_tmp () +# +# print file (decompressed) to the temporary cat file +# +to_tmp() +{ + func_check to_tmp = 1 "$@"; + if is_file "$1"; then + if is_yes "${_OPT_LOCATION}"; then + echo2 "$1"; + fi; + if is_yes "${_OPT_WHATIS}"; then + what_is "$1" >>"${_TMP_CAT}"; + else + catz "$1" >>"${_TMP_CAT}"; + fi; + else + error "to_tmp(): could not read file \`$1'."; + fi; + eval "${return_ok}"; +} + + +######################################################################## +# usage () +# +# print usage information to stderr +# +usage() +{ + func_check usage = 0 "$@"; + echo2; + version; + cat >&2 <&2 <&1 | sed -e '/^ *$/q' | sed -e '1s/^/is part of /' >&2; +} + + +######################################################################## +# warning () +# +# Print warning to stderr +# +warning() +{ + echo2 "warning: $*"; +} + + +######################################################################## +# what_is () +# +# Interpret as a man page and display its `whatis' +# information as a fragment written in the groff language. +# +what_is() +{ + func_check what_is = 1 "$@"; + local _res; + local _dot; + if is_not_file "$1"; then + error "what_is(): argument is not a readable file." + fi; + _dot='^\.['"${_SPACE}${_TAB}"']*'; + echo '.br'; + echo "$1: "; + echo '.br'; + echo -n ' '; + # grep the line containing `.TH' macro, if any + _res="$(catz "$1" | sed -e '/'"${_dot}"'TH /p +d')"; + if is_not_empty "${_res}"; then # traditional man style + # get the text between the first and the second `.SH' macro, by + # - delete up to first .SH; + # - of this, print everything up to next .SH, and delete the rest; + # - of this, delete the final .SH line; + catz "$1" | sed -e '1,/'"${_dot}"'SH/d' \ + | sed -e '1,/'"${_dot}"'SH/p +d' \ + | sed -e '/'"${_dot}"'SH/d'; + eval "${return_ok}"; + fi; + # grep the line containing `.Dd' macro, if any + _res="$(catz "$1" | sed -e '/'"${_dot}"'Dd /p +d')"; + if is_not_empty "${_res}"; then # BSD doc style + # get the text between the first and the second `.Nd' macro, by + # - delete up to first .Nd; + # - of this, print everything up to next .Nd, and delete the rest; + # - of this, delete the final .Nd line; + catz "$1" | sed -e '1,/'"${_dot}"'Nd/d' \ + | sed -e '1,/'"${_dot}"'Nd/p +d' \ + | sed -e '/'"${_dot}"'Nd/d'; + eval "${return_ok}"; + fi; + echo 'is not a man page.'; + eval "${return_bad}"; +} + + +######################################################################## +# where () +# +# Output path of a program if in $PATH. +# +# Arguments : >=1 (empty allowed) +# more args are ignored, this allows to specify progs with arguments +# Return : `0' if arg1 is a program in $PATH, `1' otherwise. +# +where() +{ + func_check where '>=' 1 "$@"; + local _file; + local _arg; + local p; + _arg="$1"; + if is_empty "${_arg}"; then + eval "${return_bad}"; + fi; + case "${_arg}" in + /*) + if test -f "${_arg}" && test -x "${_arg}"; then + eval "${return_ok}"; + else + eval "${return_bad}"; + fi; + ;; + esac; + eval set -- "$(path_split "${PATH}")"; + for p in "$@"; do + case "$p" in + */) _file=$p${_arg}; ;; + *) _file=$p/${_arg}; ;; + esac; + if test -f "${_file}" && test -x "${_file}"; then + echo -n "${_file}"; + eval "${return_ok}"; + fi; + done; + eval "${return_bad}"; +} + + +######################################################################## +# main +######################################################################## + +# The main area contains the following parts: +# - main_init(): initialize temporary files and set exit trap +# - parse $MANOPT +# - main_parse_args(): argument parsing +# - determine display mode +# - process filespec arguments +# - setup X resources +# - do the displaying + +# These parts are implemented as functions, being defined below in the +# sequence they are called in the main() function. + + +####################################################################### +# main_init () +# +# set exit trap and create temporary files +# +# Globals: $_TMP_CAT, $_TMP_STDIN +# +landmark '13: main_init()'; +main_init() +{ + func_check main_init = 0 "$@"; + # call clean_up() on any signal + trap clean_up 2>/dev/null || true; + + for f in ${_CONFFILES}; do + if is_file "$f"; then + . "$f"; + fi; + done; + + # determine temporary directory + for d in "${GROFF_TMPDIR}" "${TMPDIR}" "${TMP}" "${TEMP}" \ + "${TEMPDIR}" "${HOME}"'/tmp' '/tmp' "${HOME}" '.'; + do + if test "$d" != ""; then + if test -d "$d" && test -r "$d" && test -w "$d"; then + _TMP_DIR="$d"; + break; + fi; + fi; + done; + unset d; + if test "${_TMP_DIR}" = ""; then + error "Couldn't find a directory for storing temorary files."; + fi; + _TMP_PREFIX="${_TMP_DIR}/${_PROGRAM_NAME}"; + + _TMP_CAT="$(tmp_create)"; + _TMP_STDIN="$(tmp_create i)"; + eval "${return_ok}"; +} # main_init() + + +######################################################################## +# main_parse_MANOPT () +# +# Parse $MANOPT; this clobbered by the command line. +# +# Globals: +# in: $MANOPT, $_OPTS_MAN_* +# out: $_MANOPT_* +# in/out: $GROFFER_OPT +# +landmark '14: main_parse_MANOPT()'; +main_parse_MANOPT() +{ + func_check main_parse_MANOPT = 0 "$@"; + local _opt; + local _list; + _list=''; + # feed in $MANOPT + eval set -- "$(list_from_cmdline \ + "${_OPTS_MAN_SHORT_NA}" "${_OPTS_MAN_SHORT_ARG}" \ + "${_OPTS_MAN_LONG_NA}" "${_OPTS_MAN_LONG_ARG}" \ + "${MANOPT}")"; + until test "$#" -le 0 || is_equal "$1" '--'; do + _opt="$1"; + shift; + case "${_opt}" in + -7|--ascii) + _list="$(list_append "${_list}" '--ascii')"; + ;; + -a|--all) + _list="$(list_append "${_list}" '--all')"; + ;; + -c|--catman) + do_nothing; + shift; + ;; + -d|--debug) + _list="$(list_append "${_list}" '--debug')"; + ;; + -D|--default) + # undo all man options so far + _list=''; + ;; + -e|--extension) + _list="$(list_append "${_list}" '--extension')"; + shift; + ;; + -f|--whatis) + _list="$(list_append "${_list}" '--whatis')"; + shift; + ;; + -h|--help) + do_nothing; + shift; + ;; + -k|--apropos) + _list="$(list_append "${_list}" '--apropos')"; + shift; + ;; + -l|--local-file) + _list="$(list_append "${_list}" '--local-file')"; + ;; + -L|--locale) + _list="$(list_append "${_list}" '--locale' "$1")"; + shift; + ;; + -m|--systems) + _list="$(list_append "${_list}" '--systems' "$1")"; + shift; + ;; + -M|--manpath) + _list="$(list_append "${_list}" '--manpath' "$1")"; + shift; + ;; + -p|--preprocessor) + do_nothing; + shift; + ;; + -P|--pager) + _list="$(list_append "${_list}" '--pager' "$1")"; + shift; + ;; + -r|--prompt) + do_nothing; + shift; + ;; + -S|--sections) + _list="$(list_append "${_list}" '--sections' "$1")"; + shift; + ;; + -t|--troff) + do_nothing; + shift; + ;; + -T|--device) + _list="$(list_append "${_list}" '-T' "$1")"; + shift; + ;; + -u|--update) + do_nothing; + shift; + ;; + -V|--version) + do_nothing; + ;; + -w|--where|--location) + _list="$(list_append "${_list}" '--location')"; + ;; + -Z|--ditroff) + _list="$(list_append "${_list}" '-Z' "$1")"; + shift; + ;; + # ignore all other options + esac; + done; + GROFFER_OPT="$(list_from_lists "${_list}" "${GROFFER_OPT}")"; + eval "${return_ok}"; +} # main_parse_MANOPT() + + +######################################################################## +# main_parse_args (*) +# +# Parse arguments; process options and filespec parameters +# +# Arguments: pass the command line arguments unaltered. +# Globals: +# in: $_OPTS_* +# out: $_OPT_*, $_ADDOPTS, $_FILEARGS +# +landmark '15: main_parse_args()'; +main_parse_args() +{ + func_check main_parse_args '>=' 0 "$@"; + local _arg; + local _code; + local _dpi; + local _longopt; + local _mode; + local _opt; + local _optchar; + local _optarg; + local _opts; + local _string; + + eval set -- "${GROFFER_OPT}" '"$@"'; + + eval set -- "$(list_from_cmdline \ + "$_OPTS_CMDLINE_SHORT_NA" "$_OPTS_CMDLINE_SHORT_ARG" \ + "$_OPTS_CMDLINE_LONG_NA" "$_OPTS_CMDLINE_LONG_ARG" \ + "$@")"; + +# By the call of `eval', unnecessary quoting was removed. So the +# positional shell parameters ($1, $2, ...) are now guaranteed to +# represent an option or an argument to the previous option, if any; +# then a `--' argument for separating options and +# parameters; followed by the filespec parameters if any. + +# Note, the existence of arguments to options has already been checked. +# So a check for `$#' or `--' should not be done for arguments. + + until test "$#" -le 0 || is_equal "$1" '--'; do + _opt="$1"; # $_opt is fed into the option handler + shift; + case "${_opt}" in + -h|--help) + usage; + leave; + ;; + -Q|--source) # output source code (`Quellcode'). + _OPT_MODE='source'; + ;; + -T|--device|--troff-device) + # device; arg + _OPT_DEVICE="$1"; + shift; + ;; + -v|--version) + version; + leave; + ;; + -V) + _OPT_V='yes'; + ;; + -X) + _OPT_X='yes'; + ;; + -Z|--ditroff|--intermediate-output) + # groff intermediate output + _OPT_Z='yes'; + ;; + -?) + # delete leading `-' + _optchar="$(echo -n "${_opt}" | sed -e 's/^.//')"; + if list_has "${_OPTS_GROFF_SHORT_NA}" "${_optchar}"; + then + _ADDOPTS_GROFF="$(list_append "${_ADDOPTS_GROFF}" \ + "${_opt}")"; + elif list_has "${_OPTS_GROFF_SHORT_ARG}" "${_optchar}"; + then + _ADDOPTS_GROFF="$(list_append "${_ADDOPTS_GROFF}" \ + "${_opt}" "$1")"; + shift; + else + error "Unknown option : \`$1'"; + fi; + ;; + --all) + _OPT_ALL="yes"; + ;; + --ascii) + _ADDOPTS_GROFF="$(list_append "${_ADDOPTS_GROFF}" \ + '-mtty-char')"; + ;; + --apropos) + _OPT_APROPOS="yes"; + ;; + --auto) # the default automatic mode + _mode=''; + ;; + --bd) # border color for viewers, arg; + _OPT_BD="$1"; + shift; + ;; + --bg|--backgroud) # background color for viewers, arg; + _OPT_BG="$1"; + shift; + ;; + --bw) # border width for viewers, arg; + _OPT_BW="$1"; + shift; + ;; + --default) # reset variables to default + reset; + ;; + --default-modes) # sequence of modes in auto mode; arg + _OPT_DEFAULT_MODES="$1"; + shift; + ;; + --debug) # sequence of modes in auto mode; arg + _OPT_DEBUG='yes'; + ;; + --display) # set X display, arg + _OPT_DISPLAY="$1"; + shift; + ;; + --dvi) + _OPT_MODE='dvi'; + ;; + --dvi-viewer) # viewer program for dvi mode; arg + _OPT_VIEWER_DVI="$1"; + shift; + ;; + --extension) # the extension for man pages, arg + _OPT_EXTENSION="$1"; + shift; + ;; + --fg|--foreground) # foreground color for viewers, arg; + _OPT_FG="$1"; + shift; + ;; + --fn|--font) # set font for viewers, arg; + _OPT_FN="$1"; + shift; + ;; + --geometry) # window geometry for viewers, arg; + _OPT_GEOMETRY="$1"; + shift; + ;; + --groff) + _OPT_MODE='groff'; + ;; + --locale) # set language for man pages, arg + # argument is xx[_territory[.codeset[@modifier]]] (ISO 639,...) + _OPT_LANG="$1"; + shift; + ;; + --local-file) # force local files; same as `--no-man' + _MAN_FORCE='no'; + _MAN_ENABLE='no'; + ;; + --location|--where) # print file locations to stderr + _OPT_LOCATION='yes'; + ;; + --man) # force all file params to be man pages + _MAN_ENABLE='yes'; + _MAN_FORCE='yes'; + ;; + --manpath) # specify search path for man pages, arg + # arg is colon-separated list of directories + _OPT_MANPATH="$1"; + shift; + ;; + --mode) # display mode + _arg="$1"; + shift; + case "${_arg}" in + auto|'') # the default automatic mode + _mode=''; + ;; + groff) # pass input to plain groff + _mode='groff'; + ;; + dvi) # display with xdvi viewer + _mode='dvi'; + ;; + pdf) # display with PDF viewer + _mode='pdf'; + ;; + ps) # display with Postscript viewer + _mode='ps'; + ;; + X|x) # output on X roff viewer + _mode='x'; + ;; + tty) # output on terminal + _mode='tty'; + ;; + Q|source) # display source code + _mode="source"; + ;; + *) + error "unknown mode ${_arg}"; + ;; + esac; + _OPT_MODE="${_mode}"; + ;; + --no-location) # disable former call to `--location' + _OPT_LOCATION='yes'; + ;; + --no-man) # disable search for man pages + # the same as --local-file + _MAN_FORCE="no"; + _MAN_ENABLE="no"; + ;; + --pager) # set paging program for tty mode, arg + _OPT_PAGER="$1"; + shift; + ;; + --pdf) + _OPT_MODE='pdf'; + ;; + --pdf-viewer) # viewer program for ps mode; arg + _OPT_VIEWER_PDF="$1"; + shift; + ;; + --ps) + _OPT_MODE='ps'; + ;; + --ps-viewer) # viewer program for ps mode; arg + _OPT_VIEWER_PS="$1"; + shift; + ;; + --resolution) # set resolution for X devices, arg + _arg="$1"; + shift; + case "${_arg}" in + 75|75dpi) + _dpi=75; + ;; + 100|100dpi) + _dpi=100; + ;; + *) + error "only resoutions of 75 or 100 dpi are supported"; + ;; + esac; + _OPT_RESOLUTION="${_dpi}"; + ;; + --rv) + _OPT_RV='yes'; + ;; + --sections) # specify sections for man pages, arg + # arg is colon-separated list of section names + _OPT_SECTIONS="$1"; + shift; + ;; + --shell) + shift; + ;; + --systems) # man pages for different OS's, arg + # argument is a comma-separated list + _OPT_SYSTEMS="$1"; + shift; + ;; + --title) # title for X viewers; arg + _OPT_TITLE="$1"; + shift; + ;; + --tty) + _OPT_MODE="tty"; + ;; + --tty-device) # device for tty mode; arg + _OPT_TTY_DEVICE="$1"; + shift; + ;; + --whatis) + _OPT_WHATIS='yes'; + ;; + --www) # display with web browser + _OPT_MODE='www'; + ;; + --www-viewer) # viewer program for www mode; arg + _OPT_VIEWER_WWW="$1"; + shift; + ;; + --x) + _OPT_MODE='x'; + ;; + --xrm) # pass X resource string, arg; + _OPT_XRM="$(list_append "${_OPT_XRM}" "$1")"; + shift; + ;; + --x-viewer) # viewer program for x mode; arg + _OPT_VIEWER_X="$1"; + shift; + ;; + *) + error 'error on argument parsing : '"\`$*'"; + ;; + esac; + done; + shift; # remove `--' argument + + if test "${_DEBUG}" != 'yes'; then + if test "${_OPT_DEBUG}" = 'yes'; then + _DEBUG='yes'; + fi; + fi; + + # Remaining arguments are file names (filespecs). + # Save them to list $_FILEARGS + if test "$#" -eq 0; then # use "-" for standard input + set -- '-'; + fi; + _FILEARGS="$(list_from_args "$@")"; + if list_has "$_FILEARGS" '-'; then + save_stdin; + fi; + # $_FILEARGS must be retrieved with `eval set -- "$_FILEARGS"' + eval "${return_ok}"; +} # main_parse_args() + + +######################################################################## +# main_set_mode () +# +# Determine the display mode. +# +# Globals: +# in: $DISPLAY, $_OPT_MODE, $_OPT_DEVICE +# out: $_DISPLAY_MODE +# + +# _get_first_prog () +# +# Retrieve first argument that represents an existing program in $PATH. +# Local function for main_set_mode(). +# +# Arguments: 1; a comma-separated list of commands (with options), +# like $_VIEWER_*. +# +# Return : `1' if none found, `0' if found. +# Output : the argument that succeded. +# +landmark '16: main_set_mode()'; +main_set_mode() +{ + func_check main_set_mode = 0 "$@"; + local m; + local _modes; + local _viewer; + local _viewers; + + # handle apropos + if is_yes "${_OPT_APROPOS}"; then + apropos "$@"; + _code="$?"; + clean_up; + exit "${_code}"; + fi; + + # set display + if is_not_empty "${_OPT_DISPLAY}"; then + DISPLAY="${_OPT_DISPLAY}"; + fi; + + if is_yes "${_OPT_V}"; then + _DISPLAY_MODE='groff'; + _ADDOPTS_GROFF="$(list_append "${_ADDOPTS_GROFF}" '-V')"; + fi; + if is_yes "${_OPT_X}"; then + _DISPLAY_MODE='groff'; + _ADDOPTS_GROFF="$(list_append "${_ADDOPTS_GROFF}" '-X')"; + fi; + if is_yes "${_OPT_Z}"; then + _DISPLAY_MODE='groff'; + _ADDOPTS_GROFF="$(list_append "${_ADDOPTS_GROFF}" '-Z')"; + fi; + if is_equal "${_OPT_MODE}" 'groff'; then + _DISPLAY_MODE='groff'; + fi; + if is_equal "${_DISPLAY_MODE}" 'groff'; then + eval "${return_ok}"; + fi; + + if is_equal "${_OPT_MODE}" 'source'; then + _DISPLAY_MODE='source'; + eval "${return_ok}"; + fi; + + case "${_OPT_MODE}" in + '') # automatic mode + case "${_OPT_DEVICE}" in + X*) + if is_empty "${DISPLAY}"; then + error "no X display found for device ${_OPT_DEVICE}"; + fi; + _DISPLAY_MODE='x'; + eval "${return_ok}"; + ;; + ascii|cp1047|latin1|utf8) + _DISPLAY_MODE='tty'; + eval "${return_ok}"; + ;; + esac; + if is_empty "${DISPLAY}"; then + _DISPLAY_MODE='tty'; + eval "${return_ok}"; + fi; + + if is_empty "${_OPT_DEFAULT_MODES}"; then + _modes="${_DEFAULT_MODES}"; + else + _modes="${_OPT_DEFAULT_MODES}"; + fi; + ;; + tty) + _DISPLAY_MODE='tty'; + eval "${return_ok}"; + ;; + *) # display mode was given + if is_empty "${DISPLAY}"; then + error "you must be in X Window for ${_OPT_MODE} mode."; + fi; + _modes="${_OPT_MODE}"; + ;; + esac; + + # only viewer modes are left + eval set -- "$(list_from_split "${_modes}" ',')"; + while test "$#" -gt 0; do + m="$1"; + shift; + case "$m" in + tty) + _DISPLAY_MODE='tty'; + eval "${return_ok}"; + ;; + x) + if is_not_empty "${_OPT_VIEWER_X}"; then + _viewers="${_OPT_VIEWER_X}"; + else + _viewers="${_VIEWER_X}"; + fi; + _viewer="$(_get_first_prog "${_viewers}")"; + if test "$?" -ne 0; then + continue; + fi; + _DISPLAY_PROG="${_viewer}"; + _DISPLAY_MODE='x'; + eval "${return_ok}"; + ;; + dvi) + if is_not_empty "${_OPT_VIEWER_DVI}"; then + _viewers="${_OPT_VIEWER_DVI}"; + else + _viewers="${_VIEWER_DVI}"; + fi; + _viewer="$(_get_first_prog "${_viewers}")"; + if test "$?" -ne 0; then + continue; + fi; + _DISPLAY_PROG="${_viewer}"; + _DISPLAY_MODE="dvi"; + eval "${return_ok}"; + ;; + pdf) + if is_not_empty "${_OPT_VIEWER_PDF}"; then + _viewers="${_OPT_VIEWER_PDF}"; + else + _viewers="${_VIEWER_PDF}"; + fi; + _viewer="$(_get_first_prog "${_viewers}")"; + if test "$?" -ne 0; then + continue; + fi; + _DISPLAY_PROG="${_viewer}"; + _DISPLAY_MODE="pdf"; + eval "${return_ok}"; + ;; + ps) + if is_not_empty "${_OPT_VIEWER_PS}"; then + _viewers="${_OPT_VIEWER_PS}"; + else + _viewers="${_VIEWER_PS}"; + fi; + _viewer="$(_get_first_prog "${_viewers}")"; + if test "$?" -ne 0; then + continue; + fi; + _DISPLAY_PROG="${_viewer}"; + _DISPLAY_MODE="ps"; + eval "${return_ok}"; + ;; + www) + if is_not_empty "${_OPT_VIEWER_WWW}"; then + _viewers="${_OPT_VIEWER_WWW}"; + else + _viewers="${_VIEWER_WWW}"; + fi; + _viewer="$(_get_first_prog "${_viewers}")"; + if test "$?" -ne 0; then + continue; + fi; + _DISPLAY_PROG="${_viewer}"; + _DISPLAY_MODE="www"; + eval "${return_ok}"; + ;; + esac; + done; + error "no suitable display mode found."; +} + +_get_first_prog() +{ + local i; + if test "$#" -eq 0; then + error "_get_first_prog() needs 1 argument."; + fi; + if is_empty "$1"; then + return "${_BAD}"; + fi; + eval set -- "$(list_from_split "$1" ',')"; + for i in "$@"; do + if is_empty "$i"; then + continue; + fi; + if is_prog "$(get_first_essential $i)"; then + echo -n "$i"; + return "${_GOOD}"; + fi; + done; + return "${_BAD}"; +} # main_set_mode() + + +####################################################################### +# main_do_fileargs () +# +# Process filespec arguments in $_FILEARGS. +# +# Globals: +# in: $_FILEARGS (process with `eval set -- "$_FILEARGS"') +# +landmark '17: main_do_fileargs()'; +main_do_fileargs() +{ + func_check main_do_fileargs = 0 "$@"; + local _exitcode; + local _filespec; + local _name; + _exitcode="${_BAD}"; + eval set -- "${_FILEARGS}"; + unset _FILEARGS; + # temporary storage of all input to $_TMP_CAT + while test "$#" -ge 2; do + # test for `s name' arguments, with `s' a 1-char standard section + _filespec="$1"; + shift; + case "${_filespec}" in + '') + continue; + ;; + '-') + if register_file '-'; then + _exitcode="${_GOOD}"; + fi; + continue; + ;; + ?) + if list_has_not "${_MAN_AUTO_SEC}" "${_filespec}"; then + if do_filearg "${_filespec}"; then + _exitcode="${_GOOD}"; + fi; + continue; + fi; + _name="$1"; + case "${_name}" in + */*|man:*|*\(*\)|*."${_filespec}") + if do_filearg "${_filespec}"; then + _exitcode="${_GOOD}"; + fi; + continue; + ;; + esac; + if do_filearg "man:${_name}(${_filespec})"; then + _exitcode="${_GOOD}"; + shift; + continue; + else + if do_filearg "${_filespec}"; then + _exitcode="${_GOOD}"; + fi; + continue; + fi; + ;; + *) + if do_filearg "${_filespec}"; then + _exitcode="${_GOOD}"; + fi; + continue; + ;; + esac; + done; # end of `s name' test + while test "$#" -gt 0; do + _filespec="$1"; + shift; + if do_filearg "${_filespec}"; then + _exitcode="${_GOOD}"; + fi; + done; + clean_up_secondary; + if is_equal "${_exitcode}" "${_BAD}"; then + eval "${return_bad}"; + fi; + eval "${return_ok}"; +} # main_do_fileargs() + + +######################################################################## +# main_set_resources () +# +# Determine options for setting X resources with $_DISPLAY_PROG. +# +landmark '18: main_set_resources()'; +main_set_resources() +{ + func_check main_set_resources = 0 "$@"; + local _prog; # viewer program + local _rl; # resource list + _rl=''; + if is_empty "${_DISPLAY_PROG}"; then + eval "${return_ok}"; + fi; + set -- ${_DISPLAY_PROG}; + _prog="$(base_name "$1")"; + if is_not_empty "${_OPT_BD}"; then + case "${_prog}" in + ghostview|gv|gxditview|xditview|xdvi) + _rl="$(list_append "$_rl" '-bd' "${_OPT_BD}")"; + ;; + esac; + fi; + if is_not_empty "${_OPT_BG}"; then + case "${_prog}" in + ghostview|gv|gxditview|xditview|xdvi) + _rl="$(list_append "$_rl" '-bg' "${_OPT_BG}")"; + ;; + xpdf) + _rl="$(list_append "$_rl" '-papercolor' "${_OPT_BG}")"; + ;; + esac; + fi; + if is_not_empty "${_OPT_BW}"; then + case "${_prog}" in + ghostview|gv|gxditview|xditview|xdvi) + _rl="$(list_append "$_rl" '-bw' "${_OPT_BW}")"; + ;; + esac; + fi; + if is_not_empty "${_OPT_FG}"; then + case "${_prog}" in + ghostview|gv|gxditview|xditview|xdvi) + _rl="$(list_append "$_rl" '-fg' "${_OPT_FG}")"; + ;; + esac; + fi; + if is_not_empty "${_OPT_FN}"; then + case "${_prog}" in + ghostview|gv|gxditview|xditview|xdvi) + _rl="$(list_append "$_rl" '-fn' "${_OPT_FN}")"; + ;; + esac; + fi; + if is_not_empty "${_OPT_GEOMETRY}"; then + case "${_prog}" in + ghostview|gv|gxditview|xditview|xdvi|xpdf) + _rl="$(list_append "$_rl" '-geometry' "${_OPT_GEOMETRY}")"; + ;; + esac; + fi; + if is_empty "${_OPT_RESOLUTION}"; then + case "${_prog}" in + gxditview|xditview) + _rl="$(list_append "$_rl" \ + '-resolution' "${_DEFAULT_RESOLUTION}")"; + ;; + xpdf) + case "${_DEFAULT_RESOLUTION}" in + 75) + _rl="$(list_append "$_rl" '-z' '2')"; + ;; + 100) + _rl="$(list_append "$_rl" '-z' '3')"; + ;; + esac; + ;; + esac; + else + case "${_prog}" in + ghostview|gv|gxditview|xditview|xdvi) + _rl="$(list_append "$_rl" '-resolution' "${_OPT_RESOLUTION}")"; + ;; + xpdf) + case "${_OPT_RESOLUTION}" in + 75) + _rl="$(list_append "$_rl" '-z' '2')"; + ;; + 100) + _rl="$(list_append "$_rl" '-z' '3')"; + ;; + esac; + ;; + esac; + fi; + if is_not_empty "${_OPT_RV}"; then + case "${_prog}" in + ghostview|gv|gxditview|xditview|xdvi) + _rl="$(list_append "$_rl" '-rv')"; + ;; + esac; + fi; + if is_not_empty "${_OPT_XRM}"; then + case "${_prog}" in + ghostview|gv|gxditview|xditview|xdvi|xpdf) + eval set -- "{$_OPT_XRM}"; + for i in "$@"; do + _rl="$(list_append "$_rl" '-xrm' "$i")"; + done; + ;; + esac; + fi; + _title="$(get_first_essential \ + "${_OPT_TITLE}" "${_REGISTERED_TITLE}")"; + if is_not_empty "${_title}"; then + case "${_prog}" in + gxditview|xditview) + _rl="$(list_append "$_rl" '-title' "${_title}")"; + ;; + esac; + fi; + _DISPLAY_ARGS="${_rl}"; + eval "${return_ok}"; +} # main_set_resources + + +######################################################################## +# main_display () +# +# Do the actual display of the whole thing. +# +# Globals: +# in: $_DISPLAY_MODE, $_OPT_DEVICE, +# $_ADDOPTS_GROFF, $_ADDOPTS_POST, $_ADDOPTS_X, +# $_REGISTERED_TITLE, $_TMP_PREFIX, $_TMP_CAT, +# $_OPT_PAGER $PAGER $_MANOPT_PAGER +# +landmark '19: main_display()'; +main_display() +{ + func_check main_display = 0 "$@"; + local p; + local _addopts; + local _device; + local _groggy; + local _modefile; + local _options; + local _pager; + local _title; + export _addopts; + export _groggy; + export _modefile; + + # Some display programs have trouble with empty input. + # This is avoided by feeding a space character in this case. + # Test on non-empty file by tracking a line with at least 1 character. + if is_empty "$(tmp_cat | sed -e '/./q')"; then + echo ' ' > "${_TMP_CAT}"; + fi; + + case "${_DISPLAY_MODE}" in + groff) + _ADDOPTS_GROFF="${_ADDOPTS_GROFF} ${_ADDOPTS_POST}"; + if is_not_empty "${_OPT_DEVICE}"; then + _ADDOPTS_GROFF="${_ADDOPTS_GROFF} -T${_OPT_DEVICE}"; + fi; + _groggy="$(tmp_cat | eval grog "${_options}")"; + trap "" EXIT 2>/dev/null || true; + # start a new shell program to get another process ID. + sh -c ' + set -e; + _PROCESS_ID="$$"; + _modefile="${_TMP_DIR}/${_PROGRAM_NAME}${_PROCESS_ID}"; + rm -f "${_modefile}"; + mv "${_TMP_CAT}" "${_modefile}"; + rm -f "${_TMP_CAT}"; + cat "${_modefile}" | \ + ( + clean_up() + { + rm -f "${_modefile}"; + } + trap clean_up EXIT 2>/dev/null || true; + eval "${_groggy}" "${_ADDOPTS_GROFF}"; + ) &' + ;; + tty) + case "${_OPT_DEVICE}" in + '') + _device="$(get_first_essential \ + "${_OPT_TTY_DEVICE}" "${_DEFAULT_TTY_DEVICE}")"; + ;; + ascii|cp1047|latin1|utf8) + _device="${_OPT_DEVICE}"; + ;; + *) + warning \ + "wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; + ;; + esac; + _addopts="${_ADDOPTS_GROFF} ${_ADDOPTS_POST}"; + _groggy="$(tmp_cat | grog -T${_device})"; + _pager=''; + for p in "${_OPT_PAGER}" "${PAGER}" "${_MANOPT_PAGER}" \ + 'less' 'more' 'cat'; do + if is_prog "$p"; then + _pager="$p"; + break; + fi; + done; + if is_empty "${_pager}"; then + error 'no pager program found for tty mode'; + fi; + tmp_cat | eval "${_groggy}" "${_addopts}" | \ + eval "${_pager}"; + clean_up; + ;; + + #### viewer modes + + dvi) + case "${_OPT_DEVICE}" in + ''|dvi) do_nothing; ;; + *) + warning \ + "wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; + ;; + esac; + _groggy="$(tmp_cat | grog -Tdvi)"; + _do_display; + ;; + pdf) + case "${_OPT_DEVICE}" in + ''|ps) + do_nothing; + ;; + *) + warning \ + "wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; + ;; + esac; + _groggy="$(tmp_cat | grog -Tps)"; + trap "" EXIT 2>/dev/null || true; + # start a new shell program to get another process ID. + sh -c ' + set -e; + _PROCESS_ID="$$"; + _psfile="${_TMP_DIR}/${_PROGRAM_NAME}${_PROCESS_ID}"; + _modefile="${_TMP_DIR}/${_PROGRAM_NAME}${_PROCESS_ID}.pdf"; + rm -f "${_psfile}"; + rm -f "${_modefile}"; + cat "${_TMP_CAT}" | \ + eval "${_groggy}" "${_ADDOPTS_GROFF}" > "${_psfile}"; + gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \ + -sOutputFile="${_modefile}" -c save pop -f "${_psfile}"; + rm -f "${_psfile}"; + rm -f "${_TMP_CAT}"; + ( + clean_up() + { + rm -f "${_modefile}"; + } + trap clean_up EXIT 2>/dev/null || true; + eval "${_DISPLAY_PROG}" ${_DISPLAY_ARGS} "${_modefile}"; + ) &' + ;; + ps) + case "${_OPT_DEVICE}" in + ''|ps) + do_nothing; + ;; + *) + warning \ + "wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; + ;; + esac; + _groggy="$(tmp_cat | grog -Tps)"; + _do_display; + ;; + source) + tmp_cat; + clean_up; + ;; + www) + case "${_OPT_DEVICE}" in + ''|html) do_nothing; ;; + *) + warning \ + "wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; + ;; + esac; + _groggy="$(tmp_cat | grog -Thtml)"; + _do_display; + ;; + x) + case "${_OPT_DEVICE}" in + '') + _groggy="$(tmp_cat | grog -Z)"; + ;; + X*|ps) + _groggy="$(tmp_cat | grog -T"${_OPT_DEVICE}" -Z)"; + ;; + *) + warning \ + "wrong device for ${_DISPLAY_MODE} mode: ${_OPT_DEVICE}"; + _groggy="$(tmp_cat | grog -Z)"; + ;; + esac; + _do_display; + ;; + *) + error "unknown mode \`${_DISPLAY_MODE}'"; + ;; + esac; + eval "${return_ok}"; +} # main_display() + +_do_display() +{ + trap "" EXIT 2>/dev/null || true; + # start a new shell program to get another process ID. + sh -c ' + set -e; + _PROCESS_ID="$$"; + _modefile="${_TMP_DIR}/${_PROGRAM_NAME}${_PROCESS_ID}"; + rm -f "${_modefile}"; + cat "${_TMP_CAT}" | \ + eval "${_groggy}" "${_ADDOPTS_GROFF}" > "${_modefile}"; + rm -f "${_TMP_CAT}"; + ( + clean_up() + { + rm -f "${_modefile}"; + } + trap clean_up EXIT 2>/dev/null || true; + eval "${_DISPLAY_PROG}" ${_DISPLAY_ARGS} "${_modefile}"; + ) &' +} + + +######################################################################## +# main (*) +# +# The main function for groffer. +# +# Arguments: +# +main() +{ + func_check main '>=' 0 "$@"; + # Do not change the sequence of the following functions! + main_init; + main_parse_MANOPT; + main_parse_args "$@"; + main_set_mode; + main_do_fileargs; + main_set_resources; + main_display; + eval "${return_ok}"; +} + +landmark '20: end of function definitions'; + +######################################################################## + +main "$@"; diff --git a/contrib/groff/contrib/mm/ChangeLog b/contrib/groff/contrib/mm/ChangeLog index ab3ed83..3033a1f 100644 --- a/contrib/groff/contrib/mm/ChangeLog +++ b/contrib/groff/contrib/mm/ChangeLog @@ -1,9 +1,94 @@ +Wed Sep 09:53:06 2002 Joergen Haegg + + * added implicit -mm to mmroff, it's now possible + to use mmroff with or without -mm as argument. + +Thu Aug 08 00:31:00 Bob Diertens + + * m.tmac (VM): Add missing backslash. + +Fri Jun 10:37:58 2002 Joergen Haegg + + * added init@reset for LT-macros so .S works for letters + +Thu May 06:30:06 2002 Joergen Haegg + + * adding -T to VM for setting the total + header and footer size. + * changing pg*extra-header-size unit from v to u in DS-size + calculation + +Mon May 05:40:16 2002 Joergen Haegg + + * All lists now get an empty line before the list + even if there is no empty lines between the items (bug in LB) + +Sat May 07:36:08 2002 Joergen Haegg + + * PIC is now drawn 1v higher, making it + possible to put a picture at 0,0. + * Indentbug in P fixed, Pt=2 now behaves as it should + +Wed May 10:18:26 2002 Joergen Haegg + + * added L, W and O in groff_mm.man + * extra space in expression removed in EPIC + * EPIC can leftadjust with -L + * EPIC was drawing 1v down + * forgot to add mmse.tmac and mm.tmac to cvs + +Fri May 20:35:32 2002 Joergen Haegg + + * Clarified manual about INITR + * Added mm.tmac and mmse.tmac wrappers + * Fixed bug in mmroff so a .qrf-file always will be created + * .EQ mark was not correctly positioned anymore. + * changed SP to sp in DS/DE to further correct .EQ + +Sun Dec 9 00:00:00 2001 Werner LEMBERG (wl@gnu.org) + + * Makefile.sim, groff_mm.man, groff_mmse.man: Minor fixes. + * mmroff.man: This is a section 1 man page. + Minor fixes. + * Makefile.sub: Install mmroff.man in section 1. + +Wed Nov 28 00:00:00 2001 Werner LEMBERG (wl@gnu.org) + + * m.tmac: Assure that the macro package is loaded only once. + +Wed Sep 5 00:00:00 2001 Werner LEMBERG (wl@gnu.org) + + * m.tmac: Enable all warnings only if no -W or -w option is given on + the command line (or rather, if only the default warnings are + set). + +Mon Sep 3 00:00:00 2001 Werner LEMBERG (wl@gnu.org) + + * groff_mm.man: Don't use .ne for TTY devices. + +Thu Jul 26 00:00:00 2001 Werner LEMBERG (wl@gnu.org) + + * groff_mm.man: Start always a new line after end of sentence. Add + some compatibility info to the HF variable. + +Thu Jul 26 00:00:00 2001 Larry Jones (larry.jones@sdrc.com) + + * m.tmac: Fix initialization of Hps1 and Hps2. + +Wed May 16 00:00:00 2001 Bruce Lilly (blilly@erols.com) + + * m.tmac (TH): Fix incorrect error message. + +Thu Apr 12 00:00:00 2001 Ruslan Ermilov (ru@FreeBSD.org) + + * groff_mm.man: Fixing some typos. + Mon Mar 5 09:30:18 2001 Jörgen Hägg (jh@axis.com) * S didn't reset to default point size * (dummy line to force cvs update...) -Sat Jan 06 10:30:00 2001 Werner Lemberg (wl@gnu.org) +Sat Jan 06 10:30:00 2001 Werner LEMBERG (wl@gnu.org) * Fixed assignment of page offset given as a command line argument. @@ -18,6 +103,11 @@ Thu Sep 14 05:52:48 2000 J understand why the e-mail address was supposed to be 'jh at axis.com' in the Changelog. :-) +Mon Aug 28 00:00:00 2000 Bruno Haible (haible at clisp.cons.org) + + * Makefile.sub: New target 'all', makes all prerequisites of + 'install'. + Thu Sep 7 06:17:42 2000 Jörgen Hägg (jh at axis.com) * version 2.0 @@ -34,6 +124,10 @@ Sun Jun 4 21:39:00 2000 Kaneda Hiroshi (vanitas at ma3.seikyou.ne.jp) * Fixing a lot of typos in groff_mm.man +Tue Mar 7 00:00:00 2000 OKAZAKI Tetsurou (okazaki at be.to) + + * Makefile.sub: Use $(INSTALL_SCRIPT) for script files. + Sun Jan 30 22:52:20 2000 Jörgen Hägg (jh at axis.com) * version 1.34 diff --git a/contrib/groff/contrib/mm/Makefile.sim b/contrib/groff/contrib/mm/Makefile.sim index e1d4a14..2c645be 100644 --- a/contrib/groff/contrib/mm/Makefile.sim +++ b/contrib/groff/contrib/mm/Makefile.sim @@ -1,5 +1,5 @@ # -# $Id: Makefile.sim,v 2.1 2000/11/17 04:26:02 jhaegg Exp $ +# $Id: Makefile.sim,v 2.3 2002/05/22 06:26:12 jhaegg Exp $ # # To install mgm separately as gm.tmac: # make -f Makefile.sub tmacdir=/usr/local/lib/groff/tmac srcdir=. \ @@ -21,8 +21,8 @@ install = install -m 644 # Do not change anything below this line srcdir = . -version = 1.32 -mdate = 1999-09-03 +version = 2.8 +mdate = 2002-05-11 .SUFFIXES: .n .man @@ -33,9 +33,9 @@ install: groff_mm.n groff_mmse.n $(MAKE) -f Makefile.sub tmacdir=$(tmacdir) srcdir=$(srcdir) \ INSTALL_DATA='$(install)' tmac_m=$(tmac_m) install - uninstall: groff_mm.n groff_mmse.n - $(MAKE) -f Makefile.sub tmacdir=$(tmacdir) srcdir=$(srcdir) \ - INSTALL_DATA='$(install)' tmac_m=$(tmac_m) uninstall_sub +uninstall: groff_mm.n groff_mmse.n + $(MAKE) -f Makefile.sub tmacdir=$(tmacdir) srcdir=$(srcdir) \ + INSTALL_DATA='$(install)' tmac_m=$(tmac_m) uninstall_sub .man.n: diff --git a/contrib/groff/contrib/mm/Makefile.sub b/contrib/groff/contrib/mm/Makefile.sub index 87cf050..40b7707 100644 --- a/contrib/groff/contrib/mm/Makefile.sub +++ b/contrib/groff/contrib/mm/Makefile.sub @@ -1,14 +1,15 @@ # -# $Id: Makefile.sub,v 2.1 2000/11/17 04:26:02 jhaegg Exp $ +# $Id: Makefile.sub,v 2.3 2002/05/22 06:26:12 jhaegg Exp $ # PROG=mmroff +MAN1=\ + mmroff.n MAN7=\ groff_mm.n \ - groff_mmse.n \ - mmroff.n + groff_mmse.n FILES=0.MT 5.MT 4.MT ms.cov se_ms.cov # Local configuration files with default values. -LOCALE = locale se_locale +LOCALE=locale se_locale CLEANADD=temp all: mmroff @@ -32,7 +33,12 @@ install_m: $(INSTALL_DATA) $(srcdir)/m.tmac $(tmacdir)/$(tmac_m_prefix)m.tmac @sed -e "s;^.mso m.tmac;.mso $(tmac_m_prefix)m.tmac;g" \ $(srcdir)/mse.tmac > $(tmacdir)/$(tmac_m_prefix)mse.tmac -install_mmroff : mmroff + @sed -e "s;^.mso mse.tmac;.mso $(tmac_m_prefix)mse.tmac;g" \ + $(srcdir)/mmse.tmac > $(tmacdir)/$(tmac_m_prefix)mmse.tmac + @sed -e "s;^.mso m.tmac;.mso $(tmac_m_prefix)m.tmac;g" \ + $(srcdir)/mm.tmac > $(tmacdir)/$(tmac_m_prefix)mm.tmac + +install_mmroff: mmroff -test -d $(bindir) || $(mkinstalldirs) $(bindir) -rm -f $(bindir)/mmroff $(INSTALL_SCRIPT) mmroff $(bindir)/mmroff @@ -42,7 +48,6 @@ mmroff: mmroff.pl -sed -e 's;/usr/bin/perl;$(PERLPATH);' $(srcdir)/mmroff.pl >$@ -chmod +x $@ - uninstall_sub: -for f in $(FILES); do rm -f $(tmacdir)/mm/$$f; done -for f in $(LOCALE); do \ @@ -50,6 +55,8 @@ uninstall_sub: done -rm -f $(tmacdir)/tmac.$(tmac_m_prefix)m -rm -f $(tmacdir)/$(tmac_m_prefix)m.tmac + -rm -f $(tmacdir)/$(tmac_m_prefix)mm.tmac -rm -f $(tmacdir)/$(tmac_m_prefix)mse.tmac + -rm -f $(tmacdir)/$(tmac_m_prefix)mmse.tmac -rmdir $(tmacdir)/mm -rm -f $(bindir)/mmroff diff --git a/contrib/groff/contrib/mm/README b/contrib/groff/contrib/mm/README index 15901dd..f52f3eb 100644 --- a/contrib/groff/contrib/mm/README +++ b/contrib/groff/contrib/mm/README @@ -1,5 +1,5 @@ -$Id: README,v 2.1 2000/11/17 04:27:03 jhaegg Exp $ +$Id: README,v 2.2 2002/05/22 06:26:12 jhaegg Exp $ This is mgm, a macro package for groff. @@ -29,9 +29,3 @@ This README should be bigger :-) Thanks to everyone who have sent me bug-reports and fixes. -Yes, my version numbering differs from the groff CVS, but I -like mine better. :-) - -More likely, I'm too lazy to change it, but someday I'll -try to sync them... -The step to 2.0 is an attempt, let's see if it works. diff --git a/contrib/groff/contrib/mm/groff_mm.man b/contrib/groff/contrib/mm/groff_mm.man index 9efecdc..2bb9e10 100644 --- a/contrib/groff/contrib/mm/groff_mm.man +++ b/contrib/groff/contrib/mm/groff_mm.man @@ -1,14 +1,14 @@ .\" -.\" $Id: groff_mm.man,v 2.2 2001/06/27 12:47:16 wlemb Exp $ +.\" $Id: groff_mm.man,v 2.8 2002/05/30 05:39:54 jhaegg Exp $ .\" .de T2 -.ne 2v +.if t .ne 2v .ti -.5i \\$1 .sp -1 .. .de T3 -.ne 2v +.if t .ne 2v .ti -.5i \fB\\$1\fP .br @@ -33,18 +33,21 @@ with the following limitations: no Bell Labs localisms implemented. .TP .B \(bu -the macros OK and PM is not implemented. +the macros OK and PM are not implemented. .TP .B \(bu groff mm does not support cut marks .LP -\fBm@TMAC_M_PREFIX@m\fP is intended to be international. Therefore it is +\fBm@TMAC_M_PREFIX@m\fP is intended to be international. +Therefore it is possible to write short national macrofiles which change all -english text to the preferred language. Use \fBm@TMAC_M_PREFIX@mse\fP as an example. +english text to the preferred language. +Use \fBm@TMAC_M_PREFIX@mse\fP as an example. .\"######################################################################## .LP A file called \fBlocale\fP or \fIlang\fP\fB_locale\fP is read -after the initiation of the global variables. It is therefore +after the initiation of the global variables. +It is therefore possible to localize the macros with companyname and so on. .sp In this manual square brackets is used to show optional arguments. @@ -59,7 +62,8 @@ A number register is assigned with the \fBnr\fP command: \fBXXX\fP is the name of the register, \fBn\fP is the value to be assigned, and \fBi\fP is increment value for auto-increment. \fBn\fP can have a plus or minus sign as prefix if an increment -or decrement of the current value is wanted. (Auto-increment or decrement +or decrement of the current value is wanted. +(Auto-increment or decrement occurs if the number register is used with a plus or minus sign, \fB\en+[XXX]\fP or \fB\en-[XXX]\fP.) .sp @@ -69,7 +73,8 @@ Strings is defined with \fBds\fP. .br The string is assigned everything to the end of the line, even blanks. Initial blanks in \fIstring\fP should be prefixed with -a double-quote. (Strings are used in the text as \fB\e*[YYY]\fP.) +a double-quote. +(Strings are used in the text as \fB\e*[YYY]\fP.) .sp \fBSpecial formatting of number registers\fP .br @@ -103,16 +108,22 @@ Set the format with \fBaf\fP: .B ")E level text" Adds \fBtext\fP (heading-text) to the table of contents with \fBlevel\fP either 0 -or between 1-7. See also \fB.H\fP. This macro is used for customized +or between 1-7. +See also \fB.H\fP. +This macro is used for customized table of contents. .TP .B "1C [1]" -Begin one column processing. An \fB1\fP as argument disables the page-break. +Begin one column processing. +An \fB1\fP as argument disables the page-break. Use wide footnotes, small footnotes may be overprinted. .TP .B 2C -Begin two column processing. Splits the page in two columns. It is -a special case of \fBMC\fP. See also \fB1C\fP. +Begin two column processing. +Splits the page in two columns. +It is +a special case of \fBMC\fP. +See also \fB1C\fP. .TP .B AE Abstract end, see \fBAS\fP. @@ -121,7 +132,8 @@ Abstract end, see \fBAS\fP. Authors firm, should be called before \fBAU\fP, see also \fBCOVER\fP. .TP .B "AL [type [text-indent [1]]]" -Start autoincrement list. Items are numbered beginning on one. +Start autoincrement list. +Items are numbered beginning on one. The \fItype\fP argument controls the type of numbers. .in +.5i .T2 Arg @@ -142,12 +154,16 @@ A third argument will prohibit printing of a blank line before each item. .TP .B "APP name text" -Begin an appendix with name \fIname\fP. Automatic naming occurs if -\fIname\fP is "". The appendixes starts with \fBA\fP if auto is used. +Begin an appendix with name \fIname\fP. +Automatic naming occurs if +\fIname\fP is "". +The appendixes starts with \fBA\fP if auto is used. An new page is ejected, and a header is also produced if the number -variable \fBAph\fP is non-zero. This is the default. +variable \fBAph\fP is non-zero. +This is the default. The appendix always appear in the 'List of contents' with correct -pagenumber. The name \fIAPPENDIX\fP can be changed by setting +pagenumber. +The name \fIAPPENDIX\fP can be changed by setting the string \fBApp\fP to the desired text. The string \fBApptxt\fP contains the current appendix text. .TP @@ -157,7 +173,8 @@ This is used when diagrams or other non-formatted documents are included as appendixes. .TP .B "AS [arg [indent]]" -Abstract start. Indent is specified in 'ens', but scaling is allowed. +Abstract start. +Indent is specified in 'ens', but scaling is allowed. Argument \fIarg\fP controls where the abstract is printed. .in +.5i .T2 Arg @@ -177,27 +194,31 @@ The \fIindent\fP controls the indentation of both margins, otherwise will normal text indent be used. .TP .B "AST [title]" -Abstract title. Default is \fBABSTRACT\fP. +Abstract title. +Default is \fBABSTRACT\fP. Sets the text above the abstract text. .TP .B "AT title1 [title2 ...]" -Authors title. \fBAT\fP must appear just after each \fBAU\fP. +Authors title. +\fBAT\fP must appear just after each \fBAU\fP. The title will show up after the name in the signature block. .TP .B "AU [name [initials [loc [dept [ext [room [arg [arg [arg]]]]]]]]]" Author information, specifies the author of the memo or paper, and will be printed on the cover sheet and on other similar places. -\fBAU\fP must not appear before \fBTL\fP. The author information +\fBAU\fP must not appear before \fBTL\fP. +The author information can contain initials, location, department, telephone extension, room number or name and up to three extra arguments. .TP .B "AV [name [1]]" Approval signature, generates an approval line with place for -signature and date. The string \fBAPPROVED:\fP can be changed +signature and date. +The string \fBAPPROVED:\fP can be changed with variable \fBLetapp\fP, and the string \fBDate\fP in \fBLetdate\fP. .TP .B "AVL [name]" -Letter signature, generates a line with place for signature. +Letter signature, generates a line with place for signature. .TP .B "B [bold-text [prev-font-text [bold...]]]" Begin boldface. @@ -207,11 +228,13 @@ on will be printed in boldface. .TP .B B1 Begin box (as the ms macro). -Draws a box around the text. The text will be indented one character, +Draws a box around the text. +The text will be indented one character, and the right margin will be one character shorter. .TP .B B2 -End box. Finish the box started by \fBB1\fP. +End box. +Finish the box started by \fBB1\fP. .TP .B BE End bottom block, see \fBBS\fP. @@ -234,8 +257,10 @@ Bold-roman. No limit on the number of arguments. .TP .B BS -Bottom block start. Begins the definition of a text block which is -printed at the bottom of each page. Block ends with \fBBE\fP. +Bottom block start. +Begins the definition of a text block which is +printed at the bottom of each page. +Block ends with \fBBE\fP. .TP .B "BVL text-indent [mark-indent [1]]" Start of @@ -249,10 +274,12 @@ A third argument will prohibit printing of a blank line before each item. .TP .B "COVER [arg]" -\&\fBCOVER\fP begins a coversheet definition. It is important +\&\fBCOVER\fP begins a coversheet definition. +It is important that \fB.COVER\fP appears before any normal text. \&\fB.COVER\fP uses \fIarg\fP to build the filename -@TMAC_MDIR@/\fIarg\fP.cov. Therefore it is possible to create unlimited +@TMAC_MDIR@/\fIarg\fP.cov. +Therefore it is possible to create unlimited types of coversheets. \fIms.cov\fP is supposed to look like the \fBms\fP coversheet. \&\fB.COVER\fP requires a \fB.COVEND\fP at the end of the coverdefinition. @@ -274,13 +301,15 @@ This finish the cover description and prints the cover-page. It is defined in the cover file. .TP .B DE -Display end. Ends a block of text, display, that begins +Display end. +Ends a block of text, display, that begins with \fBDS\fP or \fBDF\fP. .TP .B "DF [format [fill [rindent]]]" -Begin floating display (no nesting allowed). +Begin floating display (no nesting allowed). A floating display is saved in a queue and is printed in the -order entered. \fIFormat\fP, \fIfill\fP and \fIrindent\fP is the same +order entered. +\fIFormat\fP, \fIfill\fP and \fIrindent\fP is the same as in \fBDS\fP. Floating displays are controlled by the two number registers \fBDe\fP and \fBDf\fP. @@ -313,18 +342,22 @@ Print as many displays that will fit in a new page or column. A page break will occur between each display if \fBDe\fP is not zero. .T2 5 Fill the current page with displays and the rest beginning at a new page -or column. (This is the default.) +or column. +(This is the default.) A page break will occur between each display if \fBDe\fP is not zero. .in .TP .B "DL [text-indent [1 [1]]]" -Dash list start. Begins a list where each item is printed -after a dash. \fIText-indent\fP changes the default indentation +Dash list start. +Begins a list where each item is printed +after a dash. +\fIText-indent\fP changes the default indentation of the list items set by number register \fBPi\fP. A second argument prevents the empty line between each list item -to be printed. See \fBLI\fP. +to be printed. +See \fBLI\fP. A third argument will prohibit printing of a blank line before each item. .TP @@ -357,7 +390,8 @@ Right adjust the whole display as a block .in .sp L, I, C and CB can also be specified as 0, 1, 2 or 3 for compatibility -reasons. (Don't use it. :-) +reasons. +(Don't use it.\ :-) .sp \fBfill\fP .in +.5i @@ -373,12 +407,14 @@ Line-filling turned on. .sp N and F can also be specified as 0 or 1. An empty line will normally be printed before and after the -display. Setting number register \fBDs\fP to 0 will prevent this. +display. +Setting number register \fBDs\fP to 0 will prevent this. \fIRindent\fP shortens the line length by that amount. .TP .B "EC [title [override [flag [refname]]]]" Equation title. -Sets a title for an equation. The \fIoverride\fP argument +Sets a title for an equation. +The \fIoverride\fP argument change the numbering. .sp \fBflag\fP @@ -422,10 +458,13 @@ on even pages, see \fBPH\fP. Equation end, see \fBEQ\fP. .TP .B EOP -End of page user-defined macro. This macro will be called -instead of the normal printing of the footer. The macro +End of page user-defined macro. +This macro will be called +instead of the normal printing of the footer. +The macro will be executed in a separate environment, without any -trap active. See \fBTP\fP. +trap active. +See \fBTP\fP. .sp \fBStrings available to EOP\fP .in +.5i @@ -437,12 +476,13 @@ Argument from \fBEF\fP. Argument from \fBOF\fP. .in .TP -.B "EPIC width height [name]" +.B "EPIC [-L] width height [name]" \fBEPIC\fP draws a box with the given \fIwidth\fP and \fIheight\fP, it will also print the text \fIname\fP or a default string if \fIname\fP is not specified.. This is used to include external pictures, just give the size of the picture. +\fB-L\fP will leftadjust the picture, the default is to center adjust. See \fBPIC\fP .TP .B "EQ [label]" @@ -451,7 +491,8 @@ Equation start. \fBEQ\fP/\fBEN\fP must be inside a \fBDS\fP/\fBDE\fP-pair, except when \fBEQ\fP is only used to set options in \fBeqn\fP. The \fIlabel\fP will appear at the right margin of the equation, unless -number register \fBEq\fP is 1. Then the label will appear at the +number register \fBEq\fP is\ 1. +Then the label will appear at the left margin. .TP .B "EX [title [override [flag [refname]]]]" @@ -472,16 +513,18 @@ affected by the format of \fBDS\fP. .TP .B "FC [closing]" Prints \fIYours\ very\ truly,\fP as a formal closing of a letter or -memorandum. The argument replaces the defualt string. +memorandum. +The argument replaces the defualt string. The default is stored in string variable \fBLetfc\fP. .TP .B "FD [arg [1]]" Footnote default format. Controls the hyphenation (hyphen), right margin justification (adjust), -indentation of footnote text (indent). It can also change the label +indentation of footnote text (indent). +It can also change the label justification (ljust). .sp -.ne 14v +.if t .ne 14v .nf .ta .5i +.8i +.8i +.8i +.8i \fBarg hyphen adjust indent ljust\fP @@ -524,9 +567,11 @@ affected by the format of \fBDS\fP. .TP .B "FS [label]" Footnote start. -The footnote is ended by \fBFE\fP. Footnotes is normally automatically +The footnote is ended by \fBFE\fP. +Footnotes is normally automatically numbered, the number is available in string \fBF\fP. -Just add \fB\e*F\fP in the text. By adding \fIlabel\fP, it is possible +Just add \fB\e*F\fP in the text. +By adding \fIlabel\fP, it is possible to have other number or names on the footnotes. Footnotes in displays is now possible. An empty line separates footnotes, the height of the line @@ -534,13 +579,17 @@ is controlled by number register \fBFs\fP, default value is 1. .TP .B "GETHN refname [varname]" Includes the headernumber where the corresponding \fBSETR\fP \fIrefname\fP -was placed. Will be X.X.X. in pass 1. See \fBINITR\fP. +was placed. +Will be X.X.X. in pass\ 1. +See \fBINITR\fP. If \fIvarname\fP is used, \fBGETHN\fP sets the stringvariable \fIvarname\fP to the headernumber. .TP .B "GETPN refname [varname]" Includes the pagenumber where the corresponding \fBSETR\fP \fIrefname\fP -was placed. Will be 9999 in pass 1. See \fBINITR\fP. +was placed. +Will be 9999 in pass\ 1. +See \fBINITR\fP. If \fIvarname\fP is used, \fBGETPN\fP sets the stringvariable \fIvarname\fP to the pagenumber. .TP @@ -558,17 +607,22 @@ and contains the page and headernumber. Includes the string saved with the second argument to \fB.SETR\fP. Will be dummystring in pass 1. If varname is used, \fBGETST\fP sets the stringvariable \fIvarname\fP to the -saved string. See \fBINITR\fP. +saved string. +See \fBINITR\fP. .TP .B "H level [heading-text [heading-suffix]]" Numbered section heading. Section headers can have a level between 1 and 7, level 1 is the -top level. The text is given in \fIheading-text\fP, and must be +top level. +The text is given in \fIheading-text\fP, and must be surrounded by double quotes if it contains spaces. \fBHeading-suffix\fP is added to the header in the text but not in -the table of contents. This is normally used for footnote marks -and similar things. Don't use \fB\e*F\fP in \fIheading-suffix\fP, it won't -work. A manual label must be used, see \fBFS\fP. +the table of contents. +This is normally used for footnote marks +and similar things. +Don't use \fB\e*F\fP in \fIheading-suffix\fP, it won't +work. +A manual label must be used, see \fBFS\fP. .sp An eventual paragraph, \fBP\fP, directly after \fBH\fP will be ignored, \fBH\fP is taking care of spacing and indentation. @@ -577,7 +631,8 @@ ignored, \fBH\fP is taking care of spacing and indentation. .br Number register \fBEj\fP controls page ejection before the heading. Normally, a level one heading gets two blank lines before it, higher levels -gets only one. A new page is ejected before each +gets only one. +A new page is ejected before each first-level heading if number register \fBEj\fP is 1. All levels below or equal the value of \fBEj\fP gets a new page. Default value for \fBEj\fP is 0. @@ -622,9 +677,12 @@ is centerered. \fBFont control of the heading\fP .br The font of each heading level is controlled by string \fBHF\fP. -It contains a fontnumber or fontname for each level. Default +It contains a fontnumber or fontname for each level. +Default is \fB2\ 2\ 2\ 2\ 2\ 2\ 2\fP (all headings in italic). Could also be written as \fBI\ I\ I\ I\ I\ I\ I\fP. +Note that some other implementations use \fB3\ 3\ 2\ 2\ 2\ 2\ 2\fP as the +default value. All omitted values are presumed to be a 1. .sp \fBPoint size control\fP. @@ -632,7 +690,8 @@ All omitted values are presumed to be a 1. String \fBHP\fP controls the pointsize of each heading, in the same way as \fBHF\fP controls the font. A value of 0 selects the default point size. -Default value is \fB0\ 0\ 0\ 0\ 0\ 0\ 0\fP. Beware that only the +Default value is \fB0\ 0\ 0\ 0\ 0\ 0\ 0\fP. +Beware that only the point size changes, not the vertical size. That can be controlled by the user specified macro \fBHX\fP and/or \fBHZ\fP. @@ -643,14 +702,17 @@ Seven number registers, named \fBH1\fP thru \fBH7\fP contains the counter for each heading level. The values are printed using arabic numerals, this can be changed with the macro \fBHM\fP (see below). -All marks are concatenated before printing. To avoid this, set -number register \fBHt\fP to 1. That will only print the current +All marks are concatenated before printing. +To avoid this, set +number register \fBHt\fP to\ 1. +That will only print the current heading counter at each heading. .sp \fBAutomatic table of contents\fP .br All headings whose level is equal or below number register \fBCl\fP -is saved to be printed in the table of contents. Default value is 2. +is saved to be printed in the table of contents. +Default value is\ 2. .sp \fBSpecial control of the heading, user-defined macros\fP. .br @@ -677,8 +739,10 @@ Contains the position of the text after the heading. means that a line break should occur before the text and 2 means that a blank line should separate the heading and the text. .T3 "string }2" -Contains two spaces if register \fB;0\fP is 0. It is used to -separate the heading from the text. The string +Contains two spaces if register \fB;0\fP is\ 0. +It is used to +separate the heading from the text. +The string is empty if \fB;0\fP is non-zero. .T3 "register ;3" Contains the needed space in units after the heading. @@ -708,7 +772,7 @@ Hyphenation can be turned off by setting number register \fBHy\fP to 0 in the beginning of the file. .TP .B "HM [arg1 [arg2 [... [arg7]]]]" -Heading mark style. +Heading mark style. Controls the type of marking for printing of the heading counters. Default is 1 for all levels. .sp @@ -775,12 +839,14 @@ Ends the address-specification after \fPIA\fP. .TP .B "INITI type filename [macro]" Initialize the new index system, sets the filename to collect -index lines in with \fBIND\fP. Argument \fItype\fP selects +index lines in with \fBIND\fP. +Argument \fItype\fP selects the type of index, page number, header marks or both. The default is \fIN\fP. It is also possible to create a macro that is responsible -for formatting each row. Add the name of the macro as argument 3. +for formatting each row. +Add the name of the macro as argument\ 3. The macro will be called with the index as argument(s). .sp \fBtype\fP @@ -794,12 +860,17 @@ Both page numbers and header marks, tab separated .in .TP .B "INITR filename" -Initialize the refencemacros. References will be written to -\fIfilename.tmp\fP and \fIfilename.qrf\fP. Requires two passes with groff. -The first looks for references and the second includes them. +Initialize the refencemacros. +References will be written to stderr and is supposed to +be written to \fIfilename.qrf\fP. +Requires two passes with groff, this is handled by a +separate program called \fBmmroff\fP, the reason is that +groff is often installed without the unsafe operations that +\fBINITR\fP requiered. +The first pass looks for references and the second one includes them. \fBINITR\fP can be used several times, but it is only the first occurrence of \fBINITR\fP that is active. -Option \fB-U\fP might be needed if \fBunsafe\fP-errors occur. + See also \fBSETR\fP, \fBGETPN\fP and \fBGETHN\fP. .TP .B "IND arg1 [arg2 [...]]" @@ -823,17 +894,21 @@ by string variable \fBIndcmd\fP, normally \fIsort\ -t\et\fP. \fBINDP\fP reads the output from the command to form the index, normally in two columns (can be changed by defining \fBTYIND\fP). The index is printed with string variable \fBIndex\fP as header, -default is \fBINDEX\fP. One-column processing is -returned after the list. \fBINDP\fP will call the +default is \fBINDEX\fP. +One-column processing is +returned after the list. +\fBINDP\fP will call the user-defined macros \fBTXIND\fP, \fBTYIND\fP and \fBTZIND\fP if defined. \fBTXIND\fP is called before printing \fBINDEX\fP, \fBTYIND\fP -is called instead of printing \fBINDEX\fP. \fBTZIND\fP is called +is called instead of printing \fBINDEX\fP. +\fBTZIND\fP is called after the printing and should take care of restoring to normal operation again. .TP .B "ISODATE [0]" \fBISODATE\fP changes the predefined date string in \fBDT\fP to -ISO-format, ie YYYY-MM-DD. This can also be done by +ISO-format, ie YYYY-MM-DD. +This can also be done by adding \fB-rIso=1\fP on the command line. Reverts to old date format if argument is \fB0\fP. .TP @@ -850,8 +925,10 @@ current indent. .sp \fIPad\fP and \fImark-indent\fP controls where to put the mark. The mark is placed within the mark area, and \fImark-indent\fP -sets the number of spaces before this area. It is normally 0. -The mark area ends where the text begins. The start of the text +sets the number of spaces before this area. +It is normally\ 0. +The mark area ends where the text begins. +The start of the text is still controlled by \fItext-indent\fP. .sp The mark is left justified whitin the mark area if \fIpad\fP is 0. @@ -863,7 +940,8 @@ If \fItype\fP is 0 the list will have either a hanging indent or, if argument \fImark\fP is given, the string \fImark\fP as mark. .sp If \fItype\fP is greater than 0 automatic numbering will occur, arabic -if \fImark\fP is empty. \fIMark\fP can then be any of \fB1\fP, \fBA\fP, +if \fImark\fP is empty. +\fIMark\fP can then be any of \fB1\fP, \fBA\fP, \fBa\fP, \fBI\fP or \fBi\fP. .sp \fIType\fP selects one of six possible ways to display the mark. @@ -885,24 +963,30 @@ x) .in .sp Every item in the list will get \fILI-space\fP number of blank lines -before them. Default is 1. +before them. +Default is\ 1. .sp -\fBLB\fP itself will print \fILB-space\fP blank lines. Default is 0. +\fBLB\fP itself will print \fILB-space\fP blank lines. +Default is\ 0. .TP .B "LC [list-level]" List-status clear. Terminates all current active lists down to \fIlist-level\fP, or 0 -if no argmuent is given. This is used by \fBH\fP to clear any +if no argmuent is given. +This is used by \fBH\fP to clear any active list. .TP .B "LE [1]" List end. -Terminate the current list. \fBLE\fP outputs a blank line +Terminate the current list. +\fBLE\fP outputs a blank line if an argument is given. .TP .B "LI [mark [1]]" -List item precedes every item in a list. Without argument \fBLI\fP -will print the mark determined by the current list type. By giving +List item precedes every item in a list. +Without argument \fBLI\fP +will print the mark determined by the current list type. +By giving \fBLI\fP one argument, it will use that as the mark instead. Two arguments to \fBLI\fP will make \fImark\fP a prefix to the current mark. @@ -913,17 +997,21 @@ This behaviour can also be achieved by setting number register A zero length \fImark\fP will make a hanging indent instead. .sp -A blank line is normally printed before the list item. This behaviour -can be controlled by number register \fBLs\fP. Pre-spacing +A blank line is normally printed before the list item. +This behaviour +can be controlled by number register \fBLs\fP. +Pre-spacing will occur for each list-level less than or equal to \fBLs\fP. -Default value is 99. (Nesting of lists is unlimited. :-) +Default value is\ 99. +(Nesting of lists is unlimited.\ :-) .sp The indentation can be changed thru number register \fBLi\fP. Default is 6. .sp All lists begins with a list initialization macro, \fBLB\fP. There are, however, seven predefined listtypes to -make lists easier to use. They all call \fBLB\fP with different +make lists easier to use. +They all call \fBLB\fP with different default values. .in +.5i .T2 \fBAL\fP @@ -941,7 +1029,8 @@ Reference List .T2 \fBBVL\fP Broken Varable List. .in -These lists are described at other places in this manual. See also \fBLB\fP. +These lists are described at other places in this manual. +See also \fBLB\fP. .TP .B "LT [arg]" Formats a letter in one of four different styles depending @@ -951,15 +1040,21 @@ See also \fBINTERNALS\fP. .T2 \fBArg Style\fP .T2 BL -Blocked. Date line, return address, writer's address and closing -begins at the center of the line. All other lines begin at the left margin. +Blocked. +Date line, return address, writer's address and closing +begins at the center of the line. +All other lines begin at the left margin. .T2 SB -Semi-blocked. Same as blocked, except that the first line in every +Semi-blocked. +Same as blocked, except that the first line in every paragraph is indented five spaces. .T2 FB -Full-blocked. All lines begin at the left margin. +Full-blocked. +All lines begin at the left margin. .T2 SP -Simplified. Almost the same as the full-blocked style. Subject and +Simplified. +Almost the same as the full-blocked style. +Subject and the writer's identification are printed in all-capital. .in .TP @@ -968,37 +1063,47 @@ Specify options in letter (see \fB.LT\fP). This is a list of the standard options: .in +.5i .T2 CN -Confidential notation. Prints \fBCONFIDENTIAL\fP on the second line -below the date line. Any argument replaces \fBCONFIDENTIAL\fP. +Confidential notation. +Prints \fBCONFIDENTIAL\fP on the second line +below the date line. +Any argument replaces \fBCONFIDENTIAL\fP. See also string variable \fBLetCN\fP. .T2 RN -Reference notation. Prints \fBIn reference to:\fP and the argument +Reference notation. +Prints \fBIn reference to:\fP and the argument two lines below the date line. See also string variable \fBLetRN\fP. .T2 AT -Attention. Prints \fBATTENTION:\fP and the argument below the inside address. +Attention. +Prints \fBATTENTION:\fP and the argument below the inside address. See also string variable \fBLetAT\fP. .T2 SA -Salutation. Prints \fBTo Whom It May Concern:\fP or the argument if -it was present. The salutation is printed two lines below the inside address. +Salutation. +Prints \fBTo Whom It May Concern:\fP or the argument if +it was present. +The salutation is printed two lines below the inside address. See also string variable \fBLetSA\fP. .T2 SJ -Subject line. Prints the argument as subject prefixed with \fBSUBJECT:\fP +Subject line. +Prints the argument as subject prefixed with \fBSUBJECT:\fP two lines below the inside address, except in letter type \fBSP\fP. Then the subject is printed in all-captial without any prefix. See also string variable \fBLetSJ\fP. .in .TP .B "MC column-size [column-separation] " -Begin multiple columns. Return to normal with \fB1C\fP. +Begin multiple columns. +Return to normal with \fB1C\fP. \fBMC\fP will create as many columns as the current line length permits. \fIColumn-size\fP is the width of each column, and \fIcolumn-separation\fP -is the space between two columns. Default separation is the +is the space between two columns. +Default separation is the column-size/15. See also \fB1C\fP. .TP .B "ML mark [text-indent [1]]" -Marked list start. The \fImark\fP argument will be printed before +Marked list start. +The \fImark\fP argument will be printed before each list item. \fIText-indent\fP sets the indent and overrides \fBLi\fP. A third argument will prohibit printing of a blank line before each @@ -1034,30 +1139,37 @@ current and new pageoffset is used. Use \fBPGFORM\fP without arguments to return to normal. .TP .B "MULB cw1 space1 [cw2 space2 [cw3 ...]]" -Begin a special multi-column mode. Every columns width must be specified. -Also the space between the columns must be specified. The last column -does not need any space-definition. \fBMULB\fP starts a diversion and \fBMULE\fP +Begin a special multi-column mode. +Every columns width must be specified. +Also the space between the columns must be specified. +The last column +does not need any space-definition. +\fBMULB\fP starts a diversion and \fBMULE\fP ends the diversion and prints the columns. The unit for width and space is 'n', but \fBMULB\fP accepts all normal unitspecifications like 'c' and 'i'. \fBMULB\fP operates in a separate environment. .TP .B "MULN" -Begin the next column. This is the only way to switch column. +Begin the next column. +This is the only way to switch column. .TP .B "MULE" End the multi-column mode and print the columns. .TP .B "nP [type]" -Print numbered paragraph with header level two. See \fB.P\fP. +Print numbered paragraph with header level two. +See \fB.P\fP. .TP .B "NCOL" Force printing to the next column, don't use this together with the \fBMUL*\fP macros, see \fB2C\fP. .TP .B "NS [arg [1]]" -Prints different types of notations. The argument selects between -the predefined type of notations. If the second argument is available, +Prints different types of notations. +The argument selects between +the predefined type of notations. +If the second argument is available, then the argument becomes the entire notation. If the argument doesn't exist in the predefined, it will be printed as \fBCopy (\fP\fIarg\fP\fB) to\fP. @@ -1103,7 +1215,9 @@ CC .fi .TP .B "ND new-date" -New date. Override the current date. Date is not +New date. +Override the current date. +Date is not printed if \fInew-date\fP is an empty string. .TP .B "OF [arg]" @@ -1116,19 +1230,23 @@ See \fBEH\fP and \fBPH\fP. .TP .B OP Make sure that the following text is printed at the top -of an odd-numbered page. Will not output an empty page +of an odd-numbered page. +Will not output an empty page if currently at the top of an odd page. .TP .B "P [type]" Begin new paragraph. \fBP\fP without argument will produce left justified text, even -the first line of the paragraph. This is the same as setting -\fItype\fP to 0. If the argument is 1, then the first line +the first line of the paragraph. +This is the same as setting +\fItype\fP to 0. +If the argument is\ 1, then the first line of text following \fBP\fP will be indented by the number of spaces in number register \fBPi\fP, normally 5. .sp Instead of giving 1 as argument to \fBP\fP it is possible to set the -paragraph type in number register \fBPt\fP. Using 0 and 1 +paragraph type in number register \fBPt\fP. +Using 0 and\ 1 will be the same as adding that value to \fBP\fP. A value of 2 will indent all paragraphs, except after headings, lists and displays. @@ -1143,15 +1261,17 @@ and other. It is normally the first command in a file, though it's not necessary. \fBPGFORM\fP can be used without arguments to reset everything after a \fBMOVE\fP. -A line-break is done unless the fourth argument is given. +A line-break is done unless the fourth argument is given. This can be used to avoid the pagenumber on the first page while setting new width and length. (It seems as if this macro sometimes doesn't work too well. Use the command line arguments -to change linelength, pagelength and pageoffset instead. Sorry.) +to change linelength, pagelength and pageoffset instead. +Sorry.) .TP .B PGNH -No header is printed on the next page. Used to get rid of +No header is printed on the next page. +Used to get rid of the header in letters or other special texts. This macro must be used before any text to inhibit the pageheader on the first page. @@ -1160,7 +1280,8 @@ on the first page. \fBPIC\fP includes a Postscript file in the document. The macro depends on \fBmmroff\fP and \fBINITR\fP. \fB-L\fP, \fB-C\fP, \fB-R\fP and \fB-I n\fP adjusts the picture -or indents it. The optionally \fIwidth\fP and \fIheight\fP +or indents it. +The optionally \fIwidth\fP and \fIheight\fP can also be given to resize the picture. .TP .B PE @@ -1170,18 +1291,22 @@ Ends a picture for \fB@TMAC_M_PREFIX@pic\fP, see the manual for \fB@TMAC_M_PREFI .B "PF [arg]" Page footer. \fBPF\fP sets the line to be printed at the bottom of each page. -Normally empty. See \fBPH\fP for the argument specification. +Normally empty. +See \fBPH\fP for the argument specification. .TP .B "PH [arg]" Page header, a line printed at the top of each page. The argument should be specified as "'left-part'center-part'right-part'", where left-, center- and right-part is printed left-justified, centered -and right justified. The character \fB%\fP is changed to the current -page number. The default page-header is "''- % -''", the page +and right justified. +The character \fB%\fP is changed to the current +page number. +The default page-header is "''- % -''", the page number between two dashes. .TP .B PS -Picture start (from pic). Begins a picture for \fB@g@pic\fP, see +Picture start (from pic). +Begins a picture for \fB@g@pic\fP, see the manual. .TP .B PX @@ -1202,13 +1327,17 @@ See \fBI\fP. Read from standard input to diversion and/or string. The text will be saved in a diversion named \fIdiversion\fP. Recall the text by writing the name of the diversion after a dot -on an empty line. A string will also be defined if -\fIstring\fP is given. \fIDiversion\fP and/or \fIprompt\fP can +on an empty line. +A string will also be defined if +\fIstring\fP is given. +\fIDiversion\fP and/or \fIprompt\fP can be empty (""). .TP .B RF -Reference end. Ends a reference definition and returns to normal -processing. See \fBRS\fP. +Reference end. +Ends a reference definition and returns to normal +processing. +See \fBRS\fP. .TP .B "RI [roman-text [italic-text [roman-text [...]]]]" Even arguments are printed in roman, odd in italic. @@ -1224,8 +1353,10 @@ square brackets. .B "RP [arg1 [arg2]]" Produce reference page. \fBRP\fP can be used if a reference page is wanted somewhere in the -document. It is not needed if \fBTC\fP is used to produce -a table of content. The reference page will then be printed automatically. +document. +It is not needed if \fBTC\fP is used to produce +a table of content. +The reference page will then be printed automatically. .sp The reference counter will not be reset if \fIarg1\fP is 1. .sp @@ -1254,7 +1385,8 @@ is normally set to \fIREFERENCES\fP. \fBRS\fP begins an automatically numbered reference definition. Put the string \fB\e*(Rf\fP where the reference mark should be and write the reference between \fBRS\fP/\fBRF\fP -at next new line after the reference mark. The reference number +at next new line after the reference mark. +The reference number is stored in number register \fB:R\fP. If \fIstring-name\fP is given, a string with that name will be defined and contain the current reference mark. @@ -1262,8 +1394,10 @@ The string can be referenced as \fB\e*[\fIstring-name\fP]\fP later in the text. .TP .B "S [size [spacing]]" -Set point size and vertical spacing. If any argument is equal 'P', then -the previous value is used. A 'C' means current value, and 'D' default value. +Set point size and vertical spacing. +If any argument is equal 'P', then +the previous value is used. +A 'C' means current value, and 'D' default value. If '+' or '-' is used before the value, then increment or decrement of the current value will be done. .TP @@ -1275,14 +1409,17 @@ justification. .TP .B "SETR refname [string]" Remember the current header and page-number as \fIrefname\fP. -Saves \fIstring\fP if \fIstring\fP is defined. \fIstring\fP is retrieved +Saves \fIstring\fP if \fIstring\fP is defined. +\fIstring\fP is retrieved with \fB.GETST\fP. See \fBINITR\fP. .TP .B "SG [arg [1]]" -Signature line. Prints the authors name(s) after the formal closing. +Signature line. +Prints the authors name(s) after the formal closing. The argument will be appended to the reference data, printed -at either the first or last author. The reference data is the location, +at either the first or last author. +The reference data is the location, department and initials specified with \fB.AU\fP. It will be printed at the first author if the second argument is given, otherwise at the last. @@ -1299,18 +1436,24 @@ Otherwise it will skip \fIpages\fP pages. .B "SM string1 [string2 [string3]]" Make a string smaller. If \fIstring2\fP is given, \fIstring1\fP will be smaller and \fIstring2\fP -normal, concatenated with \fIstring1\fP. With three argument, all is +normal, concatenated with \fIstring1\fP. +With three argument, all is concatenated, but only \fIstring2\fP is made smaller. .TP .B "SP [lines]" -Space vertically. \fIlines\fP can have any scalingfactor, like \fI3i\fP or -\fI8v\fP. Several \fBSP\fP in a line will only produce the -maximum number of lines, not the sum. \fBSP\fP will also be ignored -until the first textline in a page. Add a \fB\e&\fP before \fBSP\fP +Space vertically. +\fIlines\fP can have any scalingfactor, like \fI3i\fP or +\fI8v\fP. +Several \fBSP\fP in a line will only produce the +maximum number of lines, not the sum. +\fBSP\fP will also be ignored +until the first textline in a page. +Add a \fB\e&\fP before \fBSP\fP to avoid this. .TP .B TAB -reset tabs to every 5n. Normally used to reset any previous tabpositions. +reset tabs to every\ 5n. +Normally used to reset any previous tabpositions. .TP .B "TB [title [override [flag [refname]]]]" Table title, arguments are the same as for \fBEC\fP. @@ -1330,13 +1473,15 @@ affected by the format of \fBDS\fP. Table of contents. This macro is normally used at the last line of the document. It generates a table of contents with headings up to the level -controlled by number register \fBCl\fP. Note that \fBCl\fP controls +controlled by number register \fBCl\fP. +Note that \fBCl\fP controls the saving of headings, it has nothing to do with \fBTC\fP. Headings with level less than or equal to \fIslevel\fP will get \fIspacing\fP number of lines before them. Headings with level less than or equal to \fItlevel\fP will have their page numbers right justified with dots or spaces separating -the text and the page number. Spaces is used if \fItab\fP +the text and the page number. +Spaces is used if \fItab\fP is greater than zero, otherwise dots. Other headings will have the page number directly at the end of the heading text (\fIragged right\fP). @@ -1345,7 +1490,8 @@ The rest of the arguments will be printed, centered, before the table of contents. .sp The user-defined macros \fBTX\fP and \fBTY\fP are used if \fBTC\fP is called -with at most four arguments. \fBTX\fP is called before the printing +with at most four arguments. +\fBTX\fP is called before the printing of \fICONTENTS\fP, and \fBTY\fP is called instead of printing \fICONTENTS\fP. .sp Equivalent macros can be defined for list of figures, tables, equations @@ -1363,11 +1509,14 @@ All texts can be redefined, new stringvariables These can be redefined to other languages. .TP .B TE -Table end. See \fBTS\fP. +Table end. +See \fBTS\fP. .TP .B "TH [N]" -Table header. See \fBTS\fP. -\fBTH\fP ends the header of the table. This header will +Table header. +See \fBTS\fP. +\fBTH\fP ends the header of the table. +This header will be printed again if a page-break occurs. Argument \fIN\fP isn't implemented yet. .TP @@ -1378,22 +1527,27 @@ All text up to the next \fBAU\fP is included in the title. for use in the front page processing. .TP .B TM [num1 [num2 [...]]] -Technical memorandumnumbers used in \fB.MT\fP. Unlimited number +Technical memorandumnumbers used in \fB.MT\fP. +Unlimited number of arguments may be given. .TP .B TP Top of page user-defined macro. -This macro is called instead of the normal page header. It is +This macro is called instead of the normal page header. +It is possible to get complete control over the header. Note that header and footer is printed in a separate environment. Linelength is preserved though. .TP .B "TS [H]" -Table start. This is the start of a table specification -to \fB@g@tbl\fP. See separate manual for \fB@g@tbl\fP. +Table start. +This is the start of a table specification +to \fB@g@tbl\fP. +See separate manual for \fB@g@tbl\fP. \fBTS\fP ends with \fBTE\fP. Argument \fIH\fP tells \fBm@TMAC_M_PREFIX@m\fP that the table -has a header. See \fBTH\fP. +has a header. +See \fBTH\fP. .TP .B TX Userdefined table of contents exit. @@ -1410,7 +1564,8 @@ Begin verbatim output using courier font. Usually for printing programs. All character has equal width. The pointsize can be changed with -the second argument. By specifying the font-argument +the second argument. +By specifying the font-argument it is possible to use another font instead of courier. \fIflag\fP controls several special features. It contains the sum of all wanted features. @@ -1418,19 +1573,24 @@ It contains the sum of all wanted features. .T2 Value Description .T2 1 -Disable the escape-character (\e). This is normally turned on during +Disable the escape-character (\e). +This is normally turned on during verbose output. .T2 2 Add an empty line before the verbose text. .T2 4 Add an empty line after the verbose text. .T2 8 -Print the verbose text with numbered lines. This adds four digitsized -spaces in the beginning of each line. Finer control is available with -the string-variable \fBVerbnm\fP. It contains all arguments to the +Print the verbose text with numbered lines. +This adds four digitsized +spaces in the beginning of each line. +Finer control is available with +the string-variable \fBVerbnm\fP. +It contains all arguments to the \fBtroff\fP-command \fB.nm\fP, normally '1'. .T2 16 -Indent the verbose text with five 'n':s. This is controlled by the +Indent the verbose text with five 'n':s. +This is controlled by the number-variable \fBVerbin\fP (in units). .in .TP @@ -1445,8 +1605,14 @@ the distance from the current indent to the mark. A third argument will prohibit printing of a blank line before each item. .TP -.B "VM [top [bottom]]" -Vertical margin. +.B "VM [-T] [top [bottom]]" +Vertical margin. Adds extra vertical top and margin space. +Option \fB-T\fP set the total space instead. +No argument resets the margin to zero or the default +\fI(7v 5v)\fP if \fB-T\fP +was used. It is higly recommended that macro \fBTP\fP and/or +\fBEOP\fP are defined +if using \fB-T\fP and setting top and/or bottom margin to less than the default. .TP .B "WA [writer-name [title]]" Begins specification of the writer and writer's address. @@ -1502,7 +1668,8 @@ Fontlist for headings, normally "2 2 2 2 2 2 2". Nonnumeric fontnames may also be used. .TP .B HP -Pointsize list for headings. Normally "0 0 0 0 0 0 0" which is the same as +Pointsize list for headings. +Normally "0 0 0 0 0 0 0" which is the same as "10 10 10 10 10 10 10". .TP .B Index @@ -1592,7 +1759,8 @@ Letns!to " to .TP .B Letnsdef Defines the standard-notation used when no argument is given -to \fB.NS\fP. Default is \fB0\fP. +to \fB.NS\fP. +Default is \fB0\fP. .TP .B "MO1 - MO12" Strings containing \fIJanuary\fP thru \fIDecember\fP. @@ -1641,15 +1809,17 @@ Contents level [0:7], contents saved if heading level <= Cl, default 2. Eject page between LIST OF XXXX if Cp == 0, default 0. .TP .B D -Debugflag, values >0 produces varying degree of debug. A value of 1 -gives information about the progress of formatting, default 0. +Debugflag, values >0 produces varying degree of debug. +A value of\ 1 +gives information about the progress of formatting, default\ 0. .TP .B De -Eject after floating display is output [0:1], default 0. +Eject after floating display is output [0:1], default\ 0. .TP .B Dsp Controls the space output before and after static displays -if defined. Otherwise is the value of Lsp used. +if defined. +Otherwise is the value of Lsp used. .TP .B Df Floating keep output [0:5], default 5. @@ -1661,7 +1831,8 @@ Floating keep output [0:5], default 5. Eject page, default 0. .TP .B Eq -Equation lable adjust 0=left, 1=right. Default 0. +Equation lable adjust 0=left, 1=right. +Default\ 0. .TP .B Fs Footnote spacing, default 1. @@ -1670,20 +1841,23 @@ Footnote spacing, default 1. Heading counters .TP .B H1dot -Append a dot after the level one heading number if > 0. Default is 1. +Append a dot after the level one heading number if >\ 0. +Default is\ 1. .TP .B H1h .TP Copy of number register \fBH1\fP, but it is incremented -just before the page break. Useful in user defined header macros. +just before the page break. +Useful in user defined header macros. .B Hb -Heading break level [0:7], default 2. +Heading break level [0:7], default\ 2. .TP .B Hc -Heading centering level, [0:7]. Default 0. +Heading centering level, [0:7]. +Default\ 0. .TP .B Hi -Heading temporary indent [0:2], default 1. +Heading temporary indent [0:2], default\ 1. .br 0\ ->\ 0 indent, left margin .br @@ -1692,26 +1866,31 @@ Heading temporary indent [0:2], default 1. 2\ ->\ indent to line up with text part of preceding heading .TP .B Hps -Numbervariable with the heading pre-space level. If the heading-level +Numbervariable with the heading pre-space level. +If the heading-level is less than or equal to \fBHps\fP, then two lines will precede the -section heading instead of one. Default is first level only. +section heading instead of one. +Default is first level only. The real amount of lines is controlled by the variables \fBHps1\fP and \fBHps2\fP. .TP .B Hps1 This is the number of lines preceding \fB.H\fP when the heading-level -is greater than \fBHps\fP. Value is in units, normally 0.5. +is greater than \fBHps\fP. +Value is in units, normally 0.5. .TP .B Hps2 This is the number of lines preceding \fB.H\fP when the heading-level -is less than or equal to \fBHps\fP. Value is in units, normally 1. +is less than or equal to \fBHps\fP. +Value is in units, normally\ 1. .TP .B Hs -Heading space level [0:7], default 2. +Heading space level [0:7], default\ 2. .TP .B Hss This is the number of lines that follows \fB.H\fP when the heading-level -is less than or equal to \fBHs\fP. Value is in units, normally 1. +is less than or equal to \fBHs\fP. +Value is in units, normally\ 1. .TP .B Ht Heading numbering type, default 0. @@ -1734,8 +1913,12 @@ Set this variable to 1 on the command line to get ISO-formatted date string. (\fB-rIso=1\fP) Useless inside a document. .TP +.B L +Page length, only for command line settings. +.TP .B Letwam -Max lines in return-address, used in \fB.WA\fP/\fB.WE\fP. Default 14. +Max lines in return-address, used in \fB.WA\fP/\fB.WE\fP. +Default\ 14. .TP .B "Lf, Lt, Lx, Le" Enables (1) or disables (0) the printing of List of figures, @@ -1757,7 +1940,8 @@ List space, if current listlevel > Ls then no spacing will occur around lists. Default 99. .TP .B Lsp -The size of an empty line. Normally 0.5v, but it is 1v +The size of an empty line. +Normally 0.5v, but it is 1v if \fBn\fP is set (\fB.nroff\fP). .TP .B N @@ -1783,6 +1967,9 @@ Numbered paragraphs, default 0. .br 1\ ==\ numbered in first level headings. .TP +.B O +Page offset, only for command line settings. +.TP .B Of Format of figure,table,exhibit,equation titles, default 0. .br @@ -1808,7 +1995,8 @@ Description Pointsize will only change to the current setting when \fB.PH\fP, \fB.PF\fP, \&\fB.OH\fP, \fP.EH\fP, \fB.OF\fP or \fB.OE\fP is executed. .T2 1 -Pointsize will change after every \fB.S\fP. This is the default. +Pointsize will change after every \fB.S\fP. +This is the default. .in .TP .B Ps @@ -1824,11 +2012,13 @@ Paragraph type, default 0. 2\ ==\ indented .P except after .H, .DE or .LE. .TP .B Sectf -Flag controlling "section-figures". A non-zero value enables this. +Flag controlling "section-figures". +A non-zero value enables this. See also register N. .TP .B Sectp -Flag controlling "section-page-numbers". A non-zero value enables this. +Flag controlling "section-page-numbers". +A non-zero value enables this. See also register N. .TP .B Si @@ -1837,38 +2027,49 @@ Display indent, default 5. .B Verbin Indent for \fB.VERBON\fP, default 5n. .TP +.B W +Line length, only for command line settings. +.TP .B .mgm Always 1. .LP .SH INTERNALS The letter macros is using different submacros depending on -the letter type. The name of the submacro has the letter type -as suffix. It is therefore possible to define other letter types, either +the letter type. +The name of the submacro has the letter type +as suffix. +It is therefore possible to define other letter types, either in the national macro-file, or as local additions. \&\fB.LT\fP will set the number variables \fBPt\fP and \fBPi\fP to 0 and 5. The following strings and macros must be defined for a new letter type: .TP \fBlet@init_\fP\fItype\fP -This macro is called directly by \fB.LT\fP. It is supposed to initialize +This macro is called directly by \fB.LT\fP. +It is supposed to initialize variables and other stuff. .TP \fBlet@head_\fP\fItype\fP This macro prints the letter head, and is called instead of the -normal page header. It is supposed to remove the alias \fBlet@header\fP, +normal page header. +It is supposed to remove the alias \fBlet@header\fP, otherwise it will be called for all pages. .TP \fBlet@sg_\fP\fItype\ name\ title\ n\ flag\ [arg1\ [arg2\ [...]]]\fP \&\fB.SG\fP is calling this macro only for letters, memorandums has -its own processing. \fIname\fP and \fItitle\fP is specified -thru \fB.WA\fP/\fB.WB\fP. \fIn\fP is the counter, 1-max, and -\fIflag\fP is true for the last name. Any other argument to \fB.SG\fP +its own processing. +\fIname\fP and \fItitle\fP is specified +thru \fB.WA\fP/\fB.WB\fP. +\fIn\fP is the counter, 1-max, and +\fIflag\fP is true for the last name. +Any other argument to \fB.SG\fP is appended. .TP \fBlet@fc_\fP\fItype\ closing\fP This macro is called by \fB.FC\fP, and has the formal closing as argument. .LP -\&\fB.LO\fP is implemented as a general option-macro. \fB.LO\fP demands +\&\fB.LO\fP is implemented as a general option-macro. +\fB.LO\fP demands that a string named \fBLet\fP\fItype\fP is defined, where \fItype\fP is the letter type. \&\fB.LO\fP will then assign the argument to the string @@ -1893,9 +2094,9 @@ J .BR @g@pic (@MAN1EXT@), .BR @g@eqn (@MAN1EXT@) .br -.BR mm (@MAN7EXT@) -.BR m@TMAC_M_PREFIX@mse (@MAN7EXT@) +.BR groff_mmse (@MAN7EXT@) . .\" Local Variables: .\" mode: nroff +.\" coding: latin-1 .\" End: diff --git a/contrib/groff/contrib/mm/groff_mmse.man b/contrib/groff/contrib/mm/groff_mmse.man index f915b8e..511eac5 100644 --- a/contrib/groff/contrib/mm/groff_mmse.man +++ b/contrib/groff/contrib/mm/groff_mmse.man @@ -1,5 +1,5 @@ .\" -.\" $Id: groff_mmse.man,v 2.1 2001/06/27 12:47:16 wlemb Exp $ +.\" $Id: groff_mmse.man,v 2.2 2001/12/09 12:15:09 wlemb Exp $ .\" Skrivet av Jörgen Hägg, Lund, Sverige .\" .TH GROFF_MMSE @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" @@ -79,7 +79,7 @@ J .BR @g@pic (@MAN1EXT@), .BR @g@eqn (@MAN1EXT@) .br -.BR m@TMAC_M_PREFIX@m (@MAN7EXT@) +.BR groff_mm (@MAN7EXT@) . .\" Local Variables: .\" mode: nroff diff --git a/contrib/groff/contrib/mm/m.tmac b/contrib/groff/contrib/mm/m.tmac index 41cff7c..143867d 100644 --- a/contrib/groff/contrib/mm/m.tmac +++ b/contrib/groff/contrib/mm/m.tmac @@ -3,8 +3,8 @@ .ds RE \\$2 .. .\" -.\" $Id: m.tmac,v 2.4 2001/05/16 11:07:52 wlemb Exp $ -.@revision $Revision: 2.4 $ +.\" $Id: m.tmac,v 2.15 2002/08/07 23:23:34 wlemb Exp $ +.@revision $Revision: 2.15 $ .ig Copyright (C) 1991-2000 Free Software Foundation, Inc. @@ -33,8 +33,9 @@ Env.var environ:name Index array!index .. .if !\n(.g .ab These mm macros require groff. +.do if d PH .nx .if \n(.C .ab The groff mm macros do not work in compatibility mode. -.warn +.if (\n[.warn] == 65543) .warn .\" ######## init ####### .\" Contents level [0:7], contents saved if heading level <= Cl .nr Cl 2 @@ -220,12 +221,12 @@ Index array!index .\" .\" These variables controls the number of lines preceding .H. .\" Hps1 is the number of lines when level > Hps -.nr Hps1 0.5 -.if n .nr Hps1 1 +.nr Hps1 0.5v +.if n .nr Hps1 1v .\" .\" Hps2 is the number of lines when level <= Hps -.nr Hps2 1 -.if n .nr Hps2 2 +.nr Hps2 1v +.if n .nr Hps2 2v .\" .\" Hss is the number of lines (Lsp) after the header. .nr Hss 1 @@ -401,7 +402,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" ####### module par ################################# .nr par@ind-flag 1 \" indent on following P if Pt=2 .nr hd*last-pos -1 -.nr hd*last-hpos -1 +.nr hd*last-hsize -1 .nr par*number 0 1 .af par*number 01 .nr par*number2 0 1 @@ -417,31 +418,31 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" paragraph .de P .\" skip P if previous heading -.ie !((\\n[nl]=\\n[hd*last-pos]):(\\n[nl]=(\\n[hd*last-pos]-.5v))) \{\ -. if \\n[D]>2 .tm Paragraph nl=\\n[nl] -. par@doit \\$* -. if \\n[Np] \\n[H1].\\n+[par*number]\ \ \c +.if \\n[D]>2 \{\ +. tm Paragraph nl=\\n[nl], last=\\n[hd*last-pos] +. tm Paragraph .k=\\n[.k], hsize=\\n[hd*last-hsize] .\} -.el .if !(\\n[hd*last-hpos]=\\n[.k]) \{\ -. if \\n[D]>2 .tm Paragraph nl=\\n[nl] -. par@doit \\$* -. if \\n[Np] \\n[H1].\\n+[par*number]\ \ \c +.if !((\\n[nl]=\\n[hd*last-pos]):(\\n[hd*last-hsize]=\\n[.k])) \{\ +. if \\n[D]>2 .tm Paragraph set ind-flag=1 +. nr par@ind-flag 1 .\} -.nr par@ind-flag 1 +.\" any collected unprinted text? +.par@doit \\$* +.if \\n[Np] \\n[H1].\\n+[par*number]\ \ \c .. .\"------------ .de nP .\" skip P if previous heading -.ie !((\\n[nl]=\\n[hd*last-pos]):(\\n[nl]=(\\n[hd*last-pos]-.5v))) \{\ -. if \\n[D]>2 .tm Paragraph nl=\\n[nl] -. par@doit \\$* -\\n[H2].\\n+[par*number2]\ \ \c +.if \\n[D]>2 \{\ +. tm Paragraph nl=\\n[nl], last=\\n[hd*last-pos] +. tm Paragraph .k=\\n[.k], hsize=\\n[hd*last-hsize] .\} -.el .if !(\\n[hd*last-hpos]=\\n[.k]) \{\ -. if \\n[D]>2 .tm Paragraph nl=\\n[nl] -. par@doit \\$* -\\n[H2].\\n+[par*number2]\ \ \c +.if !((\\n[nl]=\\n[hd*last-pos]):(\\n[hd*last-hsize]=\\n[.k])) \{\ +. if \\n[D]>2 .tm Paragraph set ind-flag=1 +. nr par@ind-flag 1 .\} +.par@doit \\$* +\\n[H2].\\n+[par*number2]\ \ \c .nr par@ind-flag 1 .. .\"------------ @@ -770,10 +771,12 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] . shift . \} .\} +.\" let mmroff know the filename and id .if \\n[Ref]>0 \{\ . tm .\\\\" PIC id \\n[pict*id] . tm .\\\\" PIC file \\*[pict*f] .\} +.\" these are defined by mmroff in the second pass .if d pict*file!\\n[pict*id] \{\ . ds pict*f \\*[pict*file!\\n[pict*id]] . nr pict*llx \\n[pict*llx!\\n[pict*id]] @@ -809,41 +812,52 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] . ds pict*h " . if \\n[pict*h]>0 .ds pict*h \\n[pict*h] . \" -. ne \\n[pict*h]u +. ne \\n[pict*h]u-1v . \" . \" these lines are copied and modified from tmac.pspic. . \" Originally written by James Clark . br . ie \\n[pict*box]>0 \{\ -\h'\\n[pict*in]u'\ +\v'-1v'\h'\\n[pict*in]u'\ \Z'\D'p 0 \\n[pict*h]u \\n[pict*w]u 0 0 -\\n[pict*h]u''\ \v'\\n[pict*h]u'\X'ps: import \\*[pict*f] \ -\\n[pict*llx] \\n[pict*lly] \\n[pict*urx] \\n[pict*ury] \\n[pict*w] \\n[pict*h]' +\\n[pict*llx] \\n[pict*lly] \ +\\n[pict*urx] \\n[pict*ury] \ +\\n[pict*w] \\n[pict*h]' .\} . el \{\ -\h'\\n[pict*in]u'\ +\v'-1v'\h'\\n[pict*in]u'\ \X'ps: invis'\ \Z'\D'p 0 \\n[pict*h]u \\n[pict*w]u 0 0 -\\n[pict*h]u''\ \X'ps: endinvis'\ \v'\\n[pict*h]u'\X'ps: import \\*[pict*f] \ -\\n[pict*llx] \\n[pict*lly] \\n[pict*urx] \\n[pict*ury] \\n[pict*w] \\n[pict*h]' +\\n[pict*llx] \\n[pict*lly] \ +\\n[pict*urx] \\n[pict*ury] \ +\\n[pict*w] \\n[pict*h]' . \} . br -. sp \\n[pict*h]u +. sp \\n[pict*h]u-1v .\} .. .\" external picture +.\" -L left adjust .de EPIC -.if \\n[.$]< 2 .@error "EPIC: Not enough arguments" +.if \\n[.$]<2 .@error "EPIC: Not enough arguments" +.nr pict*adj 0 \" centered +.if '\\$1'-L' \{\ +. shift 1 \" left adjust +. nr pict*adj 1 +.\} +.if \\n[nl]<0 \& .nr pict*w \\$1 .nr pict*h \\$2 .ds pict*name "External picture .if !''$3' .ds pict*name \\$3 -\& -.br .ne \\n[pict*h]u -.sp \\n[pict*h]u -.nr pict*ind (u;(\\n[.l]-\\n[.i]-\\n[pict*w])/2) +.sp \\n[pict*h]u-1v +.nr pict*ind 0 +.if !\\n[pict*adj] .nr pict*ind (u;(\\n[.l]-\\n[.i]-\\n[pict*w])/2) +.mk .in +\\n[pict*ind]u \D'l \\n[pict*w]u 0'\ \D'l 0 -\\n[pict*h]u'\ @@ -852,6 +866,8 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] \v'-(u;\\n[pict*h]/2)'\ \h'(u;(\\n[pict*w]-\w'\\*[pict*name]'/2))'\\*[pict*name] .in +.rt +.sp 1v .. .\" ######## module acc ################# .\"----------- @@ -1054,7 +1070,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\"---------- user macro HZ ---------- .if d HZ .HZ \\n[hd*level] \\n[hd*arg1] "\\$2\\$3" .nr hd*last-pos \\n[nl] -.nr hd*last-hpos \\n[.k] +.nr hd*last-hsize \\n[.k] .nr par@ind-flag 0 .. .\"-------- @@ -1093,8 +1109,8 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .nr pg*top-margin 0 .nr pg*foot-margin 0 .nr pg*block-size 0 -.nr pg*footer-size 5\" 1v+footer+even/odd footer+2v -.nr pg*header-size 7\" 3v+header+even/odd header+2v +.nr pg*footer-size 5v\" 1v+footer+even/odd footer+2v +.nr pg*header-size 7v\" 3v+header+even/odd header+2v .nr pg*extra-footer-size 0 .nr pg*extra-header-size 0 .nr ft*note-size 0 @@ -1108,14 +1124,14 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\"------------------------- .\" footer TRAPS: set, enable and disable .de pg@set-new-trap -.nr pg*foot-trap \\n[@pl]u-(\\n[pg*block-size]u+\\n[ft*note-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]v+\\n[pg*extra-footer-size]u) +.nr pg*foot-trap \\n[@pl]u-(\\n[pg*block-size]u+\\n[ft*note-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]u+\\n[pg*extra-footer-size]u) .\" -.if \\n[D]>2 .tm pg*foot-trap \\n[@pl]u-(\\n[pg*block-size]u+\\n[ft*note-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]v+\\n[pg*extra-footer-size]u) = \\n[pg*foot-trap] +.if \\n[D]>2 .tm pg*foot-trap \\n[@pl]u-(\\n[pg*block-size]u+\\n[ft*note-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]u+\\n[pg*extra-footer-size]u) = \\n[pg*foot-trap] .\" .\" last-pos points to the position of the footer and bottom .\" block below foot-notes. -.nr pg*last-pos \\n[@pl]u-(\\n[pg*block-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]v) -.if \\n[D]>2 .tm pg*last-pos \\n[@pl]u-(\\n[pg*block-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]v) = \\n[pg*last-pos] +.nr pg*last-pos \\n[@pl]u-(\\n[pg*block-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]u) +.if \\n[D]>2 .tm pg*last-pos \\n[@pl]u-(\\n[pg*block-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]u) = \\n[pg*last-pos] .. .de pg@enable-trap .wh \\n[pg*foot-trap]u pg@footer @@ -1379,16 +1395,28 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .. .\"------------------------- .\" set top and bottom margins +.\" -T sets pg*footer-size and pg*header-size instead .de VM -.if \\n[.$]=0 \{\ -. nr pg*extra-footer-size 0 -. nr pg*extra-header-size 0 +.ie '\\$1'-T' \{\ +. shift +. if \\n[.$]=0 \{\ +. nr pg*footer-size 5v +. nr pg*header-size 7v +. \} +. if \\n[.$]>0 .nr pg*header-size (v;\\$1) +. if \\n[.$]>1 .nr pg*footer-size (v;\\$2) .\} -.if \\n[.$]>0 .nr pg*extra-header-size (v;\\$1) -.if \\n[.$]>1 .nr pg*extra-footer-size (v;\\$2) -.if \\n[D]>2 \{\ -. tm extra top \\n[pg*extra-footer-size] -. tm extra bottom \\n[pg*extra-header-size] +.el \{\ +. if \\n[.$]=0 \{\ +. nr pg*extra-footer-size 0 +. nr pg*extra-header-size 0 +. \} +. if \\n[.$]>0 .nr pg*extra-header-size (v;\\$1) +. if \\n[.$]>1 .nr pg*extra-footer-size (v;\\$2) +. if \\n[D]>2 \{\ +. tm extra top \\n[pg*extra-footer-size] +. tm extra bottom \\n[pg*extra-header-size] +. \} .\} .pg@move-trap .. @@ -1977,6 +2005,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" nested DS/DE is allowed. No limit on depth. .de DS .br +.nr XXX \\n[nl] .nr ds*lvl +1 .ds@set-format \\$@ .\" @@ -2012,7 +2041,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] 'nf .\" calculate needed space .nr ds*need \\n[ds*height] -.nr ds*i \\n[pg*foot-trap]-\\n[pg*header-size]v-\\n[pg*extra-header-size]v +.nr ds*i \\n[pg*foot-trap]-\\n[pg*header-size]u-\\n[pg*extra-header-size]u .if (\\n[ds*height]>\\n[ds*i])&(\\n[.t]<(\\n[ds*i]/2)) .nr ds*need \\n[.t]u+1v .if (\\n[ds*height]<\\n[ds*i])&(\\n[.t]<(\\n[ds*height])) .nr ds*need \\n[.t]u+1v .\" Eject page if display will fit one page and @@ -2034,9 +2063,9 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .nr ds*i \\n[Lsp] .if r Dsp .nr ds*i \\n[Dsp] .\" -.if \\n[Ds] .SP \\n[ds*i]u +.if \\n[Ds] .sp \\n[ds*i]u .ds*div!\\n[ds*snr] -.if \\n[Ds] .SP \\n[ds*i]u +.if \\n[Ds] .sp \\n[ds*i]u .\" .if \\n[ds*format]=2 'ce 0 .if \\n[ds*format]=4 'rj 0 @@ -2078,7 +2107,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .ds li*mark \\$5\" mark .ie !'\\$6'' .nr li*li-spc \\$6\" LI-space .el .nr li*li-spc 1 -.ie !'\\$7'' .nr li*lb-spc \\$6\" LB-space +.ie !'\\$7'' .nr li*lb-spc \\$7\" LB-space .el .nr li*lb-spc 0 .\" init listcounter .nr li*cnt!\\n[li*lvl] 0 1 @@ -2312,10 +2341,11 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .de eq@check .if !'\\*[eq*label]'' \{\ . mk -' sp (u;\\$1/2-.45v) +. \" space down to middle of equation +' sp (u;\\$1/2) . ie (\\n[Eq]%2) \{\ . \" label to the left -\h'|0'\\*[eq*label]\c +\h'|0'\\*[eq*label] . \} . el \{\ . \" label to the right @@ -3096,7 +3126,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\"########################### module ind ############################ .\" Support for mgs-style indexing, borrowed from mgs. .de IX -.tm \\$1\t\\$2\t\\$3\t\\$4 ... \\n[%] +. tm \\$1\t\\$2\t\\$3\t\\$4 ... \\n[%] .. .\"-------------------- .\" Another type of index system @@ -3405,6 +3435,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .if \\n[.$] .ds let*ia-name!\\n+[let*ia-n] \\$1 .if \\n[.$]>1 .ds let*ia-title!\\n[let*ia-n] \\$2 .ev let@ev +.init@reset 'nf .di let@ia-div .eo @@ -3421,6 +3452,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .if \\n[.$] .ds let*wa-name!\\n+[let*wa-n] \\$1 .if \\n[.$]>1 .ds let*wa-title!\\n[let*wa-n] \\$2 .ev let@ev +.init@reset 'nf .di let@wa-div .it \\n[Letwam] let@wa-drain diff --git a/contrib/groff/contrib/mm/mm.tmac b/contrib/groff/contrib/mm/mm.tmac new file mode 100644 index 0000000..9ed09b7 --- /dev/null +++ b/contrib/groff/contrib/mm/mm.tmac @@ -0,0 +1,3 @@ +.\" mm.tmac +.\" +.do mso m.tmac diff --git a/contrib/groff/contrib/mm/mmroff.man b/contrib/groff/contrib/mm/mmroff.man index f128ce4..a891ff5 100644 --- a/contrib/groff/contrib/mm/mmroff.man +++ b/contrib/groff/contrib/mm/mmroff.man @@ -1,7 +1,7 @@ .\" -.\" $Id: mmroff.man,v 2.1 2001/06/27 12:47:16 wlemb Exp $ +.\" $Id: mmroff.man,v 2.2 2001/12/09 12:15:09 wlemb Exp $ .\" -.TH MMROFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +.TH MMROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" .SH NAME mmroff \- reference preprocessor .SH SYNOPSIS @@ -43,9 +43,6 @@ J .BR @g@tbl (@MAN1EXT@), .BR @g@pic (@MAN1EXT@), .BR @g@eqn (@MAN1EXT@) -.br -.BR mm (@MAN7EXT@) -.BR m@TMAC_M_PREFIX@mse (@MAN7EXT@) . .\" Local Variables: .\" mode: nroff diff --git a/contrib/groff/contrib/mm/mmroff.pl b/contrib/groff/contrib/mm/mmroff.pl index 69b6105..155550b 100755 --- a/contrib/groff/contrib/mm/mmroff.pl +++ b/contrib/groff/contrib/mm/mmroff.pl @@ -14,8 +14,10 @@ if (grep(/^-x$/, @ARGV)) { @ARGV = grep(!/^-x$/, @ARGV); } -my $check_macro = "groff -rRef=1 -z @ARGV"; -my $run_macro = "groff @ARGV"; +# mmroff should always have -mm, but not twice +@ARGV = grep(!/^-mm$/, @ARGV); +my $check_macro = "groff -rRef=1 -z -mm @ARGV"; +my $run_macro = "groff -mm @ARGV"; my (%cur, $rfilename, $max_height, $imacro, $max_width, @out, @indi); open(MACRO, "$check_macro 2>&1 |") || die "run $check_macro:$!"; @@ -66,11 +68,12 @@ while() { close(MACRO); -if ($rfilename && @out) { +if ($rfilename) { push(@out, ".nr pict*max-height $max_height\n") if defined $max_height; push(@out, ".nr pict*max-width $max_width\n") if defined $max_width; open(OUT, ">$rfilename") || "create $rfilename:$!"; + print OUT '.\" references', "\n"; my $i; for $i (@out) { print OUT $i; diff --git a/contrib/groff/contrib/mm/mmse.tmac b/contrib/groff/contrib/mm/mmse.tmac new file mode 100644 index 0000000..8198666 --- /dev/null +++ b/contrib/groff/contrib/mm/mmse.tmac @@ -0,0 +1,3 @@ +.\" mmse.tmac +.\" +.do mso mse.tmac diff --git a/contrib/groff/contrib/mom/BUGS b/contrib/groff/contrib/mom/BUGS new file mode 100644 index 0000000..92d4b47 --- /dev/null +++ b/contrib/groff/contrib/mom/BUGS @@ -0,0 +1,76 @@ +Assume that anything that doesn't work or behaves oddly is a bug. +The documentation should be taken as the authoritative source for +how things ought to be. + +Post to the groff mailing list (groff@ffii.org) with bug reports, +questions and suggestions, or contact me directly at: + + df191@ncf.ca + +--Peter Schaffter + +======================================================================== + +Version 1.1.3c +============== + + +Version 1.1.3 +============= + +Footnotes not outputting on final page of document body when ENDNOTES +is invoked. +---Fixed--- + +Pad not working properly and/or spitting out warnings when fill mode is +on. +---Fixed--- + +Version 1.1.2 +============= + +PAGENUM_STYLE being ignored unless entered after START. +---Fixed--- + +Version 1.1 +=========== + +String tabs not working as advertised when set from within other tabs. +---Fixed--- + +.COLLATE sometimes depositing a header on the first page of a subsequent doc. +---Fixed with workaround BREAK_QUOTE--- + +.UNDERLINE_QUOTES in PRINTSTYLE TYPEWRITE not on by default as advertised. +---Fixed--- + +.TI not cooperating with other indent styles. +---Fixed--- + +.WS and .SS not cooperating. +---Fixed--- + +.RW and .EW not working. +---Fixed--- + +======================================================================== + +KNOWN PROBLEMS +-------------- + +The indent macros from the typesetting macro set may not always +perform well in conjunction with the document processing macros, +especially when documents are set in columns. Mostly, this is the +result of inadequate testing. There are only so many "who'd want to +do this anyway?" scenarios I can think of on my own. + +Epigraphs at the bottoms of page may sometimes run exactly one line +deeper than they should. The alternative (from my point of view) is +to have them run 1 line shorter than they should. The problem stems +from the fact the epigraphs are leaded differently than all other text, +and there's only so much adjusting that can be done with the whitespace +surrounding them to get them to bottom align. Since stylistically, +epigraphs should never appear at the bottom of a page/column without at +least some running text beneath them in order to make sense of the role +they play in page layout, this not likely to be fixed for some time. + diff --git a/contrib/groff/contrib/mom/ChangeLog b/contrib/groff/contrib/mom/ChangeLog new file mode 100644 index 0000000..d1e0fd1 --- /dev/null +++ b/contrib/groff/contrib/mom/ChangeLog @@ -0,0 +1,390 @@ +*Sun Aug 25 2002 + +o Changed .IX to .IQ. The older form still works, but emits a message + advising the user to update to the newer. (The macro in om.tmac + still remains IX; IQ is an alias.) Docs updated to reflect the + change. + +*Tue Aug 20 2002 + +o Added new (better) way to handle inline kerning. \*[BU #] and + \*[FU #] allow passing an argument to the inline string. The older + forms \*[BU#] and \*[FU#] still work, though. + +o Changed handling of inline horizontal and vertical movements. + Horizontal movements are now done with \*[BCK #] and + \*[FWD #]; verticals with \*[UP #] and \*[DOWN #]. + The older forms \*[FP#] and \*[BP#] still work (horizontals), as do + \*[ALD#] and \*[RLD#] (verticals). + +*Mon Aug 19 2002 + +o Fixed ENDNOTES so footnotes output properly when ENDNOTES is called + +o Added ENDNOTES_HDRFTR_CENTER so that default no-print of header + center string on endnotes page(s) when DOCTYPE is CHAPTER can + be disabled (i.e. header center will be printed). + +*Sat Aug 10 2002 + +o Added .nf to top of PAD, with a test beforehand for current fill + mode. If fill mode was on, it's restored after PAD completes + processing. Updated reserved.html to include number register + #FILL_MODE. + +*Mon Jul 29 2002 + +o Makefile.sub (FFLAG, TFLAG): Add paths to source directories. + +*Wed Jul 24 2002 + +o Makefile.sub (groff_bin_path): Don't use ' \+' but ' *' for sed. + (GROFF): Set GROFF_COMMAND_PREFIX to empty value. + +*Fri Jul 12 2002 + +o More fixes to underlining. + +*Fri Jul 5 2002 + +o Added capability of endnotes and pertinent control macros to om.tmac. + +o Added document entries pertaining to endnote macros. + +o Incorporated endnote macros into elvis_syntax. + +o Small doc fixes. + +o Tidied up indenting of om.tmac. + +o Fixed handling of underlining of italics in PRINTSTYLE TYPEWRITE + (there was a problem with footnotes getting underlined when they + shouldn't have been). + +o Removed ENDNOTES from TODO + +o Fixed the character translations for UNDERLINE so they work properly + with digraphs. + +*Mon Jul 1 2002 + +o Expanded docprocessing.html entry "Special Note on Chapters". Tidied + up html a bit. + +*Tue Jun 18 2002 + +o examples/macros.mom: Fix path to penguin.ps. + +*Sat Jun 15 2002 + +o Small fix to PAD to make the use of inlines within the pad string + more intuitive. + +o Added \*[RULE] ( = \l'\n(.lu' ) so that full measure rules (either to + full line length or within tabs) are easier to set. + +*Sat Jun 8 2002 + +o Macro .PS renamed to .PT_SIZE. Alias .TS removed. + +o .tr bits in .CAPS rewritten in the form .tr é\['E]. + +o General cleanup of docs to reflect changes. + +o Small changes/additions to `elvis_syntax'. + +*Thu Jun 6 2002 + +o In DOCTYPE, in .if '\\$1'LETTER', added .FOOTER_RIGHT_SIZE +0. + Without it, the suite page was printing at the default + FOOTER_RIGHT_SIZE of -.5, which didn't look good. + +*Wed Jun 5 2002 + +o Makefile.sub (TFLAG): Add `$(top_builddir)/tmac'. + +*Tue Jun 4 2002 + +o Makefile.sub (groff_bin_dirs): Fix typo (forgotten `src' element). + +*Mon Jun 3 2002 + +o Makefile.sub (uninstall_sub): Don't use `momdocdir' but `htmldocdir'. + Add missing backslash. + +*Sat Jun 1 2002 + +o Makefile.in (prepare_make_examples): Test for `penguin.ps', not + `examples/penguin.ps'. + +*Wed May 29 2002 + +o Rewrote portions of PAGENUM_STYLE and COPYSTYLE so that PAGENUM_STYLE + behaves as advertised. + +*Fri May 24 2002 + +o /Makefile.sub (momdocdir): Removed. + (HTMLDOCFILES): Prepend `momdoc/'. + (EXTRAEXAMPLEFILES): Removed. Added entries to... + (EXAMPLEFILES): This. + (.SUFFIXES, .mom.ps): New. + (prepare_make_examples): Updated. + (examples/*.ps): Removed; .mom.ps will handle this. + (install_data): Updated. + +*Thu May 23 2002 + +o Applied two small bug fixes to om.tmac (patches 1.1.1a and 1.1.1b). + +o mom is now part of groff. + +o Some renaming to avoid problems with 8+3 filesystems: + + examples/docprocessing_typeset.mom -> examples/typeset.mom + examples/docprocessing_typewrite.mom -> examples/typewrite.mom + examples/typesetting_macros.mom -> examples/macros.mom + examples/penguin_small2_bw.ps -> examples/penguin.ps + +o Removed `INSTALL' and `README' since groff takes care of installation + now. + +o Added Makefile.sub. + +o Added mom.tmac (which simply calls om.tmac). + +o Added groff_mom.man for orthogonality; it simply points to the HTML + documentation. + +*Thu May 16 2002 + +o Added macro DRAFT_WITH_PAGENUMBER so user can have draft/revision + info attached to the pagenumber in COPYSTYLE DRAFT, instead of having + it HEADER center. Always having it HEADER center was creating problems + with long doc titles, esp. with PRINTSTYLE TYPEWRITE (which is when + COPYSTYLE DRAFT is most likely to be used). Now user has the choice, + in these circumstances, either to reduce HEADER_SIZE, or to displace + the draft/revision info. Also rewrote portions of COPYSTYLE so that + if no revision number is given in the reference macros, "Rev. #" + doesn't appear when COPYSTYLE DRAFT. + +*Fri May 10 2002 + +o Added capability of user-defined, single string recto/verso + headers/footers. + +o Added new entries to docs about the above. Made some additional + small changes to toc.html, rectoverso.html, and headfootpage.html + to supplement the new entries. + +o Small fix to handling of footer separator rule -- was 1 point too low + owing to fuzziness of #CAP_HEIGHT as returned by SIZESPECS. + +o Added some more useful stuff to elvis_syntax. + +*Sun May 05 2002 + +o Fix to DEFAULTS so that L_MARGIN and R_MARGIN are reprocessed if + DOCTYPE LETTER. R_MARGIN, as set by DOCTYPE LETTER had no preceding + PAGEWIDTH or PAPER from which to get #PAGE_WIDTH for figuring out + line length. + +o Additional fix to DEFAULTS in handling DOCTYPE LETTER so that if user + sets line length prior to START, no reprocessing of R_MARGIN occurs. + This necessitated adding a new number register: #USER_SET_L_LENGTH + +*Sat May 04 23:48:05 EDT 2002 + +o Added .cflags 4 /\(en -- was driving me nuts that lines wouldn't + break after these characters; I'm assuming others feel the same way + +* Fri May 03 2002 + +o Made some small fixes to space handling around quotes, mostly to do + with quotes immediately after START and quotes after (sub)heads. + +* Wed May 01 2002 + +o Fixed a small bug that was causing the first .PP after START to begin + at the top margin of the page regardless of any type that preceded + .PP when docheaders were off. + +o Fixed HEADER so that when HEADERS are off the first line of type on + pages after the first falls properly at the top margin + +*Sat Apr 27 2002 + +o Renamed docprocessing_macros.mom in /examples to + docprocessing_typeset.mom. Added docprocessing_typewrite.mom, as + well as a README file. + +o Fixed UNDERLINE_QUOTES (for PRINTSTYLE TYPEWRITE) so they really are + on by default as the docs say. + +o Changes to doc entry on COLLATE: + + - removed bit about using COLLATE after a cover page (I wrote the + entry *before* I wrote the macro!). Cover pages should be + followed by NEWPAGE, not COLLATE. + + - added caution about mixing PRINTSTYLEs + + - added caution about using DOC_FAMILY to change family of all + document elements after COLLATE + +o Made HEADER_SIZE (and, by extension, FOOTER_SIZE) available to + PRINTSTYLE TYPEWRITE. Changed appropriate doc entries to reflect + this. + +*Wed Apr 24 2002 + +o Small change to DO_QUOTE to correct a problem with quotes and + blockquotes that fall in the middle of paragraphs (i.e. text after + the quote is not a new para). Basically, added a bit that stores the + current para indent, sets para indent to 0, invokes a PP, then + restores the original para indent. + +o Added new macro, BREAK_QUOTE, to deal with the problem of + footnotes in quotes and blockquotes that cross pages or columns. + + Quotes and blockquotes are read into diversions, which means they + get their footnote information from the page/column on which they + were started. If a footnoted quote crosses a page/column, what + sometimes happens is that the footnote itself is output at the + bottom of page/column where the quote started, whereas the text + marker for the footnote appears on the next page/column where the + quote ends. Furthermore, the text marker is the one appropriate + to the previous page. BREAK_QUOTE is a workaround. + +o Added directory /examples to archive. + +o Added typesetting_macros.mom, docprocessing_macros.mom, elvis_syntax + and penguin_small2_bw.ps to /examples. + +o Added BREAK_QUOTE to docs, made some additions to reserved words + list, and corrected a few little doc errors. + +*Mon Apr 22 2002 + +o Added default .L_MARGIN 1i and .R_MARGIN 1i to PAPER, PAGE, and + PAGEWIDTH. L_MARGIN is essential otherwise left indents and tabs + don't have a register #L_MARGIN to work with. The default right + margin is a convenience only. Updated the doc entries for L_MARGIN + and R_MARGIN to reflect the change. + +*Sun Apr 21 2002 + +o Changes to COLLATE: + + - added some "resets" (LL, LS, QUAD) + - added a check for whether pagination is at page top (either + because FOOTERS are on or because PAGENUM_POS was user set). + If pagination is on, and PAGENUM_POS is TOP, it's turned off + for next page (start of next collated document) and restored + for subsequent pages unless PAGENUM_ON_FIRST_PAGE is on, in + which case the page number appears at page top. + +o The macro TRAPS is always invoked at the end of DEFAULTS (which is + called by START). Formerly, TRAPS was only invoked at the start + of a doc, not after COLLATE. Now runs after COLLATE as well. + +o Distance from $DOC_TYPE in DOCTYPE NAMED "" to start of + running text was one linespace too deep. Fixed (in START). + +o When 1st arg to PAGENUM_POS was user set to TOP, running text was + printing 1 linespace too high, even when PAGINATION was OFF. Same + problem when HEADERS were OFF (i.e. nothing in the header margin at + all). Fixed by removing -\\n[#DOC_LEAD]u from all .sp |\\n[#T_MARGIN]u + calls of .el portion after .ie \\n[#HEADERS_ON]. + +o Added new macro: PAGENUM_ON_FIRST_PAGE. Normally, when FOOTERS are + being used instead of HEADERS, mom doesn't print the page number at + the top of the first page of a doc, or the first page of collated + docs. New macro allows user to get mom to put the page number on + "first" pages if that's desired. Updated docs to include the macro. + +o More little fixes to docs. + +*Thu Apr 18 2002 + +o Fixed TI (temporary indent) so that it continues to work as expected, + even when called while another type of indent is in effect. + +*Tue Apr 16 2002 + +o String tabs weren't working as advertised when set from within + a tab. Fixed. Two new registers added: #ST_OFFSET and #IN_TAB. + String tabs now behave poperly and intuitively when set within tabs. + +o Added a note to docs about surrounding \w'...' escape with double- + quotes when it's used as an argument to macros + +o Added a note to docs that SILENT does not deposit a .br + +*Mon Apr 15 2002 + +o Added new macro BR_AT_LINE_KERN if user wants mom to deposit .br's + before .RW and/or .EW. + +o Added 1/4 points to inline escapes \*[ALD] and \*[RLD]. + +o Added 1/4 points to inline escapes \*[FP] and \*[BP] + +o Updated docs to reflect the above changes. + +*Fri Apr 12 2002 + +o Fixed .RW and .EW which weren't working because of a missing \ in + \\n(.f register. Also made it so that .RW and .EW affect all fonts + in positions 1, 2, 3, and 4 at once, hence line kerning now affects + all fonts that appear after it, not just the font that was current at + the time of the macros' invocation. + +o .SS and .WS now working properly. .WS no longer has any effect on + .SS, which remains constant regardless of .WS. Furthermore, .SS no + longer gets its value by adding \*[$SS_VAR] + \n[.ss]. Instead, + it remains constant. Don't know what I was thinking when I wrote + the routine in the first place. + +o Updated and rewrote doc entry pertaining to SS + +*Wed Apr 10 2002 + +o Renamed tmac.om to om.tmac to bring macro file's name into line + with current groff policy + +o Added more standard paper sizes to PAPER. + +o Fixed T_MARGIN, LS, and AUTOLEAD so that if T_MARGIN is set before LS + or AUTOLEAD at the top of a file, the first line of type falls + properly on the baseline set by T_MARGIN. Previously, LS and + AUTOLEAD automatically advanced by the value passed to them before + setting the first line of type, meaning that the first line of type + fell at T_MARGINu+1v instead of T_MARGIN. + +o Updated docs to reflect changes. + +o Removed #TEST_FOR_NUMERIC from list of reserved words. + +o Added "t" and #T_MARGIN_SET to list of reserved words. + +*Sat Apr 6 2002 + +o Added FACTOR arg to AUTOLEAD, so if user wants autolead to be a factor + of point size, instead of being the sum of pointsize + autolead, s/he + has the choice. Incorporated appropriate changes to PS and LS. + +o Added new register #AUTOLEAD_FACTOR to reserved words. Modified + comments for AUTOLEAD, PS, and LS to reflect changes. Also + corrected an error where #AUTOLEAD_VALUE had mistakenly been written + $AUTOLEAD_VALUE in comments in the macro file, and removed erroneous + | . Updated AUTOLEAD entry in momdoc/typesetting.html + to reflect the changes. + +*Wed Apr 3 2002 + +o Cleaned up html errors in the docs. + +o Added "Next," "Prev" and "Top" links to top and bottom of doc files. + +o Fixed some typos in the docs. diff --git a/contrib/groff/contrib/mom/Makefile.sub b/contrib/groff/contrib/mom/Makefile.sub new file mode 100644 index 0000000..881c052 --- /dev/null +++ b/contrib/groff/contrib/mom/Makefile.sub @@ -0,0 +1,125 @@ +# Copyright (C) 2002 Free Software Foundation, Inc. +# Written by Werner Lemberg (wl@gnu.org) +# +# This file is part of groff. +# +# groff is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2, or (at your option) any later +# version. +# +# groff is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License along +# with groff; see the file COPYING. If not, write to the Free Software +# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +groff_bin_dirs=\ + $(top_builddir)/src/roff/groff \ + $(top_builddir)/src/roff/troff \ + $(top_builddir)/src/devices/grops +groff_bin_path=`echo $(groff_bin_dirs) | sed -e 's| *|:|g'` + +FFLAG=-F$(top_builddir)/font -F$(top_srcdir)/font +TFLAG=-M$(top_builddir)/tmac -M$(top_srcdir)/tmac -M$(srcdir) + +GROFF=GROFF_COMMAND_PREFIX=''; \ + export GROFF_COMMAND_PREFIX; \ + GROFF_BIN_PATH=$(groff_bin_path); \ + export GROFF_BIN_PATH; \ + $(top_builddir)/src/roff/groff/groff $(FFLAG) $(TFLAG) + +MAN7=\ + groff_mom.n + +NORMALFILES=\ + mom.tmac \ + om.tmac + +HTMLDOCFILES=\ + momdoc/appendices.html \ + momdoc/cover.html \ + momdoc/definitions.html \ + momdoc/docelement.html \ + momdoc/docprocessing.html \ + momdoc/goodies.html \ + momdoc/headfootpage.html \ + momdoc/inlines.html \ + momdoc/intro.html \ + momdoc/letters.html \ + momdoc/rectoverso.html \ + momdoc/reserved.html \ + momdoc/toc.html \ + momdoc/typemacdoc.html \ + momdoc/typesetting.html \ + momdoc/using.html + +EXAMPLEFILES=\ + examples/letter.mom \ + examples/macros.mom \ + examples/typeset.mom \ + examples/typewrite.mom \ + examples/README.mom \ + examples/elvis_syntax \ + examples/penguin.ps + +PROCESSEDEXAMPLEFILES=\ + examples/letter.ps \ + examples/macros.ps \ + examples/typeset.ps \ + examples/typewrite.ps + +CLEANADD=\ + penguin.ps \ + $(PROCESSEDEXAMPLEFILES) + +.SUFFIXES: .mom .ps +.mom.ps: + $(GROFF) -Tps -mom $< >$@ + + +all: make_examples + +.PHONY: make_examples +make_examples: prepare_make_examples $(PROCESSEDEXAMPLEFILES) + +prepare_make_examples: examples/penguin.ps + test -d examples || $(mkinstalldirs) examples + test -f penguin.ps || cp $(srcdir)/examples/penguin.ps . + +install_data: $(NORMALFILES) $(HTMLDOCFILES) \ + $(EXAMPLEFILES) $(PROCESSEDEXAMPLEFILES) + -test -d $(tmacdir) || $(mkinstalldirs) $(tmacdir) + for f in $(NORMALFILES); do \ + rm -f $(tmacdir)/$$f; \ + $(INSTALL_DATA) $(srcdir)/$$f $(tmacdir)/$$f; \ + done + -test -d $(htmldocdir)/momdoc || $(mkinstalldirs) $(htmldocdir)/momdoc + for f in $(HTMLDOCFILES); do \ + rm -f $(htmldocdir)/$$f; \ + $(INSTALL_DATA) $(srcdir)/$$f $(htmldocdir)/$$f; \ + done + -test -d $(exampledir) || $(mkinstalldirs) $(exampledir) + for f in $(EXAMPLEFILES); do \ + rm -f $(exampledir)/$$f; \ + $(INSTALL_DATA) $(srcdir)/$$f $(docdir)/$$f; \ + done + for f in $(PROCESSEDEXAMPLEFILES); do \ + rm -f $(exampledir)/$$f; \ + $(INSTALL_DATA) $$f $(docdir)/$$f; \ + done + +uninstall_sub: + -for f in $(NORMALFILES); do \ + rm -f $(tmacdir)/$$f; \ + done + -for f in $(HTMLDOCFILES); do \ + rm -f $(htmldocdir)/$$f; \ + done + -rmdir $(htmldocdir)/momdoc + -for f in $(EXAMPLEFILES) $(PROCESSEDEXAMPLEFILES); do \ + rm -f $(docdir)/$$f; \ + done diff --git a/contrib/groff/contrib/mom/NEWS b/contrib/groff/contrib/mom/NEWS new file mode 100644 index 0000000..0572603 --- /dev/null +++ b/contrib/groff/contrib/mom/NEWS @@ -0,0 +1,183 @@ +Release 1.1.4 +------------- + +***SIGNIFICANT CHANGE*** +.IX is now deprecated, although it will continue to work as before. +The new form is .IQ (Indent Quit). Groff will emit a message advising +users to update their docs. + +***NEW*** +Four new inlines to deal with horizontal and vertical movements: + + o \*[FWD n] + o \*[BCK n] + o \*[UP n] + o \*[DOWN n] + +All four require a unit of measure after n. These inlines are similar +to the older \*[FPn], \*[BPn], \*[ALDn] and \*[RLDn], however they're +not restricted to points, and any value can be entered for n (the older +forms -- which still work -- were restricted to 1 - 36). + +***CHANGED*** +Inline kerning can now be accomplished with \*[BU n] and \*[FU n], where +n, after the space, is the desired number of kern units. The older +forms \*[BUn] and \*[FUn] still work, up to 36 units. + +------------------------------------------------------------------------ + +Release 1.1.3c +-------------- + +***NEW*** +A new macro -- ENDNOTES_HDRFTR_CENTER -- added so that mom's default +behaviour of not printing the header center string when DOCTYPE is +CHAPTER can be disabled (i.e. she will print the center string). The +macro is user-called with ENDNOTES_HEADER_CENTER or +ENDNOTES_FOOTER_CENTER. + +***FIXES*** +PAD now works as advertised when fill mode is on. + +ENDNOTES no longer disables printing of footnotes on last page of +document body. + +Release 1.1.3 +------------- + +***SIGNIFICANT CHANGE -- PLEASE TAKE NOTE*** +As of 1.1.3, groff must be >= 1.18. + +***NEW*** +Added endnotes functionality to mom, along with a slew of macros to +control how mom prints endnotes pages. See the html documentation. + +***NEW*** +Added inline \*[RULE], which draws a rule to the full measure of the +current line length ( to be used in place of \h'\n(.lu' ). Weight of the +rule is dependent on the point size of type when \#[RULE] is called. + +***FIXES*** +PAD -- works more intuitively now when the pad string contains inline +escapes for font, point size, etc. + +UNDERLINE -- fixed character translations of digraphs so they get +underlined properly. Also fixed a bug that was causing some footnotes +to get underlined when UNDERLINE was on in the body of the document. + +***UPDATES*** +Html documentation +elvis_syn + +Release 1.1.2a +-------------- + +***SIGNIFICANT CHANGE -- PLEASE TAKE NOTE*** +In order to help mom toward full groffship, the macro .PS has been +renamed to .PT_SIZE, and the alias .TS (for .TAB_SET) has been removed. +.PS and .TS are keywords used by pic and tbl respectively, and the mom +macros of the same name were in conflict. + +Release 1.1.2 +------------- + +***IT'S OFFICIAL!*** +mom is now an official part of the groff. New releases will be +incorporated into the groff package. I'll still be posting each new +release on the mom homepage, so there's no need to download all of the +most recent version of groff just to get a newer mom. :) + +***CHANGES*** +Fixed default footer separator rule adjustment so that it's closer to +the advertised "4 points above the tallest ascender in the footer." + +Added more stuff to the elvis_syn file. Still wouldn't mind someone +contributing some vim/emacs syntax highlighting. + +Added .cflags 4 /\(em to om.tmac. By default, mom now obligingly +breaks after / and \(en. + +***NEW*** +Macro(s): HEADER_RECTO + HEADER_VERSO +With these macros, users can now define single-string recto/verso +headers/footers. HEADER_RECTO (or FOOTER_RECTO) can be used to create +a one-part header/footer (instead of mom's default three-parters) that +appears on every page if RECTO_VERSO is OFF or, if RECTO_VERSO is on, if +no HEADER_VERSO (or FOOTER_VERSO) has been defined. If a HEADER_VERSO +(or FOOTER_VERSO) is defined and RECTO_VERSO is on, _RECTO prints on +even pages and _VERSO on odd pages. + +Added macro DRAFT_WITH_PAGENUMBER so user can have draft/revision +info attached to the pagenumber in COPYSTYLE DRAFT, instead of having +it HEADER center. Always having it HEADER center was creating problems +with long doc titles, esp. with PRINTSTYLE TYPEWRITE (which is when +COPYSTYLE DRAFT is most likely to be used). + +***FIXES*** +No more "can't break line" warnings in DOCTYPE LETTER. + +If no REVISION number is given, Rev. 0 no longer appears HEADER_CENTER +in COPYSTYLE DRAFT + +PAGENUM_STYLE now works as advertised. + +Release 1.1.1 +------------- + +***CHANGES*** +Main macro file renamed to om.tmac, in keeping with current groff +policy. + +Now okay to use groff mailing list for mom-related posts + +***NEW*** +Toggle macro -- BR_AT_LINE_KERN. When on, automatically deposits +a break whenever .RW or .EW are invoked. Very useful when kerning +whole lines of rag copy. + +***NEW*** +Toggle macro -- PAGENUM_ON_FIRST_PAGE. Normally, when FOOTERS are +being used instead of HEADERS, mom doesn't print the page number at +the top of the first page of a doc, or the first page of collated docs. +PAGENUM_ON_FIRST_PAGE allows user to get mom to put the page number on +"first" pages if that's desired. + +***NEW*** +Macro -- BREAK_QUOTE -- to deal with problem of footnoted quotes and +blockquotes that cross a page or column. + +***NEW*** +New argument to AUTOLEAD -- FACTOR. With FACTOR, you can, if you +wish, enter a factor by which AUTOLEAD multiplies the point size when +calculating lead automatically. + +Improvements +------------ + +PAPER now has a much larger selection of common paper sizes. + +\*[ALD], \*[RLD], \*[FP] and \*[BP] now accept increments of quarter +points (expressed as decimal fractions). \*[RLD1.75], for example, +reverses 1-3/4 points up on the line. + +HEADER_SIZE now available to PRINTSTYLE TYPEWRITE. This was necessary +to deal with the problem of excessively long HEADER_LEFT, _CENTER or +_RIGHT strings. + +Fixes +----- + +T_MARGIN -- can be set before or after LS or AUTOLEAD +SS -- remains constant regardless of WS +WS -- no longer affects SS +TI -- now works as expected even when called while another indent + type is in effect +COLLATE -- small fixes + +Broken .RW and .EW fixed. + +String tabs now behave properly when set from within tabs. + +UNDERLINE_QUOTES (for PRINTSTYLE TYPEWRITE) are now, in fact, on by +default as the docs state. diff --git a/contrib/groff/contrib/mom/TODO b/contrib/groff/contrib/mom/TODO new file mode 100644 index 0000000..c5f1541 --- /dev/null +++ b/contrib/groff/contrib/mom/TODO @@ -0,0 +1,21 @@ +CONTROL MACROS -- _INDENT +-------------- +Let user be able to enter decimal fractions as the argument to _INDENT +control macros, or, instead, let user be able to enter absolute +values with a unit of measure in addition to current behaviour, +which is relative. + +LISTS +----- +Possbility of indented, nested lists, html-style. Options for numbered, +alpha-ed, bulleted, dashed. Again, not sure how useful these would be +for mom's target users. As things stand now, it's easy enough to +set up lists with string tabs or hanging indents. + +BIBLIOGRAPHY +------------ +Thinking about macros to *assist* in user-written bibliographies (i.e. +not biblios that get generated automatically at the ends of docs). Style +considerations are a nightmare, though. + +------------------------------------------------------------------------ diff --git a/contrib/groff/contrib/mom/copyright b/contrib/groff/contrib/mom/copyright new file mode 100644 index 0000000..ea18d01 --- /dev/null +++ b/contrib/groff/contrib/mom/copyright @@ -0,0 +1,24 @@ +AUTHOR +------ +Peter Schaffter (df191@ncf.ca) +15, chemin Brunette +RR 2, CP 406 +Ste-Cécile-de-Masham (Québec) +CANADA + +======================================================================== + +The groff macro file om.tmac and the html documentation pertaining +to it are copyright (c) 2002 Peter Schaffter. + +om.tmac is issued under the GNU General Public License, a full copy of +which can be had at + + http://www.gnu.org/licenses/gpl.html + +The html documentation pertaining to om.tmac is issued under the GNU +Free Documentation License, a full copy of which can be had at + + http://www.gnu.org/copyleft/fdl.html + +======================================================================== diff --git a/contrib/groff/contrib/mom/examples/README.mom b/contrib/groff/contrib/mom/examples/README.mom new file mode 100644 index 0000000..fba1e01 --- /dev/null +++ b/contrib/groff/contrib/mom/examples/README.mom @@ -0,0 +1,56 @@ +The files in this directory show mom in action. I haven't included +PostScript output from the files because I want to keep the mom +archive as lean as possible. In order to see the PostScript output of +these files, process them with groff, sending the output either to a +separate file for previewing with gv (ghostview) or to your printer. +I don't recommend previewing with gxditview because it doesn't render +some of mom's effects properly. + +All the files are set up for 8.5ix11i paper. + +macros.mom +---------- + +This file demonstrates the use of typesetting tabs, string tabs, +line padding, multi-columns and various indent styles, as well as +some of the refinements and fine-tuning available via macros and +inline escapes. + +Because the file also demonstrates a "cutaround" using a small picture +(of Tux), the PostScript file has been included in the directory. + +typeset.mom +----------- + +This file contains samples of three of the document styles available +with the document processing macros, as well as demonstrating the +use of COLLATE. The relatively rare BREAK_QUOTE macro is also used. +The PRINTSTYLE of this file is TYPESET, letting you get a look at mom's +default behaviour when she typesets a document. The last sample, +set in 2 columns, shows a few of the ways in which you can modify +mom's behaviour. + +typewrite.mom +------------- + +Using the first two samples from typeset.mom, this file shows what +"typewritten, double-spaced" documents (PRINTSTYLE TYPEWRITE) look +like. + +letter.mom +---------- + +This is just the tutorial example from the momdocs, ready for +previewing. + +elvis_syntax +------------ + +For those who use the vi clone, elvis, you can paste this file into +your elvis.syn file. Provided your mom documents have the extension +.mom, they'll come out with colorized syntax highlighting. The rules +in elvis_syntax aren't exhaustive, but they go a LONG way to making mom +files more readable. + +I'll be very happy if someone sends me syntax highlighting rules for vim +and emacs. :) diff --git a/contrib/groff/contrib/mom/examples/elvis_syntax b/contrib/groff/contrib/mom/examples/elvis_syntax new file mode 100644 index 0000000..14f7049 --- /dev/null +++ b/contrib/groff/contrib/mom/examples/elvis_syntax @@ -0,0 +1,130 @@ +#Mom +language mom +extension .mom +startword .\ +inword _( +keyword .ALD .ALIAS .ALWAYS_FULLSPACE_QUOTES .ATTRIBUTE_STRING +keyword .AUTHOR .AUTHOR_FAMILY .AUTHOR_FONT .AUTHOR_SIZE .AUTOLEAD +keyword .BLOCKQUOTE .BLOCKQUOTE_FAMILY .BLOCKQUOTE_FONT .BLOCKQUOTE_QUAD .BLOCKQUOTE_SIZE +keyword .B_MARGIN .BR .BR_AT_LINE_KERN .BREAK_QUOTE +keyword .CAPS .CENTER .CENTRE .CHAPTER +keyword .CHAPTER_STRING .CITATION .CITE .CLOSING +keyword .COLLATE .COL_BREAK .COL_BREAK .COL_NEXT .COLUMNS +keyword .COMMENT .CONDENSE .COPYSTYLE +keyword .DATE .DEFAULTS +keyword .DOC_FAM .DOC_FAMILY .DOCHEADER +keyword .DOCHEADER_ADVANCE .DOCHEADER_LEAD +keyword .DOC_LEAD .DOC_LEAD_ADJUST .DOC_LEFT_MARGIN .DOC_LINE_LENGTH +keyword .DOC_LLENGTH .DOC_L_LENGTH .DOC_L_MARGIN .DOC_LMARGIN +keyword .DOC_LS .DOC_PS .DOC_PT_SIZE .DOC_QUAD +keyword .DOC_RIGHT_MARGIN .DOC_R_MARGIN .DOC_RMARGIN +keyword .DOCTYPE .DOCTYPE_FAMILY .DOCTYPE_FONT .DOCTYPE_SIZE +keyword .DRAFT .DRAFT_STRING .DRAFT_WITH_PAGENUMBER +keyword .DROPCAP .DROPCAP_ADJUST .DROPCAP_FAMILY .DROPCAP_FONT .DROPCAP_GUTTER .DROPCAP_OFF +keyword .EL +keyword .ENDNOTE .ENDNOTES +keyword .ENDNOTE_FAMILY .ENDNOTE_FONT .ENDNOTE_PT_SIZE .ENDNOTE_LEAD .ENDNOTE_QUAD +keyword .ENDNOTE_STRING .ENDNOTE_STRING_FAMILY .ENDNOTE_STRING_FONT .ENDNOTE_STRING_SIZE +keyword .ENDNOTE_STRING_QUAD .ENDNOTE_STRING_UNDERSCORE +keyword .ENDNOTE_TITLE .ENDNOTE_TITLE_FAMILY .ENDNOTE_TITLE_FONT .ENDNOTE_TITLE_SIZE +keyword .ENDNOTE_TITLE_QUAD .ENDNOTE_TITLE_UNDERSCORE +keyword .ENDNOTE_NUMBER_FAMILY .ENDNOTE_NUMBER_FONT .ENDNOTE_NUMBER_SIZE +keyword .ENDNOTE_NUMBERS_ALIGN_RIGHT .ENDNOTE_NUMBERS_ALIGN_LEFT +keyword .ENDNOTE_PARA_INDENT .ENDNOTE_PARA_SPACE .ENDNOTES_FOOTER_CENTER .ENDNOTES_HEADER_CENTER +keyword .EPIGRAPH .EPIGRAPH_AUTOLEAD .EPIGRAPH_FAMILY .EPIGRAPH_FONT +keyword .EPIGRAPH_INDENT .EPIGRAPH_QUAD .EPIGRAPH_SIZE +keyword .EW .EXTEND +keyword .FAM .FAMILY +keyword .FINIS .FINIS_STRING +keyword .FOOTER .FOOTER_CENTER .FOOTER_CENTER_CAPS .FOOTER_CENTER_FAM .FOOTER_CENTER_FAMILY +keyword .FOOTER_CENTER_FONT .FOOTER_CENTER_FT .FOOTER_CENTER_PS .FOOTER_CENTER_SIZE +keyword .FOOTER_CENTRE .FOOTER_CENTRE_CAPS .FOOTER_CENTRE_FAM .FOOTER_CENTRE_FAMILY +keyword .FOOTER_CENTRE_FT .FOOTER_CENTRE_PS .FOOTER_CENTRE_SIZE .FOOTER_FAM +keyword .FOOTER_FAMILY .FOOTER_GAP .FOOTER_LEFT .FOOTER_LEFT_CAPS .FOOTER_LEFT_FAM +keyword .FOOTER_LEFT_FAMILY .FOOTER_LEFT_FONT .FOOTER_LEFT_FT .FOOTER_LEFT_PS +keyword .FOOTER_LEFT_SIZE .FOOTER_MARGIN .FOOTER_ON_FIRST_PAGE .FOOTER_PLAIN +keyword .FOOTER_RECTO .FOOTER_RIGHT .FOOTER_RIGHT_CAPS .FOOTER_RIGHT_FAM .FOOTER_RIGHT_FAMILY +keyword .FOOTER_RIGHT_FONT .FOOTER_RIGHT_FT .FOOTER_RIGHT_PS .FOOTER_RIGHT_SIZE +keyword .FOOTER_RULE .FOOTER_RULE_GAP .FOOTERS .FOOTER_SIZE .FOOTER_VERSO +keyword .FOOTNOTE .FOOTNOTE_AUTOLEAD .FOOTNOTE_FAMILY .FOOTNOTE_FONT .FOOTNOTE_MARKERS +keyword .FOOTNOTE_MARKER_STYLE .FOOTNOTE_QUAD .FOOTNOTE_RULE .FOOTNOTE_RULE_ADJ +keyword .FOOTNOTE_RULE_LENGTH .FOOTNOTE_SIZE +keyword .FROM .FT +keyword .GREETING +keyword .HDRFTR_CENTER .HDRFTR_CENTER .HDRFTR_CENTER_CAPS .HDRFTR_CENTER_FAMILY +keyword .HDRFTR_CENTER_FONT .HDRFTR_CENTER_SIZE .HDRFTR_FAMILY .HDRFTR_GAP +keyword .HDRFTR_LEFT .HDRFTR_LEFT .HDRFTR_LEFT_CAPS .HDRFTR_LEFT_FAMILY +keyword .HDRFTR_LEFT_FONT .HDRFTR_LEFT_SIZE .HDRFTR_MARGIN .HDRFTR_PLAIN +keyword .HDRFTR_RIGHT .HDRFTR_RIGHT_CAPS .HDRFTR_RIGHT_FAMILY .HDRFTR_RIGHT_FONT +keyword .HDRFTR_RIGHT_SIZE .HDRFTR_RULE .HDRFTR_RULE_GAP .HDRFTR_RULE_INTERNAL +keyword .HDRFTR_RULE_INTERNAL .HDRFTR_SIZE +keyword .HEAD .HEAD_CAPS .HEADER .HEADER_CENTER .HEADER_CENTER_CAPS +keyword .HEADER_CENTER_FAM .HEADER_CENTER_FAMILY .HEADER_CENTER_FONT +keyword .HEADER_CENTER_FT .HEADER_CENTER_PS .HEADER_CENTER_SIZE .HEADER_CENTRE +keyword .HEADER_CENTRE_CAPS .HEADER_CENTRE_FAM .HEADER_CENTRE_FAMILY +keyword .HEADER_CENTRE_FONT .HEADER_CENTRE_FT .HEADER_CENTRE_PS .HEADER_CENTRE_SIZE +keyword .HEADER_FAM .HEADER_FAMILY .HEADER_GAP +keyword .HEADER_LEFT .HEADER_LEFT_CAPS .HEADER_LEFT_FAM .HEADER_LEFT_FAMILY +keyword .HEADER_LEFT_FONT .HEADER_LEFT_FT .HEADER_LEFT_PS .HEADER_LEFT_SIZE +keyword .HEADER_MARGIN .HEADER_PLAIN +keyword .HEADER_RECTO .HEADER_RIGHT .HEADER_RIGHT_CAPS .HEADER_RIGHT_FAM .HEADER_RIGHT_FAMILY +keyword .HEADER_RIGHT_FONT .HEADER_RIGHT_FT .HEADER_RIGHT_PS .HEADER_RIGHT_SIZE .HEADER_VERSO +keyword .HEADER_RULE .HEADER_RULE_GAP .HEADERS .HEADER_SIZE +keyword .HEAD_FAMILY .HEAD_FONT .HEAD_QUAD .HEAD_SIZE .HEAD_SPACE .HEAD_UNDERLINE +keyword .HI .HY .HYPHENATE .HYPHENATION .HY_SET +keyword .IB .IBX .IBQ .IH .IL .ILX .ILQ +keyword .IQ .IR .IRX .IRQ .IT .IX +keyword .INDENT_FIRST_PARAS .ITALIC_MEANS_ITALIC +keyword .JUSTIFY +keyword .KERN +keyword .LEADER_CHARACTER .LEFT .LIG .LIGATURES .LINEBREAK .LL .LL .L_MARGIN .LS +keyword .MCO .MCR .MCX +keyword .NEWPAGE .NEW_PAGE .NO_SUITE .NUMBER_HEADS .NUMBER_PARAHEADS .NUMBER_SUBHEADS +keyword .PAD .PADMARKER .PAD_STRING .PAGE .PAGE_LENGTH .PAGELENGTH .PAGEWIDTH +keyword .PAGENUM .PAGENUM_FAMILY .PAGENUM_FONT .PAGENUM_HYPHENS +keyword .PAGENUM_ON_FIRST_PAGE .PAGENUM_POS .PAGENUM_SIZE .PAGENUM_STYLE +keyword .PAGINATE .PAGINATION .PAPER +keyword .PARAHEAD .PARAHEAD_FAMILY .PARAHEAD_FONT .PARAHEAD_INDENT .PARAHEAD_SIZE +keyword .PARA_INDENT .PARA_SPACE +keyword .PP .PP_FONT .PP_FT .PT_SIZE .PSPIC +keyword .PRINTSTYLE +keyword .QUAD +keyword .QUOTE .QUOTE_FAMILY .QUOTE_FONT .QUOTE_INDENT .QUOTE_SIZE +keyword .RECTO_VERSO +keyword .RESET_FOOTNOTE_NUMBER .RESET_HEAD_NUMBER .RESET_PARAHEAD_NUMBER +keyword .RESET_SUBHEAD_NUMBER +keyword .REVISION .REVISION_STRING .RIGHT .RLD .R_MARGIN .RW +keyword .SETBOLDER .SETSLANT .SILENT .SLANT_MEANS_SLANT .SMARTQUOTES .SP .SPACE +keyword .SPREAD .SS .ST .START .STRING .SUBHEAD .SUBHEAD_FAMILY .SUBHEAD_FONT .SUBHEAD_SIZE +keyword .SUBTITLE .SUBTITLE_FAMILY .SUBTITLE_FONT .SUBTITLE_SIZE +keyword .SWITCH_FOOTERS .SWITCH_HDRFTR .SWITCH_HEADERS +keyword .TAB_SET .TAB .TABSET .TB .TI +keyword .TITLE .TITLE_FAMILY .TITLE_FONT .TITLE_SIZE .T_MARGIN +keyword .TN .TO .TQ .TRAP .TYPESIZE +keyword .UNDERLINE .UNDERLINE_ITALIC .UNDERLINE_QUOTES .UNDERLINE_SLANT +keyword .UNDERSCORE .UNDERSCORE_2 .UNDERSCORE2 +keyword .WS +font fixed DEFAULT CHAPTER NAMED LETTER +font fixed TYPESET TYPEWRITE +font fixed FINAL DRAFT +font fixed BLOCK QUAD +font fixed LEFT RIGHT CENTER CENTRE JUSTIFY TOP BOTTOM +font fixed OFF QUIT END EXIT DONE NO +font fixed PAGE NUMBER STAR +font fixed COND EXT +font fixed LETTER LEGAL EXECUTIVE LEDGER TABLOID QUARTO FOLIO +font fixed 10x14 A3 A4 A5 B4 B5 +font fixed SINGLESPACE +font fixed FACTOR +font underlined \/ \/. \/? \/! \/, \/; \/: +font underlined \, \,. \,? \,! \,, \,; \,: +font underlined \\ \~ \% \0 \: \( \| \^ \& \% +font underlined \b \c \C \d \D \e \f \f( \h \l \L \p \r \s \s+ \s- \S \u \v \w +font fixed \(bu \(co \(ct \(de \(dg \(di \(em \(en \(mu \(pl \(rg \(sc \(sq +font fixed \(14 \(12 \(34 \(+- +font fixed # ' ^ +font italic " +character \] +comment \# +comment \" +comment \! diff --git a/contrib/groff/contrib/mom/examples/letter.mom b/contrib/groff/contrib/mom/examples/letter.mom new file mode 100644 index 0000000..8833916 --- /dev/null +++ b/contrib/groff/contrib/mom/examples/letter.mom @@ -0,0 +1,34 @@ +.AUTHOR "Yannick P. Guique" +.DOCTYPE LETTER +.PRINTSTYLE TYPESET +.START +.DATE +August 25, 2004 +.TO +GUILLAUME BARRIÈRES +Minidoux Corporation +5000 Pannes Drive +Redmond, Virginia +USA +.FROM +Y.P. GUIQUE +022 Umask Road +St-Sauveur-en-dehors-de-la-mappe, Québec +CANADA +.GREETING +Dear Mr. Barrières, +.PP +It has come to my attention that you have been lobbying the +US government to prohibit the use of open source software by +endeavouring to outlaw so-called "warranty free" applications. +.PP +I feel it is my duty to inform you that the success of your +operating system with its embedded web browser relies heavily +on open source programs and protocols, most notably TCP/IP. +.PP +Therefore, in the interests of your corporation's fiscal health, +I strongly advise that you withdraw support for any US +legislation that would cripple or render illegal open source +development. +.CLOSING +Sincerely, diff --git a/contrib/groff/contrib/mom/examples/macros.mom b/contrib/groff/contrib/mom/examples/macros.mom new file mode 100644 index 0000000..a3976f3 --- /dev/null +++ b/contrib/groff/contrib/mom/examples/macros.mom @@ -0,0 +1,668 @@ +\# Basic page setup +\# +.PAGE 8.5i 11i \" Printer sheet size +.L_MARGIN 1i \" Left margin 1 inch +.R_MARGIN 1i \" Right margin 1 inch (calculates the line length) +\# +\# Refinements +\# +.KERN \" Automatic pairwise kerning +.SS 0 \" No extra space between sentences +.HY \" Hyphenate +.LIGATURES \" Automatic ligature generation +.SMARTQUOTES \" Enable smartquotes +\# +\# Basic type parameters +\# +.FAM T \" Times Roman family +.FT B \" Bold font +.PT_SIZE 12 \" Point size +.LS 14 \" Leading (line spacing) +.LEFT \" Set lines flush left, nofill mode +\# +\# +.ALD |1i-1v \" Advance 1 inch from top of paper to first baseline +Example 1\*[BU 2]: +.ALD .25v \" Advance an extra 1/4 linespace +.UNDERSCORE 3.75p "T\*[BU 4]asting notes using padding, string tabs \ +and multi-columns" +.SP \" Add an extra line space +\# +\# +.FAM H \" Helvetica family +.PT_SIZE 10 +.LS 11 \" New leading +\# +\# The following uses a combination of padding, string tabs, and the FWD escape +\# to set up five tabs with 12-point (1-pica) gutters over the full line length. +\# +.SILENT \" Don't print the next line +.PAD "\*[ST1]VIN#\*[ST1X]\*[FWD 12p]\*[ST2]ROBE#\*[ST2X]\*[FWD 12p]\*[ST3]NEZ#\*[ST3X]\*[FWD 12p]\*[ST4]BOUCHE#\*[ST4X]\*[FWD 12p]\*[ST5]COMMENTAIRES\*[ST5X]" +.SILENT OFF \" Resume normal printing of text +\# +\# Now that the string tabs have been marked off, we "set" them. +\# +.ST 1 L \" First string tab flush left, nofill mode (no need for .BR's between input lines) +.ST 2 L QUAD \" Remaining tabs are flush left/rag right, fill mode +.ST 3 L QUAD +.ST 4 L QUAD +.ST 5 L QUAD +\# +\# +.TAB 1 \" Call first tab +.UNDERSCORE "VIN" +.TN \" Move to next tab and stay on the same baseline +.UNDERSCORE "ROBE" +.TN \" Ibid +.UNDERSCORE "NEZ" +.TN \" Ibid +.UNDERSCORE "BOUCHE" +.TN \" Ibid +.UNDERSCORE "COMMENTAIRES" +.TQ \" Quit tabs +\# +\# +.ALD 6p \" Advance an extra 6 points +.FT R \" Change font to roman (medium) +.MCO \" Turn multi-column mode on +\# +\# +.TAB 1 \" Notice that this tab gets set line-for-line +\*[IT]Peelee Island \" Set italic +\*[PREV]Gewürztraminer \" Revert to former font (roman) +2000 +(Canada) +.MCR \" Return to top of column +.TAB 2 \" Call tab 2; in multi-column mode, don't use .TN +Jaune pâle. +.MCR +.TB 3 \" Notice that from here on, we use the alias TB instead of TAB +Frais, fruité, ci\%tronné, arômes fortes de lichee et de fruits +tropicaux. +.MCR +.TB 4 +Doux, fruité, bien équilibré avec une bonne acidité. +.MCR +.TB 5 +Bon apéro. Servir avec des plats +.RW .1 +indiens ou \%chinois. +.RW 0 +.BR +Excellent rapport qualité/prix. +.MCX 8p \" Multi-column mode off; advance an extra 8 points +.MCO \" Re-invoke multi-columns for next wine description +.TB 1 +\*[IT]Carau Pujol +\*[ROM]Tannat +1995 +(Uraguay) +.MCR +.TB 2 +Rubis foncé, vio\%lacée, presque opaque. +.MCR +.TB 3 +Belles arômes de fruits foncés (prunes, cerises noires, cassis). +Odeurs tertiares de cuir, cèdre, violets, eucalyptus, avec une trace +exotique de Band-Aid*\*[BU 12]. +\# +\# The \*[BU 12], above, pulls the period back so that it falls +\# underneath the asterisk. \*[BP<#>] could have been used instead +\# if you prefer to use points rather than kern units. +\# +.MCR +.TB 4 +Très rond, tannins mûres et veloutés, avec un long finis fruité et +doucement alcoolique. +.MCR +.TB 5 +Superbe\|! Une aubaine à ne pas manquer. Prêt à boire maintenant. +.MCX 1v \" Multi-columns off; advance an extra linespace +\# +\# Now, an example of a hanging indent. This is excessively fussy +\# from a typographic standpoint in that it hangs the asterisk outside +\# the current left margin so that the text following it lines up with +\# with the text in the tasting notes. Notice that in order to use a +\# hanging indent, you must first set a left indent. +\# +.FT I \" Change font to italic +.PT_SIZE -.5 \" Reduce point size by 1/2 point +.LS -.5 \" Reduce leading by 1/2 point +.JUSTIFY \" Set text justified +\# +\# Now, move the left margin back by the width of an asterisk plus 2 points... +\# +.L_MARGIN -(\w'*'+2p) +\# +\# ...and set a left indent equal to the width of an asterisk plus 2 points +\# +.IL \w'*'+2p +\# +\# Now, set the hanging indent equal to the left indent, effectively pulling +\# the first line of the following text back to the new left margin. +\# Subsequent output lines will be indented by the .IL amount. +\# Notice that when using the \w inline escape, there's no need to append +\# a unit of measure to it. +\# +.HI \w'*'+2p +*\*[FWD 1p]The term "Band-Aid" means the slightly sweet, vaguely chemical +smell associated with medical-grade plastics. It is often found in +wines from terroirs in South America. Provided a wine has a sufficient +concentration of fruit +.RW .04 \" Kern the whole next line slightly, so "lipstick" doesn't hyphenate. +aromas and complex tertiary characteristics, Band-Aid is a Good Thing. +Otherwise, it smells like cheap lipstick. +.RW 0 \" Reset kerning to 0 +\# +\# Notice, above, that although the values for IL and HI are the width +\# of an asterisk plus 2 points, when setting the first line of text +\# (the one with the asterisk at the beginning), we put only 1 point of +\# space after the *. This is to compensate for the fact that in the +\# italic font, the letter T doesn't align visually with the rest of +\# the text. As already noted, this is an extremely fussy example. :) +\# +\# +\# +.IQ CLEAR \" Cancel and clear stored indent values +.L_MARGIN 1i \" Reset left margin to its original value. +\# +\# +.ALD 2P \" Add 2-picas extra space before next example +.FAM T +.FT B +.PT_SIZE 12 +.LS 14 +Example 2: +.ALD .25v +\# +.COMMENT \" COMMENT lets you enter comments without using \# or \" +In the next line, because the string to be underscored must be +enclosed by double-quotes, you can't use the double-quote character +itself around the word "Massaging". We circumvent this by using the +groff inline escapes \(lq and \(rq (leftquote and rightquote). +.COMMENT OFF \" Remember to turn COMMENT off! +\# +.UNDERSCORE 3.75p "\(lqMassaging\(rq \*[BCK 1p]a passage of rag right text" +.SP \" Add an extra linespace +\# +\# +.PT_SIZE 12.5 +.LS 14 +.PT_SIZE -1 \" Reduce point size by 1 point +Passage using groff defaults +.ALD .5v \" Add an extra 1/2 line space +.PT_SIZE +1 \" Restore point size +.QUAD LEFT \" Set quad left, fill mode +.IB 3P \" Indent 3 picas from both the left and right margins +.FT R +The thousand injuries of Fortunato I had borne as I best could; +but when he ventured upon insult, I vowed revenge. You, who so well +know the nature of my soul, will not suppose, however, that I gave +utterance to a threat. \*[IT]At length\*[PREV] I would be +avenged; this was a point definitively settled\(embut the very +definitiveness with which it was resolved, precluded the idea of +risk. I must not only punish, but punish with impunity. A +wrong is unredressed when retribution overtakes its redresser. +It is equally unredressed when the avenger fails to make himself +felt as such to him who has done the wrong. +.ALD 6p +\# +\# The next line is set quad right, nofill mode, 1/2 point smaller +\# than the preceding text (using the \*S[...] inline escape. +\# +.RIGHT +\*S[-.5]\(emEdgar Allen Poe, \*[IT]The Cask of Amontillado\*[PREV]\*S[+.5] +.SP \" Extra linespace +.IBQ \" Disable "indent both" +\# +\# The passage above, while acceptable in a longer document, exhibits a +\# few typographic flaws. The shape of the right margin rag exhibits +\# a decidedly "rounded" appearance. The word "I" stands alone at the +\# end of the third line. The space between the 1st and 2nd sentences +\# ("...revenge. You...") is too large, owing to the letter "Y" that +\# begins the 2nd sentence. The spacing between "A wrong..." (line 6) +\# is equally too large because of the way "A" and "w" fit together. +\# The em-dash before Edgar isn't vertically centered with the letter "E". +\# And so on. The most important correction below is fixing the rag +\# so that longer and shorter lines alternate. This is accomplished by +\# manually breaking lines and then slightly lengthening and shortening +\# them until a pleasing rag is achieved. The remainder of the little +\# flaws are fixed with inline escapes. +\# +.FT B +.PT_SIZE -1 +.LEFT +The same passage, \*[BU 4]"massaged" +.ALD .5v +.FT R +.PT_SIZE +1 +.QUAD LEFT +.HY OFF \" Turn automatic hyphenation off +.BR_AT_LINE_KERN \" Automatically insert a line break (.BR) with each invocation of .RW and .EW +.WS +1 \" Increase word space slightly +.IB \" Turn "indent both" back on; values are the same as before +\# +\# +The thousand injuries of Fortunato I had borne as I best could; but +when he ventured upon insult, I \*[BU 2]vowed revenge. \*[BU 4]Y\*[BU 6]ou, +\*[BU 4]who so \*[BU 2]well know the nature +.EW .2 +of my soul, \*[BU 2]will not suppose, however, that I gave utterance to +a threat. \*[IT]At +.EW .2 +length\*[PREV] I would be avenged; this was a point definitively +settled\(embut the +.EW .2 +v\*[BU 1]ery definitiveness with which it was resolved, precluded the idea +of risk. +.EW 0 +I must not only punish, but punish with impunity. A \*[BCK 1p]wrong is +unredressed +.EW .1 +when retribution overtakes its redresser. It is equally unredressed +when the +.RW .1 +avenger fails to make himself felt as such to him \*[BU 2]who has done +the wrong. +.RW 0 +.WS +0 \" Restore normal wordspacing +.ALD 6p +.PT_SIZE -.5 +.RIGHT +\*[UP 1.5p]\(em\*[DOWN 1.5p]\*[BCK 1p]Edgar \*[BCK 1p]Allen Poe, \*[IT]The Cask of Amontillado\*[PREV] +.IQ CLEAR \" Cancel and clear stored values of all indents +\# +\# +.NEWPAGE \" Start a new page +.T_MARGIN 1i \" Set top margin to 1i (approx. equivalent to .ALD |1i-1v above +\# +\# +.FAM T +.FT B +.PT_SIZE 12 +.LS 14 +.LEFT +Example 3: +.ALD .25v +.UNDERSCORE 3.75p "A \*[BU 2]recipe for enumerated lists using indents" +.SP \" Add an extra line space +.FAM N \" New Century Schoolbook family +.FT R +.PT_SIZE 11 +.LS 13 +.HY \" Turn hyphenation back on +.JUSTIFY \" Justify text +This example demonstrates the use of left and hanging indents for +simple enumerated lists. Nested lists are possible, as the example +shows; however, the more complex the nesting, the wiser it becomes +to use (string) tabs, as seen in Example 4. +\# +\# +.JUSTIFY \" Justify text +.IL \w'\0.\0' \" Establish a left indent equal to the width of 2 figure spaces plus a period. +.HI \w'\0.\0' \" Establish a hanging indent equal to the size of the left indent. +.ALD 6p +\# +\# +1.\0This is the first item in the list. N\*[BU 2]otice how the first line +"hangs" back from the remaining text, which is otherwise +indented by the width of by two figure-spaces (digit-width +spaces) and a period. +.BR +.HI \" Notice that HI doesn't require an argument once the value's been set +.ALD 6p +2.\0This is the second item in the list. As with the above item, +notice the use of the \*[BU 8]\\0 escape sequence in the input text. It's +there to ensure that the space after the number/period combination +always remains the same (i.e. doesn't stretch when the line is +justified). That way, the text of each item always lines up perfectly. +\# +\# +.COMMENT +Now we're going to set a bullet-point list, indented from the text +above by 1 pica. IL arguments are always added to whatever value +is in already effect for IL, hence all we have to do is tell mom to +indent (from the current left indent) 1 pica plus the width of the +bullet character ( \(bu ). \*[FWD 3p] puts three points of space after +the bullet so that the bullet and the text are visually separated. +.COMMENT OFF +\# +\# +.IL 1P+\w'\(bu\*[FWD 3p]' +\# +\# Hanging indents are always relative to the current left indent. +\# The additional 1-pica indent, above, already having been taken +\# care of, we only want to hang the first lines of bullet list items +\# back by the width of the bullet character plus its 3 extra +\# points of space. +\# +.ALD 6p +.HI \w'\(bu\*[FWD 3p]' +\*[DOWN 1p]\(bu\*[UP 1p]\*[FWD 3p]This is the first line of a sublist with bullets. +N\*[BU 2]otice how the first line (the one with the bullet) is indented +exactly one pica from the text of the list item above it, while the +remaining lines align with the left indent we set above. +.ALD 6p +.HI +\*[DOWN 1p]\(bu\*[UP 1p]\*[FWD 3p]This is the second item of the sublist with bullets. \*[BU 4]We +could go on indefinitely, but let's go back to the top level (numbered) +list... +\# +\# The easiest way to return to a previous indent value is by subtraction. +\# The argument to IL, above, was 1P+\w'\(bu\*[FWD 3p]', so we just reverse +\# it by putting a minus sign in front. The parentheses are required +\# for groff to evaluate the expression properly. +\# +.IL -(1P+\w'\(bu\*[FWD 3p]') +.HI \w'\0.\0' \" Reset hanging indent for use with numbered items. +.ALD 6p +3.\0...and here we are. +.HI \" Again, notice that once HI has been set, you don't have to keep passing it an argument. +.ALD 6p +4.\0In order not to make the example too long, we'll stop here. +.IQ CLEAR \" Don't forget to cancel and/or clear indents! +\# +\# +.FAM T +.FT B +.PT_SIZE 12 +.LS 14 +.LEFT +.SP +\# +\# +Example 4: +.ALD .25v +.UNDERSCORE 3.75p "A \*[BU 2]recipe for nested lists using string tabs" +.SP +.FAM N +.FT R +.PT_SIZE 11 +.LS 13 +.JUSTIFY +Although setting up string tabs is a bit more complex than setting +up indents, it's \*[BU 3]well worth the effort, especially for nested lists. +.ALD 6p +\# +.COMMENT +The PAD line, below, sets up two string tabs. The first (ST1) +is exactly the length of two figure spaces and a period. The +second (ST2) is simply "the remainder of the line." +.COMMENT OFF +\# +.SILENT +.PAD "\*[ST1]\0.\0\*[ST1X]\*[ST2]#\*[ST2X]" +.ST 1 L \" String tabs must be "set" after being marked off in a line +.ST 2 J \" ST 1 will be set flush left, nofill; ST 2 will be justified. +.SILENT OFF +\# +\# +.TB 1 +1. +.TN \" Use .TN here so text stays on the same baseline as the number in tab 1 +This is the first item in the list. N\*[BU 2]otice how, just as in Example 3, +the first line hangs back from the remaining text, which is otherwise +indented. +.ALD 6p +.TB 1 +2. +.TN +This is the second item in the list. N\*[BU 2]otice that when setting "lists" +with tabs, there's no need to use the \*[BU 8]\\0 escape sequence after +the number/period combination in the input text. +.ALD 6p +\# +.COMMENT +Now, set up the indented bullet-point sublist. The PAD line +says: move forward 12 points (1 pica), then mark off a string +tab (ST3) that's the length of the bullet character; move foward +another three points, then make the next string tab (ST4) the +length of remainder of the line. +.COMMENT OFF +\# +.SILENT +.PAD "\*[FWD 12p]\*[ST3]\(bu\*[ST3X]\*[FWD 3p]\*[ST4]#\*[ST4X]" +.ST 3 L +.ST 4 J +.SILENT OFF +.ALD 6p +.TB 3 +\*[DOWN 1p]\(bu\*[UP 1p] +.TN +This is the first line of a sublist with bullets. N\*[BU 2]otice how the +bullets and the text line up exactly the same as in Example 3. +.ALD 6p +.TB 3 +\*[DOWN 1p]\(bu\*[UP 1p] +.TN +This is the second item of the sublist with bullets. For the fun of +it, lets add in an +.SPREAD +en-dashed sub-sublist. +.BR \" We're in a fill mode right now, so you *must* terminate the line with BR +\# +\# +.SILENT +.PAD "\*[FWD 12p]\*[ST5]\(en\*[ST5X]\*[FWD 4p]\*[ST6]#\*[ST6X]" +.ST 5 L +.ST 6 J +.SILENT OFF +.ALD 6p +.TB 5 +\*[UP .75p]\(en\*[DOWN .75p] +.TN +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, +sed diam voluptua. +.ALD 6p +.TB 5 +\*[UP .75p]\(en\*[DOWN .75p] +.TN +At \*[BU 3]vero eos et accusam et justo duo dolores et ea rebum. Stet clita +kasd gubergren, no sea takimata sanctus est lorem ipsum dolor sit amet. +.ALD 6p +.TB 1 +3. +.TN +And here we are, back at the top-level numbered list with a minimum +of muss and fuss, +.ALD 6p +.TB 1 +4. +.TN +Generally speaking, once you get the hang of string tabs and the +\*[BD]PAD\*[PREV] macro, you'll find setting up complex nested lists +(or anything similar to them) easier than with hanging indents. +.TQ +\# +.NEWPAGE +.FAM T +.FT B +.PT_SIZE 12 +.LS 14 +.LEFT +Example 5: +.ALD .25v +.UNDERSCORE 3.75p "Word spacing" +.ALD 8p +.FAM P \" Palatino family +.PT_SIZE 11 +.LS 14 +\# +\# The "label" lines for the following are set in Helvetica bold, one +\# point smaller than the examples themselves. This demonstrates the +\# use of the groff inline escape \f[...] to change both family and +\# font inline. It also shows using the mom inline \*S[...]. +\# +\f[HB]\*S[-1]Normal word spacing\*S[+1]\*[PREV] +.FT R +N\*[BU 1]o\*[BU 1]w \*[BU 1]is the time for all good men to come to the aid of the party. +.ALD 4p +\f[HB]\*S[-1]Word spacing adjusted by \*[UP 1p]\*[BU 3]+\*[DOWN 1p]\*[BU 1]2\*S[+1]\*[PREV] +.FT R +.WS +2 +N\*[BU 1]o\*[BU 1]w \*[BU 1]is the time for all good men to come to the aid of the party. +.WS +0 +.ALD 4p +\f[HB]\*S[-1]Word spacing adjusted by \*[UP 1p]\*[BU 3]+\*[DOWN 1p]4\*S[+1]\*[PREV] +.FT R +.WS +4 +N\*[BU 1]o\*[BU 1]w \*[BU 1]is the time for all good men to come to the aid of the party. +.WS +0 +.ALD 4p +\f[HB]\*S[-1]Word spacing adjusted by \*[UP 1p]\*[BU 3]+\*[DOWN 1p]6\*S[+1]\*[PREV] +.FT R +.WS +6 +N\*[BU 1]o\*[BU 1]w \*[BU 1]is the time for all good men to come to the aid of the party. +.WS +0 +.SP 1.5v +\# +\# +.FAM T +.FT B +.PT_SIZE 12 +.LS 14 +.LEFT +Example 6: +.ALD .25v +.UNDERSCORE 3.75p "Line kerning" +.ALD 8p +.FAM P \" Palatino family +.FT R +.PT_SIZE 11 +.LS 15 +\# +\# Here, we set up some tabs so the examples can go into facing columns. +\# +.TAB_SET 1 0 19.5P L +.TAB_SET 2 19.5P 19.5P L +\# +\# +.MCO \" Turn multi-columns on +.TB 1 +\f[HB]\*S[-1]Unkerned line\*S[+1]\*[PREV] +.FT R +"But this is \*[IT]important!\/"\*[PREV]she exclaimed. +.ALD 4p +\f[HB]\*S[-1]Line "tightened" \(en .RW .1\*S[+1]\*[PREV] +.RW .1 +"But this is \*[IT]important!\/"\*[PREV]she exclaimed. +.ALD 4p +\# +\# In the next line, notice that because it uses a different family +\# (Helvetica instead of Palatino), the RW macro doesn't affect it. +\# +\f[HB]\*S[-1]Line "tightened" \(en .RW .2\*S[+1]\*[PREV] +.RW .2 +"But this is \*[IT]important!\/"\*[PREV]she exclaimed. +.ALD 4p +\f[HB]\*S[-1]Line "tightened" \(en .RW .3\*S[+1]\*[PREV] +.RW .3 +"But this is \*[IT]important!\/"\*[PREV]she exclaimed. +.MCR +.TB 2 +\f[HB]\*S[-1]Unkerned line\*S[+1]\*[PREV] +"But this is \*[IT]important!\/"\*[PREV]she exclaimed. +.ALD 4p +\f[HB]\*S[-1]Line "loosened" \(en .EW .1\*S[+1]\*[PREV] +.EW .1 +"But this is \*[IT]important!\/"\*[PREV]she exclaimed. +.ALD 4p +\f[HB]\*S[-1]Line "loosened" \(en .EW .2\*S[+1]\*[PREV] +.EW .2 +"But this is \*[IT]important!\/"\*[PREV]she exclaimed. +.ALD 4p +\f[HB]\*S[-1]Line "loosened" \(en .EW .3\*S[+1]\*[PREV] +.EW .3 +"But this is \*[IT]important!\/"\*[PREV]she exclaimed. +.MCX 1.5v +\# +\# +.FAM T +.FT B +.PT_SIZE 12 +.LS 14 +.LEFT +Example 7: +.ALD .25v +.UNDERSCORE 3.75p "Cutaround using left\*[FU 2]/right indents, multi columns \ +and a dropcap" +.SP +\# +\# +.FT R +.PT_SIZE 11 +.LS 12 +.BR_AT_LINE_KERN OFF \" In justified text, it's best to have this OFF +\# +\# +.TAB_SET 1 0 18.5P J +.TAB_SET 2 20.5P 18.5P J +.MCO +.ALD 5P+9p +\# +\# The little picture of tux. +\# +.PSPIC penguin.ps +.MCR +.TAB 1 +.DROPCAP_FONT B +.DROPCAP L 3 COND 80 \" i.e. the letter L dropped 3 lines, condensed to 80% of its normal width +.EW .2 +orem ipsum dolor sit amet, consetetur sa\%dip\%scing elitr, sed diam +nonumy eir\%mod tempor invidunt ut labore et dolore magna aliquyam erat, +sed diam voluptua. +.EW 0 +.TI 1P +At vero eos et accusam et justo duo dolores et ea rebum. Stet clita +kasd gubergren, no sea taki- +.SPREAD \" Force justify preceding line before starting indent +.IR 3.5P +kimata sanctus est lorem ipsum dolor sit amet. +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor. +.EW .2 +.TI +Invidunt ut labore et dolore magna ali\%qu\%yam erat, sed diam voluptua. +At +.EW 0 +vero eos et accusam et justo duo dolores et ea rebum. +.TI +Stet clita kasd gubergren, no sea ta- +.SPREAD \" Force justify preceding line before quitting indent +.IRQ +kimata sanctus est lorem ipsum dolor sit amet. Lorem ipsum dolor +sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +in\%vi\%dunt ut labore et dolore magna aliquyam erat. Sed diam voluptua, +at vero eos et accusam et justo duo +.SPREAD +.EW .3 +dolores et ea rebum. Stet clita no kasd guber- +.SPREAD +.MCR +.TB 2 +gren, no sea takimata sanctus est lorem ipsum +.EW 0 +dolor sit amet. Consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et dolore. +.TI +Magna aliquyam erat, sed diam voluptua, at vero eos et accusam. +Et justo duo dolores et ea +.SPREAD +.IL 3.5P +rebum, stet clita kasd gubergren. No sea +takimata sanctus est, lorem ipsum dolor sit amet. +.TI +Sit amet, consetetur sadipscing elitr, sed diam. Nonumy eirmod tempor +in\%vi- +.EW .3 +dunt ut labore et dolore magna. Ali- +.EW 0 +quyam erat sed diam voluptua. +At vero eos et accusam et justo duo dolores et ea rebum stet. +.ILQ +.TI +Dolores et ea rebum stet clita kasd gubergren, no sea takimata +sanctus. Sadipscing elitr sed diam, nonumy eirmod tempor, invidunt +ut labore et dolore magna aliquyam erat. Sed diam voluptua, at vero +eos et accusam et justo duo dolores et ea rebum. diff --git a/contrib/groff/contrib/mom/examples/penguin.ps b/contrib/groff/contrib/mom/examples/penguin.ps new file mode 100644 index 0000000..2728930 --- /dev/null +++ b/contrib/groff/contrib/mom/examples/penguin.ps @@ -0,0 +1,461 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: GIMP PostScript file plugin V 1.06 by Peter Kirchgessner +%%Title: /home/peter/Pics/penguin_small2_bw.ps +%%CreationDate: Wed Apr 17 19:49:51 2002 +%%DocumentData: Clean7Bit +%%LanguageLevel: 2 +%%Pages: 1 +%%BoundingBox: 0 0 81 96 +%%EndComments +%%BeginPreview: 90 107 1 107 +% aaaaaaaaabff555555555540 +% 5b6db6db5edbf6b6b6b6b680 +% aaaaaaaab7ff7ad555555540 +% b55555557eddeeaadadadac0 +% 56db6db6dbffdf56ab555540 +% aaaaaaaaffb755dab556ab40 +% 5b555b55f77ed7d556b56d40 +% aab6d56dbfffaaeb6ad5aa80 +% 6d555aabf6edd5daad56ab40 +% aadaab56ffdfaff555aab540 +% 5555b56bddfdff76dab55680 +% b6aaaaaffbbbbbed5556dac0 +% 55b6d6d5bff7f77aab6aaa80 +% aaaaaaaff77f6ffd6d555540 +% 5b555b576defeedaaaadb680 +% aab6d56dfbfd3bfdb56aaac0 +% 55555aab8eda4fb556ab5540 +% b6daab5743f40b7eaad56d80 +% 5555b56f037007fadaad5540 +% aaaaaaab11e0c6ed55b5aa80 +% 5b6d6db731b1a3feaaaab6c0 +% aaab55566963a3badb555540 +% 6d556aaf35d2e37d556daa80 +% aadaadb57959f3f6aaaab6c0 +% 5555aaab3403c37d6dab5540 +% 6daab5571428c3eeaab56a80 +% aab6d6db908007fd5556ad80 +% ad5555574000176edb6ad540 +% 55aaadab920003fd55555a80 +% b56db55b2000136eaaadab40 +% 56aaaaab400047fdb6d55540 +% aad556d7040112df555ab680 +% 6d5b6ab5d00447bb55ab5540 +% aaaaad57402915cf6d556a80 +% adb555ab9a9243a7aab6ad80 +% 5556dab6902485ead5aad540 +% b5aaab57854901d7daad5a80 +% 56b5556d929201bfab55ab40 +% aaab6d57004400fb756ab540 +% 6d6d55af0a1000efeaad5680 +% aaaaaaba0080005ef6d5aac0 +% adb5b6d60220003fdaaab540 +% 5556aabc0000003bfd5b5680 +% b5aab57c0000003f76d56ac0 +% 56b556e80000001beeaaad40 +% aaab6bf80000001f7f5b5580 +% 6d6d55b00000001dfbaab540 +% aaaaaff00000001bdf6d5680 +% 55b5b5b00000000ffbd5aac0 +% b6aaafe40000000f6ff55a80 +% aad6df7000000246fedaab40 +% 555ab6d000000003aff5b540 +% b6aaafe000000013edbaaa80 +% 556b7d8000000001b7f6d6c0 +% aaad5bc000000001fbbd5a80 +% 6db57f0000000000d77aaac0 +% aaaab58000000000edf6d540 +% 5556f7000000000056fead80 +% b6dab600000000006edb5540 +% aaaaee00000000007ffeb680 +% 5555ee000000000076bb5540 +% b6dabc00000000003f7f6a80 +% 5555d800000000003b7756c0 +% aaabfc00000000003f7eda80 +% 6db6b0000000000036f7aac0 +% aaabd800000000003ffeab40 +% ad57b800000000003d6fda80 +% 55b7d8000000000037fdaac0 +% b55eb800000000003edfab40 +% 56afb000000000003bfbb540 +% aaddb000000000003edf5680 +% 6d5bd8000000000035fdaac0 +% aaafe800000000003b5bb540 +% 55ba5000000000006fef5680 +% b6a83800000000005f736ac0 +% aaa00c00000000003dfdad40 +% 55680e00000000003bd65580 +% b6a107000000000077bc5a80 +% 55a013c0000000023ff82b40 +% a80401a0000000005db45540 +% 429021f0000000043ff02d40 +% 900000f80000000096c4aa80 +% a00080be000000082a902d80 +% 004204770000000244401540 +% a200003e8000001411001540 +% 4004105fc000000044444b40 +% 8800001b8000000a00800540 +% 5040411f4000001012000280 +% 80040007c000001440044080 +% 5080040d0000003100100040 +% 800040200000007400400400 +% 51080002000000e804008040 +% 80008440000003f210000080 +% 50000005000007d400080940 +% 0111000080001ef020808280 +% a00008894000ffd480001540 +% 02000000fa57bb680108aa80 +% a0222002bfffffe900012b40 +% 0a4001115ffdedd20824d540 +% d0888004bb6fbfb4008b5a80 +% ad251202bffdfbe921255580 +% b554a05576ab576a045aaa80 +% aaaa950aaaad5aaaa955b6c0 +% 56d56a556d6aaad48556aa80 +% b55b5555aaab6b5ab55aad40 +% 55aaaaaab5b555554aaad580 +% ad556d5b56aaad6b556b5a80 +%%EndPreview +%%BeginProlog +% Use own dictionary to avoid conflicts +5 dict begin +%%EndProlog +%%Page: 1 1 +% Translate for offset +0.000000 0.000000 translate +% Translate to begin of first scanline +0.000000 95.872000 translate +80.640000 -95.872000 scale +% Variable to keep one line of raster data +/scanline 90 1 mul string def +% Image geometry +90 107 8 +% Transformation matrix +[ 90 0 0 107 0 0 ] +{ currentfile scanline readhexstring pop } +image +72727272717171717171717172717171717171717171717172717171727271717171727273736f +675852524e4653535a676b73737272727272727272727272727272727272727272727272727272 +727272727272727272727272 +7172717271717171717171717271717171717171717171717271717171717172727272726d5d4a +4039393939373a3a3c3f4653637172727272727272727272727272727272727272727272727272 +727272727272727272727272 +7171717271717171717171717271717171717171717171717271717171717173747271644b3f3a +3a393a3a3a393b3b3b38393b3d4d64707272727272727272727272727272727272727272727272 +727272727272727272727272 +727272727171717171717171727171717172717171717171727171717171727372705b3b3d3b3a +3939393939393938393939383a3c3f546d71747272727272727272727272727272727272727272 +727272727272727272727272 +727271727171717171717171727171717171717171717171727171717171727173553e3d383a39 +393a383838383838393940564d3f38394668727272727272727272727272727272727272727272 +727272727272727272727272 +71717171717171717171717172717171717171717171717172717171717172715f3d38393b3b39 +3a393939393939393a3c5574807252403742627272727272727272727272727272727272727272 +727272727272727272727272 +727271727171717171717171727171717171717171717171727171717172726c403c373a3a3a3a +3a3a3a3a3a3a3a3a393e5e82958c72543a38416a72737272727272727272727272727272727272 +727272727272727272727272 +727171727171717171717171727171717171717171717171727171717271735a3d383b3a3a3a3a +3a3a3a3a3a3a3a3a383c5f87978e7c65493a3c5070737272727272727272727272727272727272 +727272727272727272727272 +7171717271717171717171717271717171717171717171717271717172736c4638373b3a3a3a3a +3a3a3a3a3a3a3a3a3a436384897d6d644f3a3b3e60727472727272727272727272727272727272 +727272727272727272727272 +727171727171717171717171727171717171717171717171727171717273603a3839393a3a3a3a +3a3a3a3a3a3a3a3b39425c6f68574745403b3c3848707472727272727272727272727272727272 +727272727272727272727272 +7271727271717171717171717271717171717171717171717271717172724d373938393a3a3a3a +3a3a3a3a3a3a3a393a3d494e3e3e3c3b393c3a393b617272727272727272727272727272727272 +727272727272727272727272 +71717171717171717171717171717171717171717171717172717171727241393839393c3a3a3a +3a3a3a3a3a3a3a393b3a3a3d3b3a3d393c3b393b3a4b7374717272727272727272727272727272 +727272727272727272727272 +7272727271717171717171717271717171717171717171717271717172703a3b3937393b393a3a +3a3a3a3a3a3a3a3a3a3b3a3a393d3a3b3b3b393a393e6d74727272727272727272727272727272 +727272727272727272727272 +7272727271717171717171717271717171717171717171717271717171633c3a3a38383d413c3a +3a3a3a3a3a3a3a3a3a3b3e4142393c3c3b3b3939393c6074707272727272727272727272727272 +727272727272727272727272 +7272727271717171717171717271717171717171717171717271717171623b373b3e40475d5a3f +3b3b3a3a393b3b3b373839486b6d3d393b3b3a38393b5c73717272727272727272727272727272 +727272727272727272727272 +7272727271717171717171717271717171717271717171717271717172623b373c3a3d3f425d65 +3f393a3a3d393b3e5b75795a3e6562393b3b3b39393d4f71727272727272727272727272727272 +727272727272727272727272 +7272727271717171717171717272717171717271717171717271717172623c3838538a9e7e4960 +4e3c3a3a3c3a57879ea9b0b68e445b463b3b3b3a3b3d4a72727272727272727272727272727272 +727272727272727272727272 +7272727271717171727171717272717171727171717271717271717172613c374d96b6cabb8e48 +463b3a3a3a5291abb6c0c7d1be7f3f473b3b3a38393a4672727272727272727272727272727272 +727272727272727272727272 +7272727271717171717271717271717171717171717171717271717172603c3770acd1e3dfcc84 +3a3b3a3a3d85c0e7f4f7f7f2d9a4593a3b3b393839393f6b727272727272727272727272727272 +727272727272727272727272 +7272727271717171717171717271717171717171717171717271717172603c3c9aebdbc5eefdda +45393a3a45b8f7fcda8386d1faec8b373b3b3a3938383e6b727272727272727272727272727272 +727272727272727272727272 +7272727271717171717171717271717171717171717172717271717172613946c8db4e7188eaf9 +60443c3e4dc7fbe953468a7fcdfdc7433b3b3a3839383c6a727272727272727272727272727272 +727272727272727272727272 +7272727271717171717171717271717171717171717171717271717172603a4bd59a387184a5fb +755363655bc9fb9c3d3a5c907ffbe7543b3b3a3939383c6a717272727272727272727272727272 +727272727272727272727272 +7171717171717171717171717171717171717171717171717171717171673b4ad5833e4a7f75f8 +6f484b575cb3f67b363c445b68f4ed553a3a3a3939393b6a717272727272727272727272727272 +727272727272727272727272 +7272727272717171717171717271717171717171717272717271717171714245cc953c3d5667ce +666e6f6c6282e97a3b3a3a3b5bf5ea58393a393a393c386a737272727272727272727272727272 +727272727272727272727272 +727272727171717171717171727171717171717171717171727171717171413eb7c4453b416fa6 +c3c9c6c2bcb1c19d3a3c3b3e8cfbdc4c3939393a39393969727272727272727272727272727272 +727272727272727272727272 +727272727171717171717171727171717171727171717171727171717171413a8df18e477da2af +cdcecbbfa6b2cfc289534273ebf9ac3f3939393939383b62727272727272727272727272727272 +727272727272727272727272 +72727272717171717171717172717171717172717171717172717171717142385bdae697a9c1cd +cfcecfd3d4d7dcd9d5c5a8c5e4dc633838393a39393a365b727272727272727272727272727272 +727272727272727272727272 +72727272717171717171717172717171717171717171717172717171717142363e99a4a8b9cacf +cecfd2d8dcdfe2dfdedad6cdc3ac693f39393939393a375b727272727272727272727272727272 +727272727272727272727272 +7272727271717171717271717271717171717171727171717271717171714137538fa4b4c2cbcf +cfd1d5dadee2e1dfdedededfdcdab5553a3a39393a3c3859727272727272727272727272727272 +727272727272727272727272 +7272727271717171717171717271717171717271717171717271717171714b43839facbdc8cfcf +d0d3d7dae2e2dfdedededed1b1c5c05e3c3b393a3c393c4c717272727272727272727272727272 +727272727272727272727272 +727272727171717171717171727271717171717171717171727171717172524c94a0b2c1cbcfcf +d1d5d9dee1dfdedededabea8aebbad4f3b3c3a393a3a3d426b7273727272727272727272727272 +727272727272727272727272 +72727272727171717271717172727171717171717172717172727171717254478ea5b9c3ced0d1 +d3d6dbe0dededddccfabaab7bbbaaa4b3c3b393a37393f3b597174727272727272727272727272 +727272727272727272727272 +727272727171717171727171727171717171717171717171727171717171503b5c84aec9d0d1d1 +d6d9dddcded9d1b0a0b1b8bbbab387403a3b6c7446333938477173727272727272727272727272 +727272727272727272727272 +7272727271717171717171717271727171717171717171717271717171714f3d457986a3c5d1d6 +d8d9d8d1bfa795a2b4b7bab7adac8642383863978e6f413c3c6973727272727272727272727272 +727272727272727272727272 +727272727171717171717171727171717171717171717271727172717272523b4390a58a8e9da8 +aba4a29d9ca5aeb3b2afabb7c4c2bb5d3b3645849b99663a3c4e72727272727272727272727272 +727272727272727272727272 +727272727171717171717171727171727171717171717271727171717273543c49adbfa29097b4 +c0b9b5b3b4b0afada5aabec7cfcac3763a3b3c5e999a8745393d65727272727272727272727272 +727272727272727272727272 +727272727271717171717171727271717172717171717171727172727171483856aac1bfa18e9e +b1b4b2afa9a3a0a4b3c1c1c5d3ded4ac413a3b4079895a38353948707472727272727272727272 +727272727272727272727272 +7272727271727171717171717272727171717171717171717272737272633f3c4ea8c5c1c0a790 +919698959193a7bac2c1c9e1f4fbfbde6c3b3c3a39423c3b3a393e617473727272727272727272 +727272727272727272727272 +7272727271717171717171717271727171717171717172717272717270453b394dc1d9c8c2c2bc +a79b9b9dabbac0c1c2cde3f8fdfdfdfabf453b3b3b3b3b3b3a393d4c7071727272727272727272 +727272727272727272727272 +727272727171717171717172727171717171717171717171727270715b3d3b398ff5e7cec3c3c1 +c3c1c2c2c3c2c2c8d4e4f5fdfdfdfdfdf9723f3b3b3b3b3b3b3a39435a74747272727272727272 +727272727272727272727272 +7272727271717171717171717271717171717171717171717271726750463658e0fbf7e4c6c2c3 +c3c2c3c2c2c4ceddedf7fdfdfdfdfcfdfccb4a3b3d383b3b3a3a3a3e4a6b727271727272727272 +727272727272727272727272 +72727272717171717171717172717271717171717171717172716d4b544340b1f7fcfdf7d5c2c2 +c2c2c2c2c6d5e7f5fcfdfdfdfdfdfdfcfbf7833d3d3b3b3b393b393a3b4e717272717272727272 +727272727272727272727272 +7272727271717171717271727271727171717171717171727371483a3a3673f4fdfcfbfceccfc5 +c2c1c2cde3f3fafdfdfdfcfdfdfdfdfcfdfccb40393a3b3b39393a393b3c607271727272727272 +727272727272727272727272 +727272727171717171727171727171717171717171717171705a3e3f3c45d0fcfdfdfcfdfcf5e6 +d9dce5f1fafcfcfcfdfdfcfdfdfdfdfdfdfdf66937393b3b393939393a3a486a72717272727272 +727272727272727272727272 +7272727271717171717171717271717171717171717171725f3e3a3c3985fbfcfdfcfdfdfdfdf9 +f1f8fcfdfdfcfcfcfcfdfdfdfdfdfdfdfdfdfd933b3a3b3b3a3a3a3a393a3d4a6b717272727272 +727272727272727272727272 +717171717171717171717171717171717171717172727267443b3b394cd2fafcfdfdfdfdfdfdfb +fafcfdfdfdfcfcfcfcfcfdfdfdfdfdfdfdfdfbc73b3b3a3a3a393a3a3a393c3e52727272727271 +727272717171717172717271 +727172727171717171717171727171717172727175736d423a3a383c7de7f9fefefdfdfdfdfdfc +fbfcfdfdfdfcfdfdfcfdfdfdfdfdfdfdfdfcf8e24d3c3b3b3a3a3a3a3b3b393a3b537173727272 +727272727272727272727272 +7272727271717171717171717271727171727271726e4d3b3b3a3646a0e2f8fdfefdfcfcfdfdfc +f8f8fcfdfdfdfdfdfdfdfcfdfdfdfcfbf4f0efeb653f3b3b3b3b3b3b3b3b3938393f5772727272 +727272727272727272727272 +727172727171717171717171727171717171727171533f3b3b3a364aa5cef0f9fbfdfdfcf9f5f1 +ecebf3f8fafbfbfafcfaf8f7f5f5efeae3dbdfe687473b3b3a3b3a393a3a3b393a393f5c727272 +727272727272727272727272 +7272727271717171717171717272717171717271623d3d3a3b3a3a5ba9b8d0e7edf5f9f9f5ede3 +e1e5e7f2fbf9fafaf7eee2dad3d0cececcc8c9d8c5513a3b3a373c393d3b3a3939383d3e637272 +727272727272727272727272 +727272727171717171717171727171717172726e4a3d383a3b3a456fadb5cbddebf8fbfcfdfced +e4f5fbfdfcfdfdfdfcf7ede3d5cecac8c7c6c6c7deb844393e644e3a393b3a3a3939383c4b6f72 +727272727272727272727272 +72727272717171717172727272727271717272603e3a3b3b393a4b7cbbd3ebf7fdfcfcfbfdfcee +f1fcfcfcfcfbfbfdfcfcfdfbf8f2e8ded3cbc7c6ceee993d34556f5f463c3d393b393a3a3e6272 +727272727272727272727272 +717171727171717172717171727171717173704b3b3d39473c3c5fb0dcf1fbfcfcfcfdfcfcfcf5 +f5fbfcfbfdfcfcfcfcfcfbfbfdfcfcfbf5e9d9cdc7d8ea683b3d3d58724b3b3d3b3a3a3a3c5173 +737272727272727272727272 +7272727271717171717271717271717171736e433e385e603e4090dff5fcfdfcfcfbfcfcfbfcfa +fbfbfcfcfcfbfcfdfcfcfcfcfdfcfcfcfbfcf6e6d3c9e3c3403a3d394d7342353e3a3b3a39416b +727372727272727272727272 +727171727171717171717171727171717172673d374a6b3b3d4cd9f8fdfcfcfcfbfdfbfcfbfcfc +fbfcfcfbfcfcfcfcfdfcfcfcfbfcfbfcfcfdfdfaedd4ceeb6c3c3d3d3e51663a3e383b3a393c56 +717472727272727272727272 +727271727171717171717171727171717173573c3c604d3b3c8ffbfdfbfcfdfcfcfcfcfcfcfbfb +fdfbfdfcfdfbfcfcfcfbfcfcfdfbfdfcfcfcfcfdfcedd3dac43d384e5b5064583a3c3b3a363c40 +6f7272727272727272727272 +727271727171717171717171727171717170483f476f373851e9fdfdfdfbfcfcfcfcfcfcfbfcfd +fcfcfcfbfcfcfbfbfcfcfdfcfdfcfcfcfcfcfcfdfcfdf1e6f1583f5e7770546d42393b3a3b3a3d +637272727272727272727272 +7272727271717172717171717271727372643f3c6a52373da0fbfcfcfcfcfbfcfcfcfdfcfcfbfb +fcfbfcfbfbfcfdfcfcfcfcfcfcfcfcfbfcfcfdfcfdfbfcfcfd9545657c735259613d3c393a393b +4e7172727272727272727272 +7272727271717171717171717271727471513a456a393a5ae6fafcfbfcfbfcfbfcfcfcfcfbf8fa +fbfcfcfcfcfdfbfcfdfcfcfdfcfdfcfbfdfcfbfcfcfcfcfcfdc64f5e6456434078433b3d393b3d +436c72727272727272727272 +727272727171727171717171727272726e47385c53333e98fbfbfcfcfcfcfcfcfcfcfcfcf9eafb +fbfbfbfbfcfcfbfdfcfcfbfcfcfcfcfcfbfdfcfcfdfdfcfdfce7473d3f3b3b375e57393d383939 +3b6171727272727272727272 +72727272717171717171717172717272633c3b703f3451dafcfcfbfbfcfcfbfcfcfdfdfbf4e8fa +fcfdfcfcfcfbfcfbfcfcfcfcfbfdfcfcfcfcfcfcfcfbfbfcfcfa623c3a3a3b374b66373d393939 +3b5072727272727272727272 +727272727171717171717171727272714e3b52613b388af8fcfbfcfbfcfcfcfcfcfdfcfcf2edfc +fdfcfcfcfcfdfcfbfcfcfcfcfcfdfcfdfdfcfcfcfcfdfcfbfcfc84383b3b393a3f774138383938 +3a416f727272727272727272 +727271727171717171717171727272663c3c68453b40c5fbfbfbfdfdfcfcfdfbfcfcfcfcededfb +fcfcfcfcfbfcfcfcfcfbfbfcfcfcfcfcfafcfcfcfcfbfcfdfcfda23c3b3b3b3b3d7437383b3a39 +3b3f68727272727272727272 +7272727271717171717171717174714b3a3a6b373b57eefcfcfcfcfbfcfcfbfcfcfbfdfbe9e9fb +fbfcfcfcfbfcfcfbfbfcfcfbfbfcfbfcfcfcfcfcfbfcfcfcfdfcaf3b3b3b3c3a406f37373a3a39 +393d5f727272727272727272 +7171717272717171727171717271623e3d4a60373b82fbfcfcfdfbfdfcfcfcfcfbfcfcfbe6eafb +fcfdfcfcfcfcfcfbfdfcfcfcfdfcfcfcfcfdfcfcfcfbfcfcfcfdbd3a3b3b3a3843633836393a38 +3a3c54727272727272727272 +727272727272717171717272736d463a37535c3839aafcfcfcfdfdfcfcfcfbfcfdfcfbfbe6eaf9 +fbfbfcfbfcfbfcfcfbfdfcfcfbfcfcfcfcfdfcfcfcfcfbfdfcfcce3c3b3b393c4e533937383939 +383c4f727272727272727272 +71717272717171717171717371593d3b3952603947cdfcfbfcfcfcfcfcfdfdfcfcfcfdfae2e9fa +fbfbfcfdfbfcfcfcfcfcfcfcfcfcfcfbfbfcfbfdfcfcfdfafcfcd4423b3b3b3a5a4e393a39383a +3a3940727272727272727272 +7272727271717171717271726c41393c3656683b47d6fdfbfcfcfcfcfcfcfbfcfdfcfcfae1e9fb +fbfcfdfcfcfcfbfcfcfcfcfbfcfcfbfcfcfcfbfbfdfcfbfcfcfdda413b3b3c3b6644393a3a3938 +3b3a3f727272727272727272 +727271727171717171717171553c3b3b405f6d394ce1fcfcfcfcfcfcfbfdfcfcfcfcfcf9e1ecfb +fcfcfcfcfcfbfbfcfdfcfcfdfbfcfcfcfcfbfcfbfbfdfcfdfcfcdd423b3b3b39643f393a393939 +3a3a3e727272727272727272 +7272727271727171717171724f3e363d4f767e3b5be9fcfdfcfdfbfbfbfcfcfbfafcfcf8e2eefb +fbfcfcfcfcfcfcfcfcfcfcfcfcfcfcfbfdfcfbfcfdfcfcfcfbfdde433b3b3b455f3a3b3b3a3a39 +39393e727272727272727272 +72727272717171717171716e46393938466b863e69edfcfdfcfcfcfcfbfcfcfcfcfcfcf7e2eefc +fbfcfcfdfbfdfcfbfdfcfdfdfdfcfcfcfcfdfbfcfcfbfcfcfbfddc443b3b385a463b3b3b3a3839 +393940727272727272727272 +72727272717171727171716f413a3a3a3945724869effcfcfcfcfbfcfcfbfcfcfcfcfbf8e2f1fc +fcfcfcfbfcfcfcfcfcfcfcfcfcfcfcfbfcfcfcfcfcfcfbfcfdfccc3f383a41683b3d3d3a3b3a3a +3a3b42727272727272727272 +72727272727171717171716e443938393c3c49626eeefcfbfcfcfcfcfcfcfcfcfcfcfcf8e2f1fc +fbfcfdfcfcfdfdfcfcfcfcfcfbfcfbfcfcfcfcfcfcfcfcfcfcfcb83b3f5a685d455b6054463f3a +3c3a51727272727272727272 +727272727271717172717171524a728f8d5e424d80e3fbfcfcfbfcfcfdfcfbfcfcfcfcf7e1f2fb +fcfcfcfcfcfcfcfbfcfdfbfcfcfcfcfcfcfcfcfcfcfdfcfcfcfc9c405b503d3b3c3c455368755c +3d3a5a727272727272727272 +72727172717171727271727174a3c9d4d6c87b3b50b0f9fcfcfdfcfcfcfbfdfcfcfcfcf8e2f3fb +fcfcfdfcfcfcfcfcfcfcfbfbfbfcfbfcfbfcfcfcfcfcfbf9fbf66956403b3a3a39393b3a3a608d +654567717273727272727272 +7272727271717172717371739bc1d1d4d4d4cc7f3f55a9f5fbfbfcfbfdfbfbfcfbfbfcf8e1f3fc +fbfcfcfcfbfcfbfcfcfdfdfcfcfcfcfcfcfcfcfcfbf6d5d3d3d29c59393a393b3b3b3b3a3c5d76 +61486b737272727272727272 +727272727171727171737288b1c7d1d4d4d5d4cc803f4ea1f0fbfcfcfcfbfcfcfcfdfcf6e3f4fc +fdfbfbfcfcfcfcfcfcfcfcfcfdfbfcfcfcfbfcfcfcdccfdbdddccd5b3e3a393b3b3b3b3a3e655e +519c89727373727272727272 +7171717272727171717276a3b8c8d2d4d5d4d5d5c66d3a4892e9fcfbfcfdfcfbfbfbfcf8e1effb +fcfbfcfcfcfcfbfcfcfbfcfbfcfcfcfcfbfcfcfcfcd5c7d4d7dabb50383c393b3b3b3b3a414f40 +76cfda8f7374727272727272 +7172717372727271707e9db3c0cdd4d4d5d4d4d5d4b6543b4673d6fbfbfcfcfdfdfcfbfaeaedfc +fbfdfcfcfcfdfdfcfcfcfcfcfbfbfcfbfcfdfcfcfcd7c5d3d4d1a9513a393a3b3b3b3b3a3a3653 +bad5d7b87371727272727272 +7170778c9baaa8a5a3a7b4bdc9d1d4d4d4d4d4d4d5d2a04435405bc1f7fcfcfdfbfcfcfdfbf9fc +fdfcfbfcfcfcfbfcfcfcfcfbfcfcfcfdfcfcfbfbf8d8c4d3d2c9a85c3a3b383b3b3b3b3a3a4196 +cfd1d4c47370727272727272 +73779fb2bcc1bfbbbbbdc4cad1d4d4d4d5d4d4d4d5d4cb7c3d373c469ef3fbfcfcfcfdfcfcfcfc +fcfbfcfcfbfcfcfcfcfcfcfcfcfcfcfcfbfcfbe8d3c7c4d2cec3ae78463c36383836373b477dbf +cccfd1c07671727272727272 +738ab0bec9cdccc9c7ccd1d2d4d4d4d4d4d4d4d4d4d5d5b758383b3a4387e5fdfcfcfcfbfcfcfc +fdfdfbfcfcfcfcfcfbfcfcfdfcfcfbfbfdfceecdc7c3c2cecbc1ae997146403e393d426189b2c3 +cccfd2c27572727272727272 +7193b7c7ced1d2d3d2d3d4d4d4d4d4d4d5d4d4d4d4d3d4cf953d383a353a68d0fbfbfbfbfdfcfc +fbfbfbfdfcfdfcfbfcfcfbfcfcfcfdfcfbfde3c7c8c2bfc9cac4b5a69c8e7d77767e929eacc0ca +d0d3d4d07f72727272727272 +729eb8c8d0d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d5d3d3d5c065383b38343f57bffbfbfcfcfbfc +fcfcfcfcfbfbfcfdfcfcfcfcfbfbfbfcfcfbdfc9c8bdb9c8cac6bbb0a8a5a1a0a1a3a7b1bfccd1 +d4d4d4d3af77717372727272 +7192b7c6d0d4d4d4d4d4d4d4d5d4d4d4d4d4d4d4d4d4d3d4d4a64639383c3a3852c7fcfcfdfdfd +fcfcfcfcfcfcfdfdfcfcfdfcfdfcfbfcfcfbe0c8c8b8b4c6cacac1b9b5b1b0afafb2b7c0cbd4d4 +d4d5d4d2cf9c727272727272 +728cb5c3ced4d4d4d4d4d4d4d5d4d4d4d4d4d4d4d4d4d4d4d4c97d3b363a3737396ef0fcfcfcfc +fdfcfcfcfbfcfcfcfcfcfcfcfdfcfcfbfcfde7cbc9b3aebfc9cbc8c2bcbbb9b9b9bcc3c9d1d5d5 +d5d5d5d3d1c88f7272727272 +718bb2c0cdd3d4d4d4d4d4d5d5d5d4d4d5d4d4d4d5d4d4d4d4d5b6573a3939393742d8fcfcfcfc +fcfbfcfbfcfcfcfdfcfcfcfcfbfbfcfcfdfbeed0c8adaabcc9d0cecbc5c3c2c1c3c5c8ced2d5d5 +d5d5d5d5d4d1c29071727372 +727fafbdccd3d4d4d4d4d4d4d5d4d4d4d4d4d4d4d4d4d4d4d4d4ce974038393b393fd1fcfcfcfb +fcfbfcfdfcfcfbfcfcfcfcfcfbfcfcfbfcfcf3d3b588aabdc9d0d2d1cdcbc9c8caccced1d4d5d5 +d5d5d5d5d4d3d0cb99767372 +727aadbccbd3d4d4d4d4d4d4d5d4d4d4d4d4d4d4d4d4d4d4d5d3d5c57a3a3a383a59ecfdfcfcfc +fbfcfcfcfcfcfcfbfcfbfcfcfbfcfcfcfbfcf2c46785aabdc9d1d3d3d2d2d0d1d1d2d2d3d4d5d5 +d5d5d5d5d5d5d4d4d4b88872 +727bacbacbd3d4d4d4d4d4d4d5d4d4d4d4d4d4d4d4d4d4d4d5d4d3d5b15441467bd7fcfcfcfbfc +fcfdfdfcfcfcfbfcfcfcfdfdfcfcfcfcfbfccd5d4484abbecad1d2d4d4d5d4d5d4d4d4d4d5d5d5 +d5d5d5d5d5d4d5d4d4d5cea5 +727caebac9d3d4d4d4d4d5d5d5d5d4d4d4d4d4d4d4d4d4d4d5d5d3d3ce99a7dcf8fcfcfcfcfcfc +fbfbfcfcfbfcfcfdfcfcfcfcfbfcfcfcf8c2523a4789aabecad1d3d4d5d5d5d5d5d5d5d5d5d5d5 +d5d5d5d5d5d5d5d5d5d5d2c6 +7084aebacbd2d3d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d3d1d1bfa4f4fafbfbfcfcfbfc +fcfcfbfbfcfcfcfcfcfcfcfcfcfbfbf6a44538364e8aaabecbd2d4d4d4d4d4d4d4d4d4d4d4d4d4 +d4d4d4d4d4d4d5d5d4d3cec1 +718eacbbcdd3d3d4d4d4d5d4d5d4d4d4d5d4d4d5d4d4d5d4d5d4d4d3cfceadbdfbfcfbfcfcfcfc +fbfdfdfcfbfdfbfbfcfcfbfbfcfce87f42353834578aa9c0cbd2d5d5d5d5d5d5d5d5d5d5d5d5d5 +d5d5d5d5d5d5d5d4d0c9c19f +739daec0d0d4d4d4d4d4d4d4d5d4d4d4d4d4d4d4d4d4d4d4d5d4d4d4cfd0bc95d1fbfbfbfcfcfc +fcfcfcfcfcfcfbfcfcfcfcfcefa84c3b383c39385e88a7c1ccd2d4d5d5d5d5d5d5d5d5d5d5d5d5 +d5d5d5d5d4d4d4d1c6bca676 +81a6b6cbd2d3d4d4d4d4d4d4d5d4d4d4d4d4d4d4d4d4d4d4d5d4d4d4cfcabf9f80cbfafbfcfcfc +fbfcfcfcfcfbfcfcfcfcf0b45b3c3a3b3a3738396488a6bfccd3d4d5d5d5d5d5d5d5d5d5d5d5d5 +d4d4d4d4d3d1ccc1b5947871 +94aebfcdd2d3d4d4d4d4d4d4d5d4d4d4d4d4d4d4d4d4d4d5d5d4d4d4d0c6bda6835a8ad1eff7fb +fcfbfcfcfbfaf3e7c5935a3f373a3b3b3b3b3b3d6b8ba7becbd2d5d5d5d5d5d5d5d5d5d5d5d4d4 +d5d4d4cec7c0b5a280727373 +a4afbdc8d1d2d2d3d4d3d4d4d5d4d4d4d4d4d4d4d4d4d4d4d5d4d4d4d1c8bca98d693b3d5c7e93 +a7aea0988f7c5e4b3d3b3a38383b3b3b3b3b3a43708ea7bdcad2d5d5d5d5d5d5d5d5d5d5d4d2d1 +d2d1c8bbb09a7f7372727272 +a3abb7bfc8cbcdcecfd0d2d4d3d4d4d4d4d4d4d4d4d4d4d5d5d4d5d4d0c8bca78f75473839383d +3d3a39373836353a383b37373b3a3a393a3a38477590a6bac9d2d4d5d5d5d4d4d4d5d4d4d0ccca +c6bdb1947971727272737272 +9aa5aaafb7bcbfc0c3c5c6cacccfd0d1d2d3d3d4d4d4d4d5d5d4d4d3cec3b6a28b7b553939393a +393939393939393939393939393a393a3a393947768fa3b5c3cfd4d4d4d4d4d4d2d2d1cbc5bfbb +b19b80737172727272727272 +7a91989da0a2a7abafb2b6b7bcc0c4c6c9cdd0d2d4d4d4d4d4d4d4d1c8bba9988a7c593a3a3a3a +3a393a3a3a3a3a3a3a3a3a3a3a3938393a3a3a4a768a9daebdc9d0d2d3d3d2d2d0cdc7bfb8b2a6 +8a7371717171727272727272 +7172757a838c91979c9fa4a4a6a9aeb1b6bac1c7cdcfd1d2d1d1d1cbbfb09e8f857958383a3839 +3b3b3b3b3c3b3b3c3b3b3b3b3b3a3837383a394c738596a5b5bfc9ced0d1d0cdc7bfbbafa49a7b +727172727272727272727272 +727273727272747c858b90949496999b9fa4acb3b9bec3c8cbcac4bbafa393867d734e3c404141 +4b555858585858585858585857554d454543404d7082909daab6c0c5c7c8c6beb8b2a89b8a7571 +727272727272727272727272 +7372727272727171727274797d8185898d90959ba2a6abb0b6b6b0a89c92867e776547656f7372 +707172727272727272727272727174736f6f66656c7e8a959fa6aeb3b4b4b1aaa49d9382727272 +727272727272727272727272 +727271717271717171727271717273767b7d82898e9195989b9b98928a837e7972616470727172 +72727171717171717172727272727272727171706d76828e979b9da0a1a19f9b968d7c73727271 +717272727272727272727272 +72727272717171717171717172717170717172767d81868788878683807c776f6e727271717171 +7171717171717171717272727272727272727271706f79838c9192959595938d84787171717272 +727272727272727272727272 +7272727271717171717171717271717171737372727375767a7c7d7b79746e6d72737271717171 +7171717171717171717272727272727272727271726e6f737c8285888786837974727172717272 +727272727272727272727272 +7272727271717171717171717271717171727272727272707273706f6f71707272727271717171 +71717271717171717172727272727272727272727272716e6f6f72757372727172717172727272 +727272727272727272727272 +showpage +%%Trailer +end +%%EOF diff --git a/contrib/groff/contrib/mom/examples/typeset.mom b/contrib/groff/contrib/mom/examples/typeset.mom new file mode 100644 index 0000000..972acc5 --- /dev/null +++ b/contrib/groff/contrib/mom/examples/typeset.mom @@ -0,0 +1,534 @@ +\# This file contains three greeked documents collated together: +\# two pages of a novelist's outline, two pages of a chapter in DRAFT +\# style, and three pages of an academic paper set in two columns. +\# Mom's defaults are used throughout, except for the last one, which +\# shows off some of the ways of changing mom's behaviour. +\# +\# Since the text is greeked, and groff doesn't know how to +\# hyphenate all that pseudo-latinate nonsense, I've inserted +\# discretionary hyphens into a number of the the words. +\# +\# =================================================================== +\# +\# First, a sample "named" document, in this case, an outline. +\# A novelist wouldn't normally write an outline with numbered heads, +\# subheads and paraheads. I've turned the feature on merely to +\# demonstrate it. +\# +\# Reference macros +\# +.TITLE "Lake Attica's Shores" +.SUBTITLE "A Romance Novel" +.AUTHOR "Rosemary Winspeare" +.DRAFT 1 \" Ignored because COPYSTYLE is FINAL +.REVISION 2 \" Ignored because COPYSTYLE is FINAL +\# +\# Docstyle macros +\# +.DOCTYPE NAMED "Outline" +.PRINTSTYLE TYPESET +\# +\# Additional style macros +\# +.NUMBER_PARAHEADS +\# +.START +.PP +.PARAHEAD "A note on the setting" +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. Stet clita kasd gubergren, no sea takimata sanctus est. +At vero eos et accusam et justo duo do\%lo\%re et ea rebum. +.PP +Stet clita kasd gubergren, no sea takimata sanctus est. Lorem ipsum +dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam +voluptua. +.PP +Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt +ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At +vero, eos et accusam et justo duo do\%lo\%res et ea rebum. Consetetur +sadipscing elitr, sed diam nonumy. +.LINEBREAK +.PP +.PARAHEAD "About historical personnages" +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren, no sea takimata sanctus est. Tempor invidunt ut +labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. Consetetur sadipscing elitr, sed diam nonumy +eirmod tempor invidunt ut labore et do\%lo\%re magna. Tempor invidunt +ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +.NUMBER_HEADS +.NUMBER_SUBHEADS +.HEAD "Part One" +.SUBHEAD "Chapter 1" +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, +sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua. At vero eos et accusam et +justo duo do\%lo\%res et ea rebum. +.PP +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren, no sea takimata sanctus est. Lorem ipsum dolor sit +amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +Stet clita kasd gubergren, no sea takimata sanctus est. +.SUBHEAD "Chapter 2" +.PP +Stet clita kasd gubergren, no sea takimata sanctus est. Lorem ipsum +dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam +voluptua. At vero eos et accusam et justo duo do\%lo\%res et ea rebum. +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, +sed diam nonumy eirmod tempor invidunt. Ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua at vero. +.SUBHEAD "Chapter 3" +.PP +Eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita kasd +gubergren, no sea takimata sanctus est lorem ipsum dolor sit amet. +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. At vero eos et accusam et justo duo do\%lo\%res et +ea rebum. +.HEAD "Part Two" +.SUBHEAD "Chapter 4" +.PP +Stet clita kasd gubergren, no sea takimata sanctus est +lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur +sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore +et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +.PP +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren, no sea takimata sanctus est lorem ipsum dolor sit amet. +.PP +Nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. At vero eos et accusam et justo duo do\%lo\%res et +ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, +sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua. At vero eos et accusam et justo +duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, no sea takimata +sanctus est lorem ipsum dolor sit amet. Consetetur sadipscing elitr, +sed diam nonumy eirmod tempor invidunt. +.SUBHEAD "Chapter 5" +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed +diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua. At vero eos et accusam et +justo duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, +no sea takimata sanctus est lorem ipsum dolor sit amet. +.PP +Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt +ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At vero +eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita kasd +gubergren, no sea takimata sanctus. +.PP +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren. Sea takimata sanctus est lorem ipsum dolor +sit amet. Accusam et justo duo do\%lo\%res et ea rebum +.SPREAD +\# +\# This next bit ensures that the line "...end of sample outline" doesn't +\# spring the page trap, which would deposit a header at the top of the +\# next page. COLLATE doesn't print a page header on the first page of +\# a collated document, but if the page trap has already deposited one +\# there, COLLATE can't undo it. Hence, we turn the trap off +\# (TRAP OFF), set the line, and put in an EL afterwards. +\# Normally, all this isn't necessary when collating documents, +\# but if you ever have the problem of a page header printing at the +\# top of a collated document, this is how you get around it. +\# +.TRAP OFF +.RIGHT +\*[BD]\&...end of sample outline +.EL +.TRAP +.COLLATE +\# +\# ===================================================================== +\# +\# Next, two sample pages of a chapter, set in DRAFT style, showing +\# the use of the EPIGRAPH BLOCK macro and the QUOTE macro. +\# +\# You'll notice that the starting page number of this "draft" is 1 (in +\# roman numerals). COPYSTYLE DRAFT always numbers the first page of a +\# document 1. +\# +\# Reference macros +\# +.TITLE "Lake Attica's Shores" +.SUBTITLE "A Romance Novel" +.AUTHOR "Rosemary Winspeare" +.CHAPTER 1 +.DRAFT 1 \" Appears in the header because copystyle is DRAFT +.REVISION 2 \" Appears in the header because copystyle is DRAFT +\# +\# Docstyle macros +\# +.DOCTYPE CHAPTER +.COPYSTYLE DRAFT +\# +\# Additional style macros +\# +.EPIGRAPH_FONT I \" Epigraphs are set in roman by default +\# +.START +.EPIGRAPH BLOCK +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. +.RIGHT +\*[ROM]\(emJoseph E. Blough +.EPIGRAPH OFF +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. At vero eos et accusam et justo duo do\%lo\%res et +ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est. +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Lorem ipsum +dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam +voluptua. At vero eos et accusam et justo duo do\%lo\%res et ea rebum. +Stet clita kasd gubergren, no sea takimata sanctus est. At vero eos +et accusam et justo duo do\%lo\%res et ea rebum. +.PP +Stet clita kasd gubergren, no sea takimata sanctus est. Lorem ipsum +dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt. +.PP +"Consetetur sadipscing elitr," dixit ea. +.PP +"Sed diam nonumy eirmod tempor invidunt ut labore," dixit eum. +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. Consetetur sadipscing elitr, sed diam nonumy +eirmod tempor invidunt ut labore et do\%lo\%re magna. +.PP +"Lorem ipsum dolor sit amet," dixit ea. +.PP +"At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren, no sea takimata sanctus est," dixit eum. "Sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua." +.PP +Consetetur sadipscing elitr, sed diam nonumy eirmod tempor: +.QUOTE +Invidunt ut labore et do\%lo\%re +Magna ali\%quyam erat sed diam +Voluptua stet clita kasd gubergren +No sea takimata sanctus est. +.QUOTE OFF +.PP +Justo duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, no +sea takimata sanctus est. Lorem ipsum dolor sit amet, consetetur +sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore +et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +.PP +"Stet clita kasd gubergren," dixit ea. +.PP +"No sea takimata sanctus est," dixit eum. +.PP +Nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna. Aliquyam erat +sed diam voluptua. At vero eos et accusam et justo, duo do\%lo\%res et +ea rebum. +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt. Ut labore et do\%lo\%re magna ali\%quyam +erat, sed diam voluptua at vero. Stet clita kasd gubergren, no sea +takimata sanctus est. Consetetur sadipscing elitr, sed diam nonumy +eirmod tempor invidunt ut labore et do\%lo\%re magna. +.PP +Invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren, no sea takimata sanctus est. At vero eos et accusam et +justo duo do\%lo\%res et ea rebum. Lorem ipsum dolor sit amet, consetetur +sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore +et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At vero eos et +accusam et justo duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, +no sea takimata sanctus est. At vero eos et accusam et justo duo +do\%lo\%res et ea rebum. +.RIGHT +\*[BD]\&...end of sample chapter +.COLLATE +\# +\# ===================================================================== +\# +\# Finally, a sample academic article, set in two columns with a +\# 1.5-pica gutter between them. This example also uses +\# BLOCKQUOTES, FOOTNOTES, and the relatively rare BREAK_QUOTE. In +\# addition, it's set RECTO_VERSO, with differing left and right +\# margins that alternate from page to page. (The header also +\# flips from right to left, which you can see on the 2nd and 3rd +\# pages). +\# +\# In order to accomodate the narrow measure of the columns, there's also +\# a demonstration of things you can change with both the typesetting +\# macros and the document processing "control" macros. +\# +\# Reference macros +\# +.TITLE "CONTROL EQUALS CHAOS" +.SUBTITLE "\*[ALD1]The Psychological and Auditory Impact of Serial vs. Aleatoric Music\*[RLD1]" +.AUTHOR "Joe Chang" "and" "Brad Hegel Connors" +\# +\# Docstyle macros +\# +.DOCTYPE DEFAULT +.COPYSTYLE FINAL +\# +\# Additional style macros -- general type parameters +\# +.L_MARGIN 6P +.R_MARGIN 4P+6p +.PT_SIZE 10 +.AUTOLEAD 1.5 +\# +\# Additional style macros -- change mom's default behaviour +\# +.RECTO_VERSO +.PAGENUM 1 +.HEADER_LEFT "Chang, Connors" \" Because we have two authors +.COLUMNS 2 1P+6p +.SUBTITLE_SIZE +1.5 +.AUTHOR_SIZE +.5 +.DOCHEADER_LEAD +2p +.HEADER_SIZE +1 +.PARA_INDENT 1P +.SUBHEAD_SIZE +0 +.BLOCKQUOTE_FAMILY H +.BLOCKQUOTE_SIZE -2 +.QUOTE_INDENT 2 +.NUMBER_HEADS OFF \" Because we turned them on in the first example +.NUMBER_SUBHEADS OFF \" Ibid +\# +.START +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr. Sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna. Ali\%quyam +erat, sed diam voluptua. +.PP +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren no sea takimata. Sanctus est, lorem ipsum dolor sit +amet. Consetetur sadipscing elitr, sed diam nonumy. Eirmod tempor +invidunt ut labore et do\%lo\%re magna ali\%quyam erat. Sed diam voluptua +at vero eos et accusam et justo. +\# +.BLOCKQUOTE +Stet clita kasd gubergren, no sea takimata sanctus est lorem. +Ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy +eirmod tempor. Invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua at vero. Eos et accusam et justo duo do\%lo\%res et +ea rebum stet clita.\c +.FOOTNOTE \" Note the use of \c, above, to keep the word and footnote marker together. +Lorem ipsum dolor sit amet, consetetur sadipscing elitr. +.FOOTNOTE OFF +.BLOCKQUOTE OFF +\# +.PP +Duo do\%lo\%res et ea rebum, stet clita kasd gubergren. No sea takimata +sanctus est lorem ipsum dolor sit amet, consetetur sadipscing elitr. +Sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam. Erat sed diam voluptua at. Vero eos et accusam et justo +duo do\%lo\%res et ea rebum stet. Clita kasd gubergren no sea takimata +sanctus est. +.PP +Nonumy eirmod tempor invidunt, ut labore et do\%lo\%re magna ali\%quyam +erat? At vero eos et accusam et justo duo do\%lo\%res et ea. Rebum stet +clita kasd gubergren no sea takimata sanctus. Est lorem ipsum dolor +sit amet. Sadipscing\c +.FOOTNOTE +Sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua. +.FOOTNOTE OFF +elitr sed diam nonumy eirmod tempor invidunt. Ut labore et do\%lo\%re +magna ali\%quyam erat, sed diam voluptua. At vero eos et accusam et +justo duo do\%lo\%res et ea rebum. Stet clita kasd gubergren no sea. +\# +.SUBHEAD "Schoenberg\(em" "The Origins of Serial Pitch Organization" +\# +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. At vero eos et accusam et justo duo do\%lo\%res et ea +rebum. Stet clita kasd gubergren, no sea takimata sanctus est lorem. +Ipsum dolor sit amet consetetur sadipscing. Elitr, sed diam nonumy, +eirmod tempor invidunt ut labore et do\%lo\%re magna. Ali\%quyam erat sed +diam voluptua, at vero eos. Et accusam et justo duo do\%lo\%res et ea +rebum stet clita kasd gubergren lorem ipsum. Dolor sit amet +consetetur, sadipscing elitr, sed diam. Nonumy eirmod tempor invidunt +ut labore et do\%lo\%re. Magna ali\%quyam erat sed diam voluptua at vero. +Eos et accusam et justo duo do\%lo\%res et ea rebum stet clita kasd. +Gubergren no sea takimata sanctus est. +.PP +Amet consetetur sadipscing elitr sed diam nonumy eirmod. Tempor +invidunt ut labore. Et dolor\%e magna ali\%quyam erat, sed diam voluptua, +at vero. Eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren. +.PP +No sea takimata\c +.FOOTNOTE +Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt +ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +.FOOTNOTE OFF +sanctus est lorem. Ipsum dolor sit amet, consetetur +sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore +et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At vero eos et +accusam et justo duo do\%lo\%res et ea rebum amet. Consetetur sadipscing +elitr sed diam nonumy eirmod tempor invidunt ut labore, et do\%lo\%re +magna ali\%quyam erat. Sed diam voluptua, at vero, eos et accusam et +justo duo do\%lo\%res et ea rebum. +\# +.SUBHEAD "Messiaen to Stockhausen\(em" "The Quest for Absolute Control" +\# +.PP +Vero eos et accusam et justo duo do\%lo\%res et ea rebum amet: +.QUOTE +Eirmod tempor invidunt +Ut labore et do\%lo\%re magna ali\%quyam erat +Sed diam voluptua +At vero eos et accusam et justo duo do\%lo\%res. +.QUOTE OFF +Lorem ipsum dolor sit amet, consetetur sadipscing elitr +sed diam. Nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna. +Aliquyam erat, sed diam voluptua at vero eos et accusam. Et +justo duo do\%lo\%res et ea rebum stet. +.PP +Elitr sed diam nonumy eirmod tempor. Invidunt ut labore et do\%lo\%re +magna ali\%quyam erat sed. Diam voluptua at vero eos et accusam et +justo duo do\%lo\%res et ea rebum. +\# +.BLOCKQUOTE +Sanctus est lorem ipsum dolor sit amet, consetetur sadipscing. Elitr, +sed diam nonumy eirmod tempor, invidunt ut labore et do\%lo\%re magna +ali\%quyam. Erat sed diam voluptua, at vero eos et accusam et justo +duo do\%lo\%res et ea rebum amet. Consetetur sadipsc- +.BREAK_QUOTE \" Needed because blockquote crosses page AND contain footnotes +ing elitr sed diam nonumy eirmod tempor invidunt ut labore. +Et do\%lo\%re magna ali\%quyam erat, sed diam voluptua, at vero. +Eos et accusam et justo duo.\c +.FOOTNOTE +Labore et do\%lo\%re magna ali\%quyam erat sed diam voluptua. +.FOOTNOTE OFF +.BLOCKQUOTE OFF +\# +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr. Sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna. +.PP +Nonumy eirmod tempor invidunt, ut labore et do\%lo\%re magna ali\%quyam +erat? At vero eos et accusam et justo duo do\%lo\%res et ea. Rebum stet +clita kasd gubergren no sea takimata sanctus. Est lorem ipsum dolor +sit amet. Sadipscing elitr sed diam nonumy eirmod tempor invidunt. +Ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. +Stet clita kasd gubergren no sea. Ali\%quyam erat, sed diam voluptua. +\# +.SUBHEAD "John Cage\(em" "Leaving It All to Chance" +\# +.PP +Sit amet, consetetur sadipscing elitr, sed diam nonumy. Eirmod tempor +invidunt ut labore et do\%lo\%re magna. Ali\%quyam erat, sed diam +voluptua at vero. Eos et accusam et justo duo dolores et ea rebum. +Stet clita kasd gubergren, no sea taki\%mata sanctus est. +.PP +Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt +ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At vero +eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita kasd +gubergren, no sea takimata sanctus est lorem. Ipsum dolor sit amet, +consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt +ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At vero +eos et accusam et justo duo do\%lo\%res et ea rebum. +.PP +Stet clita kasd gubergren. No sea takimata sanctus est lorem ipsum +dolor sit. Amet consetetur sadipscing elitr, sed diam nonumy eirmod +tempor. Invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam +voluptua, at vero. Eos et accusam et justo duo do\%lo\%res et ea rebum. +Stet clita kasd gubergren, no sea takimata. Sanctus est lorem ipsum +dolor sit amet consetetur. Sadipscing elitr sed diam nonumy eirmod +tempor invidunt. Ut labore et do\%lo\%re magna ali\%quyam erat, sed diam +voluptua. At vero eos et accusam et justo duo do\%lo\%res et ea rebum. +\# +.BLOCKQUOTE +.PP +Stet clita kasd gubergren no sea. Takimata sanctus est lorem ipsum +dolor sit amet. Consetetur sadipscing elitr sed diam nonumy eirmod +tempor invidunt ut labore et do\%lo\%re. Magna ali\%quyam\c +.FOOTNOTE +Diam nonumy eirmod tempor invidunt ut labore. +.FOOTNOTE OFF +erat, sed diam +voluptua at vero eos et accusam. Et justo duo do\%lo\%res et ea rebum, +stet clita kasd gubergren, no sea takimata. +.PP +Sanctus est lorem ipsum. Dolor sit amet consete- +.BREAK_QUOTE \" Needed because blockquote crosses column AND contain footnotes +tur sadipscing elitr. Sed diam nonumy eirmod tempor invidunt ut +labore. Et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +At vero eos et accusam et justo duo. Dolores et ea rebum stet clita +kasd gubergren no sea. +.PP +Takimata lorem ipsum dolor sit amet consetetur sadipscing elitr. +Sed diam, nonumy eirmod tempor, invidunt ut labore et do\%lo\%re magna. +Aliquyam erat sed diam voluptua. At vero eos et accusam et +justo.\c +.FOOTNOTE +At vero eos et accusam et justo duo. +.FOOTNOTE OFF +.BLOCKQUOTE OFF +\# +.PP +Duo do\%lo\%res et ea rebum, stet clita kasd gubergren, no sea takimata +sanctus. Est lorem ipsum. Dolor sit amet, consetetur sadipscing elitr, +sed diam nonumy. Eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua. At vero eos et accusam. +.PP +Et justo duo do\%lo\%res et ea rebum stet clita kasd. Gubergren +no sea takimata sanctus est. Lorem ipsum dolor sit amet, consetetur +sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore +et dolore magna ali\%quyam erat, sed diam voluptua. At vero eos et +accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, +no sea takimata sanctus est. +\# +.SUBHEAD "Beyond Cage\(em" "Catching the Midnight Train" +\# +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr. Sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna. Ali\%quyam +erat, sed diam voluptua. +.PP +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren no sea takimata. Sanctus est, lorem ipsum dolor sit +amet. Consetetur sadipscing elitr, sed diam nonumy. Eirmod tempor +invidunt ut labore et do\%lo\%re magna ali\%quyam erat. Sed diam voluptua +at vero eos et accusam et justo. +.PP +Duo do\%lo\%res et ea rebum, stet clita kasd gubergren. No sea takimata +sanctus est lorem ipsum dolor sit amet, consetetur sadipscing elitr. +Sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam. Erat sed diam voluptua at. Vero eos et accusam et justo +duo do\%lo\%res et ea rebum stet. Clita kasd gubergren no sea takimata +sanctus est. +.PP +Nonumy eirmod tempor invidunt, ut labore et do\%lo\%re magna ali\%quyam +erat? At vero eos et accusam et justo duo do\%lo\%res et ea. Rebum stet +clita kasd gubergren no sea takimata sanctus. Est lorem ipsum dolor +sit amet. Sadipscing\c +.FOOTNOTE +Sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua. +.FOOTNOTE OFF +elitr sed diam nonumy eirmod tempor invidunt. Ut labore et do\%lo\%re +magna ali\%quyam erat, sed diam voluptua. At vero eos et accusam et +justo duo do\%lo\%res et ea rebum. Stet clita kasd gubergren no sea +takimata lorem. Ipsum dolor sit amet, consetetur sadipscing elitr. +Sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna. +Ali\%quyam erat, sed diam voluptua. At vero eos et accusam et justo +duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, no sea +takimata sanctus est. +.RIGHT +\*[BD]\&...end of sample article\*[PREV] +.FINIS diff --git a/contrib/groff/contrib/mom/examples/typewrite.mom b/contrib/groff/contrib/mom/examples/typewrite.mom new file mode 100644 index 0000000..b293840d --- /dev/null +++ b/contrib/groff/contrib/mom/examples/typewrite.mom @@ -0,0 +1,233 @@ +\# A sample of PRINTSTYLE TYPEWRITE. The file contains the sample +\# outline and sample draft chapter found in the docprocessing_tyeset.mom +\# file. Only two changes have been made: the printstyle (here, +\# TYPEWRITE instead of the default TYPESET), and the header size +\# in the sample chapter, reduced by 1 point in order to accomodate +\# all three parts of the header. Other than that, the samples have +\# been left alone so you can assess and get a feel for how PRINTSTYLE +\# TYPEWRITE behaves. +\# +\# ==================================================================== +\# +\# Sample outline using PRINTSTYLE TYPEWRITE +\# +\# Reference macros +\# +.TITLE "Lake Attica's Shores" +.SUBTITLE "A Romance Novel" +.AUTHOR "Rosemary Winspeare" +.DRAFT 1 \" Ignored because COPYSTYLE is FINAL (the default) +.REVISION 2 \" Ignored because COPYSTYLE is FINAL (the default) +\# +\# Docstyle macros +\# +.DOCTYPE NAMED "Outline" +.PRINTSTYLE TYPEWRITE +\# +\# Additional style macros +\# +.NUMBER_PARAHEADS +\# +.START +.PP +.PARAHEAD "A note on the setting" +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. Stet clita kasd gubergren, no sea takimata sanctus est. +At vero eos et accusam et justo duo do\%lo\%re et ea rebum. +.PP +Stet clita kasd gubergren, no sea takimata sanctus est. Lorem ipsum +dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam +voluptua. +.PP +Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt +ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At +vero, eos et accusam et justo duo do\%lo\%res et ea rebum. Consetetur +sadipscing elitr, sed diam nonumy. +.LINEBREAK +.PP +.PARAHEAD "About historical personnages" +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren, no sea takimata sanctus est. Tempor invidunt ut +labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. Consetetur sadipscing elitr, sed diam nonumy +eirmod tempor invidunt ut labore et do\%lo\%re magna. Tempor invidunt +ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +.NUMBER_HEADS +.NUMBER_SUBHEADS +.HEAD "Part One" +.SUBHEAD "Chapter 1" +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, +sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua. At vero eos et accusam et +justo duo do\%lo\%res et ea rebum. +.PP +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren, no sea takimata sanctus est. Lorem ipsum dolor sit +amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +Stet clita kasd gubergren, no sea takimata sanctus est. +.SUBHEAD "Chapter 2" +.PP +Stet clita kasd gubergren, no sea takimata sanctus est. Lorem ipsum +dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam +voluptua. At vero eos et accusam et justo duo do\%lo\%res et ea rebum. +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, +sed diam nonumy eirmod tempor invidunt. Ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua at vero. +.SUBHEAD "Chapter 3" +.PP +Eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita kasd +gubergren, no sea takimata sanctus est lorem ipsum dolor sit amet. +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. At vero eos et accusam et justo duo do\%lo\%res et +ea rebum. +.HEAD "Part Two" +.SUBHEAD "Chapter 4" +.PP +Stet clita kasd gubergren, no sea takimata sanctus est +lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur +sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore +et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +.PP +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren, no sea takimata sanctus est lorem ipsum dolor sit amet. +.PP +Nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. At vero eos et accusam et justo duo do\%lo\%res et +ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, +sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua. At vero eos et accusam et justo +duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, no sea takimata +sanctus est lorem ipsum dolor sit amet. Consetetur sadipscing elitr, +sed diam nonumy eirmod tempor invidunt. +.SUBHEAD "Chapter 5" +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed +diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna +ali\%quyam erat, sed diam voluptua. At vero eos et accusam et +justo duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, +no sea takimata sanctus est lorem ipsum dolor sit amet. +.PP +Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt +ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At vero +eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita kasd +gubergren, no sea takimata sanctus. +.PP +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren. Sea takimata sanctus est lorem ipsum dolor +sit amet. Accusam et justo duo do\%lo\%res et ea rebum +.BR +.RIGHT +\*[BD]\&...end of sample outline \" Notice that TYPEWRITE ignores the \*[BD] +.COLLATE +\# +\# ===================================================================== +\# +\# Sample chapter in COPYSTYLE DRAFT using PRINTSTYLE TYPEWRITE +\# +\# Reference macros +\# +.TITLE "Lake Attica's Shores" +.SUBTITLE "A Romance Novel" +.AUTHOR "Rosemary Winspeare" +.CHAPTER 1 +.DRAFT 1 \" Appears in the header because copystyle is DRAFT +.REVISION 2 \" Appears in the header because copystyle is DRAFT +\# +\# Docstyle macros +\# +.DOCTYPE CHAPTER +.COPYSTYLE DRAFT +\# +\# Additional style macros +\# +.EPIGRAPH_FONT I \" TYPEWRITE underlines italics +.HEADER_SIZE -1 +\# +.START +.EPIGRAPH BLOCK +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. +.RIGHT +\*[ROM]\(emJoseph E. Blough +.EPIGRAPH OFF +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. At vero eos et accusam et justo duo do\%lo\%res et +ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est. +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Lorem ipsum +dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam +voluptua. At vero eos et accusam et justo duo do\%lo\%res et ea rebum. +Stet clita kasd gubergren, no sea takimata sanctus est. At vero eos +et accusam et justo duo do\%lo\%res et ea rebum. +.PP +Stet clita kasd gubergren, no sea takimata sanctus est. Lorem ipsum +dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt. +.PP +"Consetetur sadipscing elitr," dixit ea. +.PP +"Sed diam nonumy eirmod tempor invidunt ut labore," dixit eum. +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua. Consetetur sadipscing elitr, sed diam nonumy +eirmod tempor invidunt ut labore et do\%lo\%re magna. +.PP +"Lorem ipsum dolor sit amet," dixit ea. +.PP +"At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren, no sea takimata sanctus est," dixit eum. "Sed diam +nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, +sed diam voluptua." +.PP +Consetetur sadipscing elitr, sed diam nonumy eirmod tempor: +.QUOTE +Invidunt ut labore et do\%lo\%re +Magna ali\%quyam erat sed diam +Voluptua stet clita kasd gubergren +No sea takimata sanctus est. +.QUOTE OFF +.PP +Justo duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, no +sea takimata sanctus est. Lorem ipsum dolor sit amet, consetetur +sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore +et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +.PP +"Stet clita kasd gubergren," dixit ea. +.PP +"No sea takimata sanctus est," dixit eum. +.PP +Nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna. Aliquyam erat +sed diam voluptua. At vero eos et accusam et justo, duo do\%lo\%res et +ea rebum. +.PP +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam +nonumy eirmod tempor invidunt. Ut labore et do\%lo\%re magna ali\%quyam +erat, sed diam voluptua at vero. Stet clita kasd gubergren, no sea +takimata sanctus est. Consetetur sadipscing elitr, sed diam nonumy +eirmod tempor invidunt ut labore et do\%lo\%re magna. +.PP +Invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. +At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita +kasd gubergren, no sea takimata sanctus est. At vero eos et accusam et +justo duo do\%lo\%res et ea rebum. Lorem ipsum dolor sit amet, consetetur +sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore +et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At vero eos et +accusam et justo duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, +no sea takimata sanctus est. At vero eos et accusam et justo duo +do\%lo\%res et ea rebum. +.RIGHT +\*[BD]\&...end of sample chapter \" Notice that TYPEWRITE ignores the \*[BD] diff --git a/contrib/groff/contrib/mom/groff_mom.man b/contrib/groff/contrib/mom/groff_mom.man new file mode 100644 index 0000000..dea6a91 --- /dev/null +++ b/contrib/groff/contrib/mom/groff_mom.man @@ -0,0 +1,95 @@ +.ig +This file is part of groff, the GNU roff type-setting system. + +Copyright (C) 2002 Free Software Foundation, Inc. +written by Werner Lemberg + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with the +Invariant Sections being this .ig-section and AUTHORS, with no +Front-Cover Texts, and with no Back-Cover Texts. + +A copy of the Free Documentation License is included as a file called +FDL in the main directory of the groff source package. +.. +. +.mso www.tmac +. +.de TQ +.br +.ns +.TP \\$1 +.. +. +.TH GROFF_MOM @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +. +. +.SH NAME +. +groff_mom \- groff `mom' macros +. +. +.SH SYNOPSIS +. +.B groff +.B \-mom +[ +.IR files .\|.\|.\& +] +.br +.B groff +.B \-m\ mom +[ +.IR files .\|.\|.\& +] +. +. +.SH DESCRIPTION +. +.B mom +(\[lq]my own macros\[rq], \[lq]my other macros\[rq], \[lq]maximum +overdrive macros\[rq], .\|.\|.\&) is a macro set for groff, designed +primarily to format documents for PostScript output. +.PP +.B mom +provides two categories of macros: macros for typesetting and macros +for document processing. +The typesetting macros provide access to groff's typesetting power in +ways that are simpler to master and to use than groff's primitives. +The document processing macros provide customizable markup +\[lq]tags\[rq] that allow the user to design and output +professional-looking documents with a minimum of typesetting +intervention. +.PP +mom comes with her own (very) complete documentation in HTML format. +. +.SH FILES +.TP +.B om.tmac +\[en] the main macro file +.TQ +.B mom.tmac +\[en] a wrapper file that calls om.tmac directly. +. +.TP +.URL @HTMLDOCDIR@/momdoc/toc.html @HTMLDOCDIR@/momdoc/toc.html +\[en] entry point to the HTML documentation +. +.TP +.B @EXAMPLEDIR@/*.mom +\[en] example files using mom +. +. +.SH AUTHOR +. +.B mom +was written by +.MTO df191@ncf.ca "Peter Schaffter" . +Please send bug reports to the +.MTO bug-groff@gnu.org "groff bug mailing list" +or directly to the author. +. +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/contrib/groff/contrib/mom/mom.tmac b/contrib/groff/contrib/mom/mom.tmac new file mode 100644 index 0000000..b1b0b18 --- /dev/null +++ b/contrib/groff/contrib/mom/mom.tmac @@ -0,0 +1,3 @@ +.\" mom.tmac +.\" +.do mso om.tmac diff --git a/contrib/groff/contrib/mom/momdoc/appendices.html b/contrib/groff/contrib/mom/momdoc/appendices.html new file mode 100644 index 0000000..64d3b8f --- /dev/null +++ b/contrib/groff/contrib/mom/momdoc/appendices.html @@ -0,0 +1,185 @@ + + + +Mom -- Appendices + + + + + +Prev   +Back to Table of Contents + + + +

APPENDICES

+
+ + + + +

Further notes on this documentation

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

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

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

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

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

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

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


+ + + + +

Some reflections on mom

+
+ +

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

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

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

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

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

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

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

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

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


+ + + + +

Contact the author

+
+ +

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

+

+ df191@ncf.ca +
+ +

+


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

CREATING A COVER PAGE

+
+ +

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

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

+


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

DEFINITIONS OF TERMS USED IN THIS MANUAL

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

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


+ + +

Typesetting terms

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

+

+	\%
+
+ +(backslash followed by a percent). + +
Drop cap +
A large, usually upper-case letter that introduces the first +paragraph of a document or section thereof. The top of the drop +cap usually lines up with the top of the first line of the +paragraph, and typically "drops" several lines lower. +Text adjacent to the drop cap is indented to the right of the +letter until the bottom of the drop cap is reached, at which +point text reverts to the left margin. + +
Em/en +
A relative measurement equal to the width of the letter M at a +given *point size in a given *font. +Since most Ms are designed square, an em is usually (but sometimes +erroneously) considered to be the same size as the current point size +(i.e. if the point size of the type is 12, one em equals 12 points). +An en is equal to the width of a letter N (historically 2/3 of an em, +although groff treats an en as 1/2 of an em). Typically, ems and +ens are used to measure indents, or to define the length of dashes +(long hyphens). + +
Family +
The collective name by which a collection of +*fonts are known, e.g. Helvetica, Times Roman, +Garamond. + +
Figure space/Digit space +
A *fixed width space that has the width of one digit. Used for +aligning numerals in, say, columns or numbered lists. In groff, +the figure space is entered with +

+

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

+

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

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

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

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

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

+

+	Foreword............... 2
+	Chapter 1.............. 5
+	Chapter 2.............. 38
+	Chapter 3.............. 60
+
+ +
Ligature +
Ligatures are letters joined together to form a single character. +The commonest are fi, fl, ff, ffi and ffl. Others are ae and oe. +Occasionally, one sees an st ligature, but this is archaic and +quite rare. + +
Picas/Points +
There are twelve points in a pica, and six picas in an inch +(hence 72 points to the inch). In the same way that gem-dealers +have always used their own system of measurement for weight (carats), +typographers have always used their own system of measurement for type. + +
Point Size +
The nominal size of type, measured in *points, +from the bottom of the longest *descender to the top +of the highest *ascender. In reality, type is always +fractionally smaller than its point size. + +
Quad +
When only one margin of type is flush, lines of type are quadded in +the direction of the flush margin. Therefore, quad left means the +left margin is flush, the right isn't. Quad right means the right +margin is flush, the left isn't. Quad center means neither the left +nor the right margin is flush; rather, lines of type are quadded on +both sides so that type appears centered on the page. + +
Rag +
Describes a margin that isn't flush. Rag right means the right +margin isn't flush. Rag left means the left margin isn't flush. +The expression "flush left/rag right" is sometimes used to describe +type that is *quadded left. + +
Solid/set solid +
When no *lead is added between lines of type +(i.e. the *point size and linespacing are the +same), the lines are said to be "set solid." + +
Track kerning/Line kerning +
Sometimes, it's advantageous to increase or decrease the amount of +space between every letter in a line by an equal (usually small) +amount, in order to fit more (or fewer) characters on the line. +The correct term is letter spacing, but track kerning and line kerning +(and sometimes, just "kerning") have come to mean the same thing. + +
Unbreakable space +
Equal to *word space, however words separated by +an unbreakable space will always be kept together on the same line. +Expands and contracts like word space. Useful for proper names, which +should never be broken. In groff, unbreakable space is entered with +

+

+	\~
+
+ +(backslash followed by a tilde). + +
Word space +
The amount of whitespace between words. When text is +*justified, word space expands or contracts to make +the margins flush. + +
x-height +
The height of a lower case letter x in a given font at a given +point size. Generally used to mean the average height of the bowl +of lower case letters. +
+
+ + +

Groff terms

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

+

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

+

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

+

+	\#
+
+ +When processing output, groff silently ignores everything on the +line after the comment character. + +
Control Lines +
Instructions to groff that appear on a line by themselves, +which means that "control lines" are either +*macros or *groff primitives. +Control lines begin with a period or, occasionally, an apostrophe. + +
Filled lines/fill mode +
Automatic *justification or +*quadding. In fill mode, the ends of lines as they +appear in your text editor are ignored. Instead, words from adjoining +*input lines are added one at a time to the output +line until no more words fit. Then, depending whether text is to +be *justified or *quadded (left, +right, or center), and depending on whether automatic hyphenation +is turned on, groff attempts to hyphenate the last word, or, barring +that, spreads and breaks the line (when justification is turned on) or +breaks and quads the line (when quadding is turned on). +

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

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

+

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

+Mom's inline escapes always take the form +\*[ESCAPE], where ESCAPE +is composed of capital letters, sometimes followed immediately +by a digit, sometimes followed by a space and a *numeric +argument. Groff's escapes begin with the +backslash character but typically have no star and are in lower case. +For example, the mom escapes to move forward 6 points +on a line are either +

+

+	\*[FP6]  or  \*[FWD 6p]
+
+ +while the groff escape for the same thing is +

+

+	\h'6p'
+
+ +
Input line +
A line of text as it appears in your text editor. + +
Macros +
Instructions embedded in a document that determine how groff processes +the text for output. mom's macros always begin with a +period, on a line by themselves, and must be typed in capital letters. +Typically, macros contain complex commands issued to groff -- behind +the scenes -- via groff *primitives. + +
Machine units +
A machine unit is 1/1000 of a *point when the +groff device is ps. ("ps" means "PostScript" -- +the default device for which groff prepares output, and the device for +which mom was specifically designed.) + +
Numeric argument +
An *argument that has the form of a digit. +Numeric arguments can be built out of arithmetic expressions using ++, -, *, and / for plus, minus, times, and divided-by respectively. +If a numeric argument requires a *unit of measure, +a unit of measure must be appended to every digit in the +argument. For example: +

+

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

+

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

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

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

+

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

Units of measure must come immediately after the numeric argument (i.e. +with no space between the argument and the unit of measure), like this: +

+

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

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

+You can enter decimal values for any unit of measure. Different units +may be combined by adding them together (e.g. 1.5i+2m, which gives a +measure of 1-1/2 inches plus 2 ems). +

+NOTE: a pica is composed of 12 points, +therefore 12.5 picas is 12 picas and 6 points, not 12 picas +and 5 points. If you want 12 picas and 5 points, you have to +enter the measure as 12P+5p. + +

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

+

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

+Normally, groff interprets a period (or an apostrophe) at the beginning +of an input line as meaning that what follows is a *control +line. In fill modes, groff treats a space at the beginning +of an input line as meaning "start a new line and put a space +at the beginning of it." If you want groff to interpret periods +and apostrophes at the beginning of input lines literally (ie. print +them), or spaces at the beginning of input lines as just garden +variety word spaces, you must start the line with the zero-width +character. + +


+ + +

Mom's Document Processing Terms

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

+NOTE: In terms of content and style, headers and +*footers are the same; they differ only in their +placement on the page. In most places in this documentation, +references to the content or style of headers applies equally to +footers. + +

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

+


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

THE DOCUMENT ELEMENT TAGS

+
+ + + + +

Introduction to the document element tags

+
+ +Once you've completed the setup for a document (see +Setting up a mom document), +formatting it is a snap. Simply invoke the appropriate tag for +each document element as you need it. The tags are macros that +tell mom, "This is a paragraph, this +is a subhead, this is a footnote," and so on. +

+The list of tags is actually quite small -- ideal for the users +mom brought herself into being for (see +Who mom is meant for). +However, the list of macros that control the appearance of the +tags upon output is extensive. Generally, for each tag, +there are +control macros +for the tag's family, font and point size. Where appropriate, there +are macros to control leading, indents, quad and special features +as well. +

+Mom has tasteful defaults for all the tags, hence you +only use the control macros when you want to change the way +she does things. This is usually done prior to +START, +but can, in fact, be done at any time in the course of a document. +Any change to a tag's style affects all subsequent invocations of +the tag. + +

Control macros -- changing defaults

+ +

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

+In addition, many tags have special macros to control features that +are pertinent to those tags alone. Have a look at the section dealing +with any particular tag to find out what macros control the tag, +and what mom's defaults for the tag are. +

+The control macros may be used at any time during the course of +a document (i.e. before or after +START). The changes you +make alter all subsequent invocations of the affected tag until +you make another change, either by passing new arguments to the +tag's control macro, or toggling a particular feature of the tag on +or off. +

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

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

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

+A WORD OF ADVICE: Get familiar with +mom at her default settings before exploring the +control macros. Put her through her paces. She how she behaves. +Get to know what she feels like and how she looks, both in your text +editor and on the printed page. Then, if you don't like something, +use this documentation to find the precise macro you need to change it. +There are tons of control macros. Reading up on them and trying to +remember them all might lead you to think that mom +is complex and unwieldy, which is not only untrue, but would offend +her mightily. + +

Arguments to the control macros

+ +

Family and font

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

Point size

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

+

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

Lead/linespacing

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

+

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

+

+	.FOOTNOTE_AUTOLEAD 1
+
+ +

Indents

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

Quad/justification style

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

Document element tags list

+ +
+ + + + +

Epigraphs

+ +

+Epigraphs +color, flavour, or comment on the document they precede. Typically, +they are centered at the top of a document's first page (underneath the +title) and set in a smaller point size than that of paragraph text. +

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


+

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

+EPIGRAPH is a toggle, used like this: +

+

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

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

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

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

Epigraph control macros

+

+See +Arguments to the control macros. +

+

+.EPIGRAPH_FAMILY    default = prevailing document family; default is Times Roman
+.EPIGRAPH_FONT      default = roman
+.EPIGRAPH_SIZE      default = -1.5 (points)
+.EPIGRAPH_AUTOLEAD  default = 2 points
+
+(The next two apply to "block" style epigraphs only)
+
+.EPIGRAPH_QUAD      default = same as paragraphs
+.EPIGRAPH_INDENT*   default = para indent x 3 (for typeset), x 2 (for typewrite)
+
+*Indent here refers to the indent from both the left and right margins
+ that centres the block style epigraph on the page.
+
+
+ + + +

Paragraphs

+ +

+The paragraph macro is the one you use most often. Consequently, +it's one of most powerful, yet simplest to use -- just the letters +PP. No arguments, nothing. Just .PP +on a line by itself any time, in any document element, tells +mom you want to start a new paragraph. The spacing +and indent appropriate to where you are in your document are taken +care of automatically. +

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

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

+Note that mom does not provide "orphan +control" for paragraphs (i.e. even if only one line of a paragraph +fits at the bottom of a page, she will set it on that page). The +reason for this is that writers of fiction often have single-line +paragraphs (e.g. in dialogue). Groff's simplistic orphan control +will break these one-liners -- if they fall at the bottom of the page +-- to a new page, which is not what you want. +

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

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

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

+

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

+ + Macro: PP + + +

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

Paragraph control macros

+

+The PP being so important, and representing, as +it were, the basis of everything that goes on in a document, its +control is managed in a manner somewhat different from other document +element tags. +

+

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

1. Family

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

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

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

2. Font -- PP_FONT

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

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

3.Leading

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

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

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

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

4. Justification/quad

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

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

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

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

5. First-line indent -- PARA_INDENT

+The first-line indent of paragraphs is controlled by +PARA_INDENT, which takes one argument: the size +of the indent. PARA_INDENT may be used before +or after +START. +A +unit of measure +is required; fractional sizes are allowed. Thus, to set the paragraph +indent to 4-1/2 +ems, do +

+

+	.PARA_INDENT 4.5m
+
+ +In addition to establishing the basic first line-indent of +paragraphs, PARA_INDENT also affects +epigraphs, +quotes +and +blockquotes, +whose overal indenting from the left and (where applicable) right +margins is relative to PARA_INDENT. Furthermore, the +first-line indent of paragraphs within these document elements (as well +as footnotes) is also relative to PARA_INDENT (always +1/2 of PARA_INDENT)), hence they are also affected. +

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

6. Indenting initial paragraphs -- INDENT_FIRST_PARAS

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

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

7. Spacing paragraphs -- PARA_SPACE

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

Main heads

+ +

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

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

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


+

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

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

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

Head control macros

+

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

+

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

+

1. Family/font/size/quad

+

+See +Arguments to the control macros. +

+

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

2. Capitalizing heads -- HEAD_CAPS

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

+

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

3. Space before heads -- HEAD_SPACE

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

+

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

4. Underlining heads -- HEAD_UNDERLINE

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

+

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

5. Number heads -- NUMBER_HEADS

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

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

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

6. Reset head numbering -- RESET_HEAD_NUMBER

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

+

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

7. Vertical inline escapes inside heads

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

+For example, +

+

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

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

+

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

Subheads

+ +

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

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

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


+

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

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

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

Subhead control macros

+

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

+

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

+

1. Family/font/size/quad

+

+See +Arguments to the control macros. +

+

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

2. Number subheads -- NUMBER_SUBHEADS

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

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

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

3. Reset head numbering -- RESET_SUBHEAD_NUMBER

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

+

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

Vertical inline escapes inside subheads

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

Paragraph heads

+ +

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

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

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


+

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

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

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

Parahead control macros

+

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

+

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

+

1. Family/font/size

+

+See +Arguments to the control macros. +

+

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

2. Indent

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

+

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

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

3. Number paraheads -- NUMBER_PARAHEADS

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

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

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

4. Reset head numbering -- RESET_PARAHEAD_NUMBER

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

+

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

Author linebreaks

+ +

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


+

+ + Macro: LINEBREAK + + +

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

Linebreak character control macro

+

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

+LINEBREAK_CHAR determines what mom +prints when LINEBREAK is invoked. It takes 3 +optional arguments: the character you want deposited at the line +break, the number of times you want the character repeated, and a +vertical adjustment factor. +

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

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

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

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

+Mom's default for LINEBREAK_CHAR is +

+

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

Quotes (line for line)

+ +

+Quotes +are always set in +nofill mode, +flush left. This permits entering quotes on a line for line basis in +your text editor and have them come out the same way on output copy. +(See +Blockquotes +for how quotes, in the present sense, differ from longer +passages of cited text.) +

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

+ +Besides indenting quotes, mom further sets them +off from +running text +with a small amount of vertical whitespace top and bottom. In +PRINTSTYLE TYPEWRITE, +this is always one full linespace. In +PRINTSTYLE TYPESET, +it's 1/2 of the prevailing +leading +if the quote fits fully on the page (i.e. with running text above +and below it), otherwise it's a full linespace either above or below +as is necessary to balance the page to the bottom margin. This +behaviour can be changed with the control macro +ALWAYS_FULLSPACE_QUOTES. +

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


+

+ + Macro: QUOTE toggle + + +

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

+

+	.QUOTE
+	Nymphomaniacal Jill
+	Used a dynamite stick for a thrill
+	They found her vagina
+	In North Carolina
+	And bits of her tits in Brazil.
+	.QUOTE END
+
+ +

Quote control macros

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

+

1. Family/font/size/indent

+

+See +Arguments to the control macros. +

+

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

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

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

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

3. Underlining -- UNDERLINE_QUOTES (typewrite only)

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

+If you not only wish that mom not underline +quotes, but also that she set them in italic, you must follow each +instance of QUOTE with the typesetting macro FT I. +Furthermore, since mom underlines all instances +of italics by default in PRINTSTYLE TYPEWRITE, +you must also make sure that ITALIC_MEANS_ITALIC +is enabled (see +PRINTSTYLE TYPEWRITE control macros). + +

4. Manually break a footnoted quote -- BREAK_QUOTE

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

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


+ + + +

Blockquotes (cited passages)

+ +

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

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

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


+

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

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

+

+	.BLOCKQUOTE
+	Redefining the role of the United States from enablers to keep
+	the peace to enablers to keep the peace from peacekeepers is
+	going to be an assignment.
+	.RIGHT
+	\(emGeorge W. Bush
+	.BLOCKQUOTE END
+
+ +If the cited passage runs to more than one paragraph, you MUST +introduce each paragraph -- including the first! -- +with +PP. +

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

Blockquote control macros

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

+

1. Family/font/size/indent

+

+See +Arguments to the control macros. +

+

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

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

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

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


+ + + +

Footnotes

+ + +

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

+ +

+	...the doctrines of Identity as urged by Schelling\c
+	.FOOTNOTE
+	<footnote about who the hell is Schelling>
+	.FOOTNOTE OFF
+	were generally the points of discussion presenting the most
+	of beauty to the imaginative Morella.
+
+ +and be done with it. (Note the obligatory use of the +\c +inline escape.) +Mom takes care of everything: +putting footnote markers in the body of the document, keeping track +of how many footnotes are on the page, identifying the footnotes +themeselves appropriately, balancing them properly with the botton +margin, deferring footnotes that don't fit on the page... Even if +you're using +COLUMNS, +mom knows what to do, and Does The Right Thing. +

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

Footnote behaviour

+

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

+A small amount of vertical whitespace and a short horizontal rule +separate footnotes from the document body. The amount of whitespace +varies slightly from page to page depending on the number of lines +in the footnotes. Mom tries for a nice balance +between too little whitespace and too much, but when push comes to +shove, she'll opt for ample over cramped. The last lines of footnotes +are always flush with the document's bottom margin. +

+If mom sees that a portion of a footnote cannot +be fit on its page, she carries that portion over to the next +page. If an entire footnote can't be fitted on its page (i.e. +FOOTNOTE has been called too close to the bottom), +she defers the footnote to the next page, but sets it with the +appropriate marker from the previous page. +

+In the unfortunate happenstance that a deferred footnote is the +only footnote on its page (i.e. it's marked in the document body with +a star) and the page it's deferred has its own footnotes, +mom separates the deferred footnote from the page's +proper footnote(s) with a blank line. This avoids the confusion that +might result from readers seeing two footnote entries on the same page +identified by a single star (or the number 1 if you've requested +numbered footnotes that begin at 1 on every page). The blank line +makes it clear that the first footnote entry belongs to the previous +page. +

+In the circumstance where a deferred footnote is not the only one on +its page, and is consequently marked by something other than a single +star, there's no confusion and mom doesn't bother +with the blank line. (By convention, the first footnote on a page is +always marked with a single star, so if readers see, say, a dagger or two +stars marking the first footnote entry, they'll know the entry belongs +to the previous page). +

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

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


+

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

+FOOTNOTE is a toggle macro, therefore invoking it +on a line by itself allows you to enter a footnote in the body of a +document. Invoking it with any argument other than INDENT +(i.e. OFF, QUIT, END, X...) tells mom +you're finished. +

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

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

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

+

Footnote control macros

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

+

1. Family/font/size/quad/lead

+

+See +Arguments to the control macros. +

+

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

2. Footnote markers -- FOOTNOTE_MARKERS

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

3. Footnote marker style -- FOOTNOTE_MARKER_STYLE

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

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

+.FOOTNOTE_MARKER_STYLE NUMBER gives you superscript +numbers, both in the document body and in the footnote entries +themselves. By default, footnote numbers increase incrementally +(prev. footnote number + 1) throughout the whole document. You can +ask mom to start each page's footnote numbers at 1 +with .RESET_FOOTNOTE_NUMBER (see below). + +

4. Reset footnote number -- RESET FOOTNOTE NUMBER

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

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

5. Footnote rule -- FOOTNOTE_RULE

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

6. Footnote rule length -- FOOTNOTE_RULE_LENGTH

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

+

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

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

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

+

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

Endnotes

+ + +

+Embedding endnotes into mom documents is accomplished +the same way as embedding +footnotes. The example below is +identical to the one shown in the +introduction to footnotes, +except that .FOOTNOTE has been replaced with +.ENDNOTE. +

+ +

+	...the doctrines of Identity as urged by Schelling\c
+	.ENDNOTE
+	<endnote about who the hell is Schelling>
+	.ENDNOTE OFF
+	were generally the points of discussion presenting the most
+	of beauty to the imaginative Morella.
+
+ +As with footnotes, note the obligatory use of the \c +inline escape. +

+Endnotes differ from footnotes in two ways (other than the fact that +endnotes come at the end of a document whereas footnotes appear in the +body of the document): +
+

    +
  1. Endnotes are always numbered incrementally throughout a + document. In other words, you don't get a choice of marker styles, + as you do with footnotes. +
  2. Endnotes MUST be output explicitly; mom does + not output them for you. In + collated + documents, this allows you to choose whether you + want the endnotes to appear at the end of each chapter or + section, or grouped together at the very end of the document. +
+

+Within endnotes, you may use the document element tags +PP, +QUOTE +and +BLOCKQUOTE. +This provides the flexibility to create endnotes that run to several +paragraphs, as well as to embed cited text within endnotes. +

+Should you wish to change the appearance of quotes or blockquotes that +appear within endnotes, you may do so with the +quote control macros +or +blockquote control macros. +HOWEVER... you must make the changes within each endnote, prior +to invoking QUOTE or BLOCKQUOTE, and +undo them prior to terminating the endnote (i.e. before ENDNOTE +OFF), otherwise the changes will affect subsequent quotes and +blockquotes that appear in the document body as well. + +

Endnote behaviour

+

+When you output endnotes (with +ENDNOTES), +mom finishes processing the last page of your document, +then breaks to a new page for printing the endnotes. If the document +type is +CHAPTER, +the centre part of the +header +(or footer), which, by default, contains a chapter number or title, is +removed. +

+By default, mom starts the endnotes page with a +bold, centered, double-underscored head, "ENDNOTES". +Underneath--flush left, bold, and underscored--she prints the document +title (or, in the case of chapters, the chapter number or title). She +then prints the endnotes. Each endnote is identified by its appropriate +number, in bold, right aligned to two placeholders. The text of the +endnotes themselves is indented to the right of the numbers. +

+If the endnotes are grouped together at the end of a collated document, +each section of the document that contains endnotes is identified by its +own unique title (or chapter number or title), bold, flush left, and +underscored. +

+Of course, all the defaults, as well as the overall style of the +endnotes page, can be changed with the +endnote control macros. +The attentive will notice that endnotes have an awful lot of control +macros. This is because endnotes are like a mini-document unto +themselves, and therefore need not be bound by the style parameters of +the body of the document. + + +

A Note on Endnote Spacing

+ +

+On the endnotes page(s), each new endnote is separated from the +previous endnote by a full line space. This can result in a bottom +margin that hangs, and is the one instance, other than the use of +PARA_SPACE, +where mom allows unequal bottom alignment of pages. +Should you wish to correct this, by adding or subtracting small amounts +of space between endnotes that appear together on an endnote page, make +the adjustment (with +ALD, +RLD +or +SPACE) +at the end of each endnote (i.e. just before invoking +ENDNOTE OFF) +rather than at the top. + + +

Endnotes and columnar documents

+ +

+At present, there is no way to set a document in columns (see +COLUMNS) +and then turn off column mode for endnotes. If your document is set in +columns, your endnotes will be, too. +
+


+ + + +

+ + Macro: ENDNOTE <toggle> +
+ *See
HYPER-IMPORTANT NOTE!!! + + +

+ENDNOTE is a toggle macro, therefore invoking it +on a line by itself allows you to enter an endnote in the body of a +document. Invoking it with any other argument +(i.e. OFF, QUIT, END, X...) tells mom +that you've finished the endnote. +

+NOTE: If an endnote runs to more than one paragraph, +DO NOT begin the endnote with the +PP +tag. Use PP only to introduce subsequent paragraphs. +

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


+

+Macro: ENDNOTES + +

+Unlike footnotes, which mom automatically outputs at the +bottom of pages, endnotes must be explicitly output by you, the user. +ENDNOTES, by itself (i.e. without any argument), is +the macro to do this. +

+Typically, you'll use ENDNOTES at the end of +a document. If it's a single (i.e. not collated) document, +mom will print the endnotes pertaining to it. If it's +a collated document, mom will print all the endnotes +contained within all sections of the document (typically chapters), +appropriately identified and numbered. +

+Should you wish to output the endnotes for each section of a collated +document at the ends of the sections (instead of at the very end of the +document), simply invoke ENDNOTES immediately prior to +COLLATE. +Mom will print the endnotes, identified and numbered +appropriately, on a separate page prior to starting the next section of +the document. Each subsequent invocation of ENDNOTES +outputs only those endnotes that mom collected +after the previous invocation. +
+


+ +

Endnote control macros

+

+Every time you embed an endnote in the body of a document, +mom collects and processes the endnote for +later outputting when you invoke +ENDNOTES. +For this reason, endnote control macros should always be invoked prior +to the first instance of +ENDNOTE/ENDNOTE OFF. +
+

    +
  1. General endnotes-pages style control + +
  2. Endnotes-page header/footer control +
  3. Endnotes-page head control + +
  4. Endnote document-identification title + +
  5. Endnotes-pages endnote numbering style + +
+
+ +

1. General endnotes page style control

+ +

Endnote family/font/quad

+

+See +Arguments to the control macros. +

+

+.ENDNOTE_FAMILY    default = prevailing document family; default is Times Roman
+.ENDNOTE_FONT      default = roman
+.ENDNOTE_QUAD      default = justified
+
+ + + +

Endnote point size

+

+Macro: ENDNOTE_PT_SIZE <base type size of endnotes> + +

+Unlike most other control macros that deal with size of document +elements, ENDNOTE_PT_SIZE takes as its argument an +absolute value, relative to nothing. Therefore, the argument represents +the size of endnote type in +points, +unless you append an alternative +unit of measure. +For example, +

+

+	.ENDNOTE_PT_SIZE 12
+
+ +sets the base point size of type on the endnotes page to 12 +points, whereas +

+

+	.ENDNOTE_PT_SIZE .6i
+
+ +sets the base point size of type on the endnotes page to 1/6 of an +inch. +

+The type size set with ENDNOTE_PT_SIZE is the size of +type used for the text of the endnotes, and forms the basis from which +the point size of other endnote page elements is calculated. +

+The default for +PRINTSTYLE TYPESET +is 12 points (the same default size used in the body of the document). + + + +

Endnote lead

+

+Macro: ENDNOTE_LEAD <base leading of endnotes> + +

+Unlike most other control macros that deal with leading of document +elements, ENDNOTE_LEAD takes as its argument an +absolute value, relative to nothing. Therefore, the argument represents +the +leading +of endnotes in +points +unless you append an alternative +unit of measure. +For example, +

+

+	.ENDNOTE_LEAD 14
+
+ +sets the base leading of type on the endnotes page to 14 +points, whereas +

+

+	.ENDNOTE_LEAD .5i
+
+ +sets the base leading of type on the endnotes page to 1/2 inch. +

+The default for +PRINTSTYLE TYPESET +is 14 points. + + + +

Endnote paragraph indent

+

+Macro: ENDNOTE_PARA_INDENT <amount to indent first line of paragraphs in endnotes> +
+*Requires a unit of measure + +

+ENDNOTE_PARA_INDENT works exactly the same way as +PARA_INDENT, +except that the indent given is the amount by which to indent the first +lines of endnote paragraphs, not document body paragraphs. +

+The default is 1.5 +ems +for +PRINTSTYLE TYPESET; +1/2 inch for +PRINTSTYLE TYPEWRITE. + +

+NOTE: The first line of the first paragraph of endnotes +(the one attached immediately to the identifying endnote number) is +never indented. Only subsequent paragraphs are affected by +ENDNOTE_PARA_INDENT. + + + +

Endnote paragraph spacing

+

+Macro: ENDNOTE_PARA_SPACE <toggle> + +

+ENDNOTE_PARA_SPACE works exactly the same way as +PARA_SPACE, +except that it inserts a blank line between endnote paragraphs, not +document body paragraphs. +

+The default is not to insert a blank line between paragraphs in +endnotes. +

+NOTE: Each endnote itself is always separated from any +previous endnote by a line space. ENDNOTE_PARA_SPACE +refers only to paragraphs that appear within each discrete endnote. + +

2. Endnotes-page header/footer control

+

+If you wish to modify the header/footer that appears on endnotes +page(s), make the changes before you invoke +ENDNOTES, +not afterwards. +

+Except in the case of +DOCTYPE CHAPTER, +mom prints the same header or footer used throughout +the document on the endnotes page(s). Chapters get treated differently +in that, by default, mom does not print the +header/footer centre string (normally the chapter number or chapter +title.) In most cases, this is what you want. However, should you +not want mom to remove the centre string from +the endnotes page(s) headers/footers, invoke +ENDNOTES_HEADER_CENTER +with no argument. + +

Endnotes page(s) header/footer center string

+

+Macro: ENDNOTES_HEADER_CENTER toggle + +

+If your +DOCTYPE +is CHAPTER and you want mom to include +a centre string in the headers/footers that appear on endnotes pages, +invoke ENDNOTES_HEADER_CENTER (or +ENDNOTES_FOOTER_CENTER) with no argument. +Mom's default is NOT to print the center string. +

+If, for some +reason, having enabled the header/footer center string on endnotes +pages, you wish to disable it, invoke the same macro with any argument +(OFF, QUIT, Q, X...). + +

3. Endnotes page head control

+ + + +

Endnotes-page head string

+

+Macro: ENDNOTE_STRING "<head to print at the top of endnotes>" + +

+By default, mom prints the word "ENDNOTES" +as a head at the top of the first page of endnotes. If you want her +to print something else, invoke ENDNOTE_STRING with +the endnotes-page head you want, surrounded by double-quotes. If +you don't want a head at the top of the first endnotes-page, invoke +ENDNOTE_STRING with a blank argument (either two +double-quotes side by side -- "" -- or no argument +at all). + + + +

Endnotes-page head control

+

+See +Arguments to the control macros. +

+

+.ENDNOTE_STRING_FAMILY    default = prevailing document family; default is Times Roman
+.ENDNOTE_STRING_FONT*     default = bold
+.ENDNOTE_STRING_SIZE      default = +1
+.ENDNOTE_STRING_QUAD      default = centered
+
+*Relative to the size of the endnotes text (set with ENDNOTE_PT_SIZE)
+
+ + + +

Endnotes-page head underscoring

+

+Macro: ENDNOTE_STRING_UNDERSCORE toggle | 2 + +

+Invoked by itself, ENDNOTE_STRING_UNDERSCORE will +underscore the endnotes-page head. Invoked with the argument 2 +(i.e. the digit 2), ENDNOTE_STRING_UNDERSCORE will +double-underscore the head. Invoked with any other argument, the macro +disables underscoring of the head. +

+Mom's default is to double-underscore the +head, therefore if you want no underscoring, you must insert +.ENDNOTE_STRING_UNDERSCORE OFF (or QUIT, X, NO, +NONE, etc.) into your document prior to outputting endnotes with +ENDNOTES. + + + +

4. Endnote document-identification title

+

Endnote document-identification title string

+

+Macro: ENDNOTE_TITLE "<title to identify a document in endnotes>" + +

+By default, mom identifies the document(s) to which +endnotes belong by the document title(s) given to the +TITLE +macro. If you want her to identify the document(s) another way, +invoke ENDNOTE_TITLE with the identifying title you +want, surrounded by double-quotes. If you don't any identifying title, +invoke ENDNOTE_TITLE with a blank argument (either two +double-quotes side by side -- "" -- or no argument +at all). + + + +

Endnote document-identification title control

+

+See +Arguments to the control macros. +

+

+.ENDNOTE_TITLE_FAMILY    default = prevailing document family; default is Times Roman
+.ENDNOTE_TITLE_FONT      default = bold
+.ENDNOTE_TITLE_SIZE*     default = 0
+.ENDNOTE_TITLE_QUAD      default = left
+
+*Relative to the size of the endnotes text (set with ENDNOTE_PT_SIZE)
+
+ + + +

Endnote document-identification title underscoring

+

+Macro: ENDNOTE_TITLE_UNDERSCORE toggle + +

+Inovked by itself, ENDNOTE_TITLE_UNDERSCORE will +underscore the endnote document-identification title. Invoked with any +other argument, the macro disables underscoring of the title. +

+Mom's default is to underscore the document-identification title, therefore if you want no underscoring, you must +insert .ENDNOTE_TITLE_UNDERSCORE OFF (or QUIT, X, NO, +NONE, etc.) into your document prior to outputting endnotes with +ENDNOTES. + +at all. + + + +

5. Endnotes-pages endnote numbering style

+ +

Endnote numbering style control

+

+See +Arguments to the control macros. +

+Please note that the control macros for endnote numbering affect only +the numbers that appear on the endnotes pages themselves, not the +endnote numbers that appear in the body of the document(s). +

+

+.ENDNOTE_NUMBER_FAMILY    default = prevailing document family; default is Times Roman
+.ENDNOTE_NUMBER_FONT      default = bold
+.ENDNOTE_NUMBER_SIZE*     default = 0
+
+*Relative to the size of the endnotes text (set with ENDNOTE_PT_SIZE)
+
+ +

Endnote numbering alignment

+

+By default, mom hangs the numbers on endnotes pages, +aligned right to two placeholders, producing this: +

+ +

+	 9. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+	    sed diam nonumy eirmod tempor invidunt ut labore et
+	    dolore magna aliquyam erat, sed diam voluptua.
+
+	10. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+	    sed diam nonumy eirmod tempor invidunt ut labore et
+	    dolore magna aliquyam erat, sed diam voluptua.
+
+ +The macros to alter this behaviour are +
+ +
+
+ + + +

+ + Macro: ENDNOTE_NUMBERS_ALIGN_RIGHT <number of placeholders> + +

+ENDNOTE_NUMBERS_ALIGN_RIGHT takes one (non-optional) +argument: the number of placeholders to reserve for right alignment of +endnote numbers. +

+For example, if you have fewer than ten endnotes, you might want to do +

+

+	.ENDNOTE_NUMBERS_ALIGN_RIGHT 1
+
+ +which would ensure that the endnote numbers hang, but are all flush +with the page's left margin. If, god help you, you have over a hundred +endnotes, you'd want to do +

+

+	.ENDNOTE_NUMBERS_ALIGN_RIGHT 3
+
+ +to ensure that the numbers hang and are properly right-aligned. +
+
+ + + +

+ + Macro: ENDNOTE_NUMBERS_ALIGN_LEFT + +

+If you don't want the endnote numbers to hang and right-align, invoke +ENDNOTE_NUMBERS_ALIGN_LEFT, which doesn't require any +argument. This disables hanging and right-alignment of endnote numbers, +so that the example +above +comes out like this: +

+

+	9. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+	sed diam nonumy eirmod tempor invidunt ut labore et
+	dolore magna aliquyam erat, sed diam voluptua.
+
+	10. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+	sed diam nonumy eirmod tempor invidunt ut labore et
+	dolore magna aliquyam erat, sed diam voluptua.
+
+ +
+
+ + + +

Terminate document processing

+ + +

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

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


+

+ + Macro: FINIS + + +

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

+NOTE: If you don't use FINIS, +and you don't want +footers +(if they're on) or a page number at the bottom of the last page of +a document, you have to turn them off manually, as the last two +lines of your document file, like this: +

+

+	.FOOTERS OFF
+	.PAGINATE OFF
+
+ +

Changing the FINIS string

+ +

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

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

+

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

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

+

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

+


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

DOCUMENT PROCESSING WITH MOM +

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

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

+

+
+ +

Introduction to document processing

+

+As explained in +Document processing with mom, +document processing uses markup tags to identify document elements +like heads, paragraphs, and so on. The tags are, of course, macros, +but with sensible, readable names that make them easy to grasp and +easy to remember. (And don't forget: if you don't like the +"official" name of a tag -- too long, cumbersome +to type in, not "intuitive" enough -- you can change it +with the +ALIAS +macro.) +

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

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


+ + +

Some document defaults

+ +As is to be expected, mom has defaults for everything. +If you want to know a particular default, read about it in the +description of the pertinent tag. +

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

+

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

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


+ + +

IMPORTANT NOTE on leading/spacing and bottom margins

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

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

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

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

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


+ +

Document setup

+ + +

Tutorial -- Setting up a mom document

+
+

+There are four "parts" to setting up a mom +doc (three, actually, with one optional). Before we proceed, though, +be reassured that something as simple as +

+

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

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

+

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

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

Step 1

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

+

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

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

+

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

Step 2

+ +Once you've given mom the reference information she +needs, you tell her how you want your document formatted. What kind +of document is it? Should it be typeset or typewritten? Is this +a "final" copy (for the world to see) or just a draft? +Mom calls the macros that answer these questions +"the docstyle macros." They are: +

+

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

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

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

+

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

Step 3

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

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

+

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

Step 4

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

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

+

+	.TITLE    "My Pulitzer Winner"
+	.AUTHOR   "Joe Blow"
+	.DRAFT     7
+	.REVISION  39
+	\#
+	.DOCTYPE     DEFAULT
+	.PRINTSTYLE  TYPESET
+	.COPYSTYLE   DRAFT
+	\#
+	.FAMILY   H
+	.PT_SIZE  12
+	.LS       14
+	.QUAD     LEFT    \"ie. rag right
+	.FOOTERS
+	.LINEBREAK_CHAR *
+	\#
+	.START
+
+ +As pointed out earlier, Joe Blow is no typographer. Given that all he +needs is a printed draft of his work, a simpler setup would have been: +

+

+	.TITLE    "My Pulitzer Winner"
+	.AUTHOR   "Joe Blow"
+	.DRAFT     7
+	.REVISION  39
+	\#
+	.PRINTSTYLE  TYPEWRITE
+	.COPYSTYLE   DRAFT
+	\#
+	.START
+
+ +.PRINTSTYLE TYPEWRITE, above, means that Joe's work +will come out "typewritten, double-spaced", making the +blue-pencilling he (or someone else) is sure to do much +easier (which is why many publishers and agents still insist on +typewritten, double-spaced copy). +

+When J. Blow stops re-writing and decides to print off a final, +typeset copy of his work for the world to see, he need only +make two changes to the (simplified) setup: +

+

+	.TITLE    "My Pulitzer Winner"
+	.AUTHOR   "Joe Blow"
+	.DRAFT     7
+	.REVISION  39
+	\#
+	.PRINTSTYLE  TYPESET  \"first change
+	.COPYSTYLE   FINAL    \"second change
+	\#
+	.START
+
+ +In the above, .DRAFT 7, .REVISION 39, and .COPYSTYLE +FINAL are actually superfluous. The draft and revision numbers +aren't used when COPYSTYLE is FINAL, +and COPYSTYLE FINAL is mom's +default unless you tell her otherwise. BUT... to judge from the +number of drafts already, J. Blow may very well decide his +"final" version still isn't up to snuff. Hence, he might +as well leave in the superfluous macros. That way, when draft 7, +rev. 62 becomes draft 8, rev. 1, he'll be ready to tackle his Pulitzer +winner again. +
+
+ + + + +

The Reference Macros

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

Reference macros list

+
+ + + + + +
+

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

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

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


+

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

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


+

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

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

+

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

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


+

+ +Macro: CHAPTER <chapter number> + +

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

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

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

+

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

+ +Macro: DRAFT <draft #> + +

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

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

+

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

+ +Macro: REVISION <revision #> + +

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

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

+

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

The Docstyle Macros

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

Docstyle macros list

+
+ + + + + +
+

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

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

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

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

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

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

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

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

Special Note on CHAPTER

+In novels, new chapters are generally (but not always) +introduced by "Chapter #". Other types of documents +(reports and so on) often require specific titles for chapters. +If your document is of this latter type, use DOCTYPE +CHAPTER in the following way: +
+
    +
  1. Omit the + reference macro + CHAPTER +
  2. Invoke + .CHAPTER_STRING + with the title you'd like the chapter to have (enclosed + in double-quotes, of course). +
+

+Here's a recipe for setting up a chapter entitled "The DMCA +Nazis". +

+	.AUTHOR "Outraged Hacker"
+	.TITLE  "Limiting Copyright"
+	\#
+	.DOCTYPE    CHAPTER
+	.PRINTSTYLE TYPESET
+	\#
+	.CHAPTER_STRING "The DMCA Nazis"
+
+
+ + + +
+

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

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

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

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

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

+In short, TYPEWRITE never produces effects other than +those available on a typewriter. Don't be fooled by how brainless +this sounds; mom is remarkably sophisticated when +it comes to conveying the typographic sense of a document within the +confines of TYPEWRITE. +

+The primary uses of TYPEWRITE are: outputting hard +copy drafts of your work (for editing), and producing documents +for submission to publishers and agents who (wisely) insist on +typewritten, double-spaced copy. To get a nicely typeset version of +work that's in the submission phase of its life (say, to show fellow +writers for critiquing), simply change TYPEWRITE +to TYPESET and print out a copy. +

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

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

TYPESET defaults

+
+	Family            = Times Roman
+	Point size        = 12.5
+	Paragraph leading = 16 points, adjusted
+	Fill mode         = justified
+	Hyphenation       = enabled
+	                    max. lines = 2
+	                    margin = 36 points
+	                    interword adjustment = 1 point
+	Kerning           = enabled
+	Ligatures         = enabled
+	Smartquotes       = enabled
+	Word space        = groff default
+	Sentence space    = 0
+
+ +

TYPEWRITE defaults

+
+	Family            = Courier
+	Italics           = underlined
+	Point size        = 12
+	Paragraph leading = 24 points, adjusted; 12 points for SINGLESPACE
+	Fill mode         = left
+	Hyphenation       = disabled
+	Kerning           = disabled
+	Ligatures         = disabled
+	Smartquotes       = disabled
+	Word space        = groff default
+	Sentence space    = groff default
+	Columns           = ignored
+
+ +

PRINTSTYLE TYPEWRITE control macros

+

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

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

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

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

+

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

+While most of the +control macros +have no effect on PRINTSTYLE TYPEWRITE, there +is an important exception: +HEADER_SIZE +(and by extension, FOOTER_SIZE). This is +particularly useful for reducing the point size of +headers/footers should they become crowded (quite likely to +happen if the title of your document is long and your +COPYSTYLE +is DRAFT). +
+ + + +


+

+ +Macro: COPYSTYLE DRAFT | FINAL + +

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

+COPYSTYLE DRAFT exhibits the following behaviour: +
+

    +
  1. documents start on page 1, whether or not you + request a different starting page number with + PAGENUMBER +
  2. page numbers are set in lower case roman numerals +
  3. the draft number supplied by + DRAFT + and a revision number, if supplied with + REVISION + (see + reference macros), + appear in the center part of + page headers + (or footers, depending on which you'ves selected) along with + any other information that normally appears there. +
+

+IMPORTANT: If you define your own center part for page +headers with +HEADER_CENTER, +no draft and/or revision number will appear there. If you want draft +and revision information in this circumstance, use +DRAFT_WITH_PAGENUMBER. +

+COPYSTYLE FINAL differs from DRAFT in that: +
+

    +
  1. it respects the starting page number you give the document +
  2. page numbers are set in normal (arabic) digits +
  3. no draft or revision number appears in the page headers +
+

+NOTE: The center part of page headers can get crowded, +especially with +DOCTYPE CHAPTER +and +DOCTYPE NAMED, +when the COPYSTYLE is DRAFT. +Three mechanisms are available to overcome this problem. One is to +reduce the overall size of headers (with +HEADER_SIZE). +Another, which only works with +PRINTSTYLE TYPESET, +is to reduce the size of the header's centre part only (with +HEADER_CENTER_SIZE). +And finally, you can elect to have the draft/revsion information +attached to page numbers instead of having it appear in the center +of page headers (see +DRAFT_WITH_PAGENUMBER). +
+


+ + + +

Changing type/style parameters prior to START

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

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

+

+ +
+

Using typesetting macros prior to START

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

+

+	L_MARGIN         Left margin of pages, including headers/footers
+	R_MARGIN         Right margin of pages, including headers/footers
+	T_MARGIN         The point at which running text (i.e. not
+	                 headers/footers or page numbers) starts on each page
+	B_MARGIN         The point at which running text (i.e. not
+	                 headers/footers or page numbers) ends on each page
+
+	(PAGE            If you use PAGE, its first four arguments have the
+	                 same meaning as L_ R_ T_ and B_MARGIN above.)
+
+	LL               The line length for everything on the page;
+	                 equivalent to setting the right margin with R_MARGIN
+	FAMILY           The family of all type in the document
+	PT_SIZE          The point size of type in paragraphs; mom uses this
+	                 calculate automatic point size changes (eg. for heads,
+	                 footnotes, quotes, headers, etc)
+	*LS or AUTOLEAD  The leading used in paragraphs; all leading and spacing
+	                 of running text is calculated from this
+	QUAD             Affects paragraphs only
+
+------
+*See DOC_LEAD_ADJUST
+
+ +Other macros that deal with type style, or refinements thereof +(KERN, LIGATURES, HY, WS, SS, etc.), behave normally. +It is not recommended that you set up tabs or indents prior to +START. +

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


+

Adjusting document leading to fill pages

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

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

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

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

+

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

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

+

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

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


+

Managing the docheader

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

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

+

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

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

+

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

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

How to change the look of docheaders: docheader control macros

+ +

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

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

+

+	    TITLE         bold, 3.5 points larger than running text (not necessarily caps)
+	   Subtitle       medium, same size as running text
+	      by          medium italic, same size as running text
+	   Author(s)      medium italic, same size as running text
+
+	(Document type)   bold italic, underscored, 3 points larger than running text
+
+ +The +family +is the prevailing family of the whole document. + +

The docheader macros to:

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

+

1. Change the starting position

+By default, a docheader starts on the same +baseline +as +running text. +If you'd like it to start somewhere else, use the macro +.DOCHEADER_ADVANCE and give it the distance you want +(measured from the top edge of the paper to the first baseline +of the docheader), like this: +

+

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

+NOTE: If +HEADERS +are OFF, mom's normal top +margin for +running text +(7.5 +picas) +changes to 6 picas (visually approx. 1 inch). Since the +first baseline of the docheader falls on the same baseline +as the first line of running text (on pages after page 1), +you might find the docheaders a bit high when headers are off. +Use +DOCHEADER_ADVANCE +to place them where you want. + + +

2. Adjust the leading

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

+

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

3. Change the family of docheader elements

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

+

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

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

4. Change the font of docheader elements

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

+

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

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

5. Adjust the size of docheader elements

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

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

+

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

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

6. Change the attribution string ("by")

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

+

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

+

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

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

+

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

Setting documents in columns

+ +

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

+SOME WORDS OF ADVICE: +

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

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


+

COLUMNS

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

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

+

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

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

Breaking columns manually

+

+Mom takes care of breaking columns when they reach +the bottom margin of a page. However, there may be times you want to +break the columns yourself. There are two macros for breaking columns +manually: COL_NEXT and COL_BREAK. + + +

+.COL_NEXT breaks the line just before it, +quads +it left (assuming the type is justified or quad left), and moves over +to the top of the next column. If the column happens to be the last +(rightmost) one on the page, mom starts a new page +at the "column 1" position. This is the macro to use when +you want to start a new column after the end of a paragraph. + + +

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

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

+

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

Initiate document processing

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

+START collects the information you gave +mom in the setup section at the top of your file (see +Tutorial -- setting up a mom document), +merges it with her defaults, sets up headers and page numbering, +and prepares mom to process your document using +the document element tags. No document processing takes place until +you invoke START. +
+ + + +


+

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

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

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


+ + + + +

Changing document-wide style parameters after START

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

Macro list

+
+ + +
+

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

+

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

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

+

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

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

+

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

+ + Macro: DOC_FAMILY <family> + +

+

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

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

+

    +
  • the argument is the same as for + PT_SIZE, + and refers to the point size of type in paragraphs +
  • all automatic point size changes (heads, quotes, + footnotes, headers, etc.) are affected by the new size; + anything you do not want affected must be reset to + its former value (see the Control Macros section of + the pertinent document element for instructions on + how to do this) +
+
+ +
+

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

+

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

+IMPORTANT: Do not use DOC_LEAD +in the middle of a page! It should always and only be invoked +immediately prior to a new page, like this: +

+

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

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

+

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

+


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

Goodies

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

Goodies list

+
+ + + + + +
+

Rename macros

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

+The ALIAS macro may well be your best friend. With it, +you can change the name of a macro to anything you like +(provided the new name is not already being used by +mom; see the +list of reserved words). +

+Groff has always been a bit intimidating for new users because +its standard macro packages use very terse macro names. +Mom doesn't like people to feel intimidated; she wants +them to feel welcome. Consequently, she tries for easy-to-grasp, +self-explanatory macro names. However, mom knows +that people have their own ways of thinking, their own preferences, +their own habits. Some of her macro names may not suit you; they +might be too long, or aren't what you automatically think of +when you want to do a particular thing, or might conflict with habits +you've developed over the years. +

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

+

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

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

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

+

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

+

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

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

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


+

Hide input lines from output

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

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

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

+

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

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

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


+

Suspend/re-invoke traps

+
+Macro: TRAP toggle + +

+Traps are vertical positions on the output page at which you or +mom have instructed groff to start doing +something automatically. Commonly, this is near the bottom of +the page, where automatic behind-the-scenes processing is needed +in order for one page to finish and another to start. +

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

+

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

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


+

Smartquotes

+
+Macro: SMARTQUOTES toggle + +

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

+Typographically, there is a difference between the inch-mark and +doublequotes -- a BIG difference. Sadly, typewriters and computer +keyboards supply only one: the inch-mark. While using inches for +doublequotes is, and always has been, acceptable in typewriter-style +copy, it has never been, and, God willing, never will be acceptable in +typeset copy. Failure to turn inches into quotes is the first thing +a professional typesetter notices in documents prepared by amateurs. +And you don't want to look like an amateur, do you? +

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

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

+NOTE: SMARTQUOTES does not work on +single quotes, which most people input with the apostrophe (found at +the right-hand end of the "home row" on a QWERTY keyboard). +Groff will interpret all instances of the apostrophe as an apostrophe, +making the symbol useless as an open-single-quote. For open single +quotes, input the backtick character typically found under the tilde +on most keyboards. (Pour nous autres, "backtick" veut dire +l'accent grave.) +Here's an example of correct input copy with single quotes: +

+

+	"But she said, `I don't want to!'"	
+
+ +ADDITIONAL NOTE: Whether or not you have +SMARTQUOTES turned on, get into the habit of entering +the foot- and inch-marks, when you need them, with the +inline escapes +\*[FOOT] and \*[INCH], instead +of ' and ". +
+ + + +
+

Convert to upper case

+
+Macro: CAPS toggle + +

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

+

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

+

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

Single underscore

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

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

+

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

+

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

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

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

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

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


+

Double underscore

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

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

+

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

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

+

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

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

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


+

Underline text -- Courier font only!

+
+Macro: UNDERLINE toggle + +

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

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

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


+

Inline escape for underlining -- Courier font only!

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

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

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

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

+

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

+

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

Insert space into lines

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

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

+PAD calculates the difference between the length of +text on the line and the distance remaining to its end, then inserts +the difference (as whitespace) at the place(s) you specify. +

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

+

+	Date             Signature                               |
+
+ +The person signing the agreement is supposed to fill in the date +as well as a signature. Space needs to be left for both, but +the exact amount is neither known, nor important. All that +matters is that there be a little space after Date, and rather +more space after Signature. (In the above, | represents +the end of the line at the prevailing line length.) +

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

+

+	.LL 30P
+	.PAD "Date#Signature###"
+
+ +When the line is output, the space remaining on the line, after +"Date" and "Signature" have been taken into +account, is split into four (because there are four # signs). +One quarter of the space is inserted between Date and Signature, +the remainder is inserted after Signature. +

+One rarely wants merely to insert space in a line; one usually +wants to fill it with something, hence PAD is +particularly useful in conjunction with +string tabs. +The following uses the Date/Signature example above, but adds +rules into the whitespace through the use of string tabs and +groff's line drawing function, +\l. +

+

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

+Basically, what the example does is: +
+

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

+NOTE: Because the pound sign (#) is used as the pad +marker, you can't use it as a literal part of the pad string. If you +need the sign to appear in the text of a padded line, change the pad +marker with PAD_MARKER. Also, be aware +that # as a pad marker only applies within the PAD +macro; at all other times it prints literally, just as you'd expect. +

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


+

Change/set the marker used with PAD

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

+If you need to change mom's default pad marker +(#), either because you want a literal # in the padded line, +or simply because you want to use another character instead, use +PAD_MARKER, whose argument is the new pad marker +character you want. +

+

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

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


+

Inline escape to add leaders to a line

+
+Inline: \*[LEADER] + +

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

+NOTE: \*[LEADER] fills lines +or tabs right to their end. You cannot insert leaders into a +line or tab and have text following the leader on the same line +or in the same tab. Should you wish to achieve such an effect +typographically, create tabs for each element of the line and +fill them appropriately with the text and leaders you need. +String tabs are perfect for this. An +example follows. +

+

+	.LL 30P
+	.PAD "Date\*[ST1]#\*[ST1X]Signature\*[ST2]###\*[ST2X]"
+	.EL
+	.ST 1 J
+	.ST 2 J
+	.TAB 1
+	\*[LEADER]
+	.TN
+	\*[LEADER]
+	.TQ
+
+ +The PAD line sets the words Date and Signature, +and marks string tabs around the pad space inserted in the line. +The string tabs are then "set", called, and filled +with leaders. The result looks like this: +

+

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

Change/set the leader character

+
+Macro: LEADER_CHARACTER <character> + +

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

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

+

+	.LEADER_CHARACTER _
+
+ + + +
+

Drop caps

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

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

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

+Mom will do her very best to get the drop cap to +line up with the first line of text indented beside it, then set +the correct number of indented lines, and restore your left margin +when the number of drop cap lines has been reached. +

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

+

+	.DROPCAP T 3 COND 90
+	he thousand injuries of Fortunato I had borne as best I
+	could, but when he ventured upon insult, I vowed revenge.
+	You who so well know the nature of my soul will not suppose,
+	however, that I gave utterance to a threat...
+
+ +The drop cap, slightly condensed but in the current family and font, +will be three lines tall, with whatever text fills those three +lines indented to the right of the letter. The remainder of the +paragraph's text will revert to the left margin. +

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

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

+WARNING: DROPCAP puts a bit of +a strain on resource-challenged systems. If you have such a +system and use drop caps extensively in a document, be prepared +for a wait while mom does her thing. + +

Support macros for DROPCAP

+Drop caps are the bane of most typesetters' existence. It's +very difficult to get the size of the drop cap right for the +number of drop lines, especially if the drop cap is in a +different family from the prevailing family of running text. +Not only that, but there's the gutter around the drop cap to +take into account, plus the fact that the letter may be too wide +or too narrow to look anything but odd or misplaced. +

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

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

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

DROPCAP_FAMILY

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

+

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

DROPCAP_FONT

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

+

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

DROPCAP_ADJUST

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

+

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

DROPCAP_GUTTER

+ +By default, mom puts three points of space +between the drop cap and the text indented beside it. If you +want another value, use DROPCAP_GUTTER (with a +unit of measure), like this: +

+

+	.DROPCAP_GUTTER 6p
+
+ + + +
+

Superscript

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

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

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

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

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

+


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

DOCUMENT HEADERS, FOOTERS, AND PAGINATION

+
+ + + + +

Introduction

+
+ +

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

+

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

+Because headers and footers are virtually identical, this +documentation addresses itself only to headers. In all cases, +unless otherwise noted, descriptions of headers +describe footers as well. +

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

+Author's note: Left to their own devices (i.e. if +you're happy with the way mom does things by default), +headers are something you never have to worry about. You can skip +reading this section entirely. But if you want to change them, be +advised that headers have more macros to control their appearance than +any other document element. The text of this documentation becomes +correspondingly dense at this point. + +

+NOTE: While the single page number that +mom generates in either the top or bottom margin +above or below running text is technically a kind of header/footer, +mom and this documentation treat it as a +separate page element. + +

General description of headers/footers

+

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

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

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

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

+By default, mom prints a horizontal rule beneath +headers to separate them visually from running text. In the case of +footers, the rule is above running text. You can increase +or decrease the space between the header and the rule if you like (with +HEADER_RULE_GAP), +or remove it completely. + +

Default specs for headers/footers

+

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

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

+

+TYPE SPEC    HEADER LEFT         HEADER CENTER       HEADER RIGHT
+---------    -----------         -------------       ------------
+Family       document default    document default    document default
+Font         roman               italic              roman
+All caps     no                  no                  yes
+Size*        -.5 (points)        -.5 (points)        -2 (points)
+            (-2 if all caps)    (-2 if all caps)    (-.5 if not all caps)
+
+*Relative to the point size of type in paragraphs
+
+ +You can, of course, change any of the defaults using the appropriate +control macros. And should you wish to design headers from the ground +up, mom has a special macro, +HEADER_PLAIN, +that removes all type adjustments to headers. The straightforward +type specs for paragraphs are used instead, providing a simple +reference point for any alterations you want to make to the family, +font, size and capitalisation style of any header part. +

Vertical placement and spacing of headers/footers

+

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

+The vertical placement of headers +is controlled by the macro +HEADER_MARGIN, +which establishes the +baseline +position of headers relative to the top edge of the page. +The header rule, whose position is relative to the header itself, +is controlled by a separate macro. +FOOTER_MARGIN establishes the baseline position of +footers relative to the bottom edge of the page. +

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

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

+Footers are treated the same way, the only difference being the +default distances. Mom sets footers 3 picas up from +the bottom of the page, and interrupts the processing of running text 3 +picas (the FOOTER_GAP) above that (again, visually +approx. 1 inch). If you give mom a literal bottom +margin (with B_MARGIN), she ignores the +FOOTER_GAP and interrupts the processing of running +text at whatever bottom margin you gave. +

+If mom is paginating your document (she +does, by default, at the bottom of each page), the vertical +spacing and placement of page numbers, whether at the top +or the bottom of the page, is managed exactly as if the +page numbers were headers (or footers), and are controlled +by the same macros. See +Pagination control. +
+


+ + + + +

Managing headers/footers

+
+ +

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

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

+Please note that headers and footers are mutually exclusive. If +headers are on, footers (but NOT bottom-of-page numbering) are +automatically turned off. Equally, if footers are on, headers +(but NOT top-of-page numbering) are automatically turned off. Thus, if +you'd prefer footers in a document, you need only invoke +FOOTERS; +there's no need to turn headers off first. +
+ + + +


+

+ +Macro: HEADERS toggle + +

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

+

+	.HEADERS OFF
+
+

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

+ADDITIONAL NOTE: If HEADERS +are OFF, mom's normal top +margin for +running text +(7.5 +picas) +changes to 6 picas (visually approx. 1 inch). This does NOT apply +to the situation where footers have been explicitly turned on +(with +FOOTERS). +Explicitly invoking footers moves page numbering to the +top of the page, where its placement and spacing are the same as +for headers. (I.e. the top margin of running text remains 7.5 +picas.) +
+ + + +


+

+ +Macro: FOOTERS toggle + +

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

+

+	.FOOTERS
+
+ +

+FOOTERS automatically disables headers, and +mom shifts the placement of page numbers from their +normal position at page bottom to the top of the page. +

+NOTE: By default, when footers are on, +mom does not print a page number on the first +page of a document, nor on first pages after +COLLATE. +If you don't want this behaviour, you can change it with +PAGENUM_ON_FIRST_PAGE. +
+ + + +


+

+ +Macro: FOOTER_ON_FIRST_PAGE toggle + +

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


+ + + + +

User-defined, single string recto/verso headers/footers

+
+ +

Introduction

+ +Sometimes, you'll find you can't get mom's handling +of 3-part headers or footers to do exactly what you want in the +order you want. This is most likely happen when you want the +information contained in the headers/footers split over two pages, +as is often the case with recto/verso documents. +

+Say, for example, you want recto page headers to contain a document's +author, centered, and verso page headers to contain the document's +title, also centered, like this: +

+

+	+------------------------+   +------------------------+     
+	|         Author         |   |         Title          |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	+------------------------+   +------------------------+     
+
+ +With mom's standard 3-part headers, this isn't +possible, even when +RECTO_VERSO +is enabled. RECTO_VERSO switches the left and +right parts of headers on alternate pages, but the center +part remains unchanged. +

+Anytime you need distinctly different headers on alternate +pages, mom has macros that let you manually +design and determine what goes into headers on recto pages, and +what goes into headers on verso pages. The macros are +HEADER_RECTO +and +HEADER_VERSO. +Both allow you to state whether the header is flush left, centered, +or flush right, and both take a single +string argument +with which, by combining text and +inline escapes, +you can make the headers come out just about any way you want. +Use of the \*[PAGE#] escape is permitted in the +string argument (see +Including the page number in header-left, -center or -right), +and mom provides a special mechanism whereby +it's possible to "pad" it as well. +
+ + + +


+

+ +Macro: HEADER_RECTO LEFT | CENTER | RIGHT "<header recto string>" +Macro: HEADER_VERSO LEFT | CENTER | RIGHT "<header verso string>" +
+ +

+HEADER_RECTO and HEADER_VERSO behave +identically, hence all references to HEADER_RECTO +in this section also refer to HEADER_VERSO. +Furthermore, FOOTER_ can be used instead of +HEADER_ to set up recto/verso footers. +

+The first argument to HEADER_RECTO is the +direction in which you want the header +quadded. +L, C and R may be used in +place of LEFT, CENTER and +RIGHT. The second argument is a string, +surrounded by double-quotes, containing what you want in the +header. HEADER_RECTO disables mom's +normal 3-part headers, therefore anything you want in the +headers must be entered by hand in the string. +

+By default, HEADER_RECTO is set at the same +size, and in the same family and font, as paragraph text. The +control macros +HEADER_FAMILY +and +HEADER_SIZE +may be used to change the default family and size. Changes to +the font(s) within the string must be accomplished with the +inline escapes +\*[ROM], \*[IT], \*[BD], \*[BDI] and +\*[PREV] (see +Changing fonts). +Additional refinements to the style of the header-recto string, +including horizontal spacing and/or positioning, can also be made with +inline escapes. +

+To include the current page number in the string, use the +\*[PAGE#] inline. + +

Padding the HEADER_RECTO/HEADER_VERSO string

+

+You can "pad" the header-recto string, a convenience you'll +appreciate in circumstances such as the following. +

+

+	           VERSO                       RECTO 
+	+------------------------+   +------------------------+     
+	| Author          Page#  |   | Page#            Title |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	|                        |   |                        |     
+	+------------------------+   +------------------------+     
+
+ +To pad the string argument passed to HEADER_RECTO, +begin and end the string (inside the double-quotes) with the caret +character (^). Enter the pound sign (#) at any +point in the string where you want an equalized amount of whitespace +inserted. (If you're unsure what padding is, see +Insert space into lines.) +Note that if you're padding the string, it doesn't matter what +quad direction you give HEADER_RECTO. +

+The situation depicted above is accomplished like this: +

+

+	.HEADER_RECTO LEFT "^\*[PAGE#]#Title^"
+	.HEADER_VERSO LEFT "^Author#\*[PAGE#]^"
+
+ +Note that mom does not interpret the # +in \*[PAGE#] as a padding marker (i.e. as a place +to insert whitespace). +

+IMPORTANT: The +PAD_MARKER +macro, which changes the default pad marker (#) used by +PAD, +has no effect on the pad marker used in the +HEADER_RECTO string. If you absolutely must +have a literal pound sign in your HEADER_RECTO +string, use the escape sequence \N'35' where you want +the pound sign to go. +
+


+ + +

Control macros for headers/footers

+
+

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

Header/footer control macros

+ + + + + + +
+

Header/footer strings

+

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

+To change the text (the "string") of the left, center, +or right part of headers, invoke the appopriate macro above with +the string you want. For example, mom, by default, +prints the document's author in the header-left position. If your +document has, say, two authors, and you want both their names to +appear header-left, change HEADER_LEFT like this: +

+

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

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

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

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

+

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

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

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

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

+

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

Header/footer style

+ +

+Global changes +

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

+Please note that HEADER_FAMILY and +HEADER_FONT have no effect on +PRINTSTYLE TYPEWRITE. +

+

+ +
+

+ + Macro: HEADER_FAMILY <family> + + +

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

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


+

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

+By default, mom makes small adjustments to the size +of each part of a header to achieve an aesthetically pleasing result. +If you'd like her to continue to do so, but would like the overall +appearance of headers to be a little smaller or a little larger, +invoke HEADER_SIZE with + or - the number of +points +(fractions allowed) by which you want her to in/decrease the size +of headers. For example, +

+

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

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

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

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


+

+ + Macro: HEADER_PLAIN + + +

+By default, mom makes adjustments to the font, +size, and capitalization style of each part of headers to achieve +an aesthetically pleasing look. Should you wish to design your own +headers from the ground up without worrying how changes to the various +elements of header style interact with mom's defaults, +invoke HEADER_PLAIN by itself, with no argument. +Mom will disable her default behaviour for headers, +and reset all elements of header style to the same family, font, +and point size as she uses in paragraphs. +

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


+

+Part by part changes +

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

+

+ +
+

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

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

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


+

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

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

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


+

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

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

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


+

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

+HEADER_<POSITION>_CAPS is a +toggle macro. +If you want any part of headers to be set in all caps, +regardless of the capitalization of that part's string as given +to the +reference macros +or as defined by you with the +header string control macros, +simply invoke this macro (using the appropriate position) with no +argument. If you wish to turn capitalization off (say, for the +header-right string that mom capitalizes by +default), invoke the argument with any argument (e.g. OFF, +QUIT, END, X...). +

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


+ + + + +

Header/footer vertical placement and spacing

+
+ +

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


+

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

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

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

+

+	.HEADER_MARGIN .5i
+
+ +If your document uses +footers, +replace HEADER_, above, with +FOOTER_. The argument to +FOOTER_MARGIN is the distance from the bottom +edge of the page to the baseline of type in footers. +

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

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

+By default, page numbers appear at the bottom of the page, therefore +if you want the default position (bottom), but want to change the +baseline placement, use FOOTER_MARGIN. Conversely, +if page numbers are at the top of the page, either because you turned +FOOTERS +on or because you instructed mom to put them +there with +PAGENUM_POS, +you'd use HEADER_MARGIN to change their +baseline placement. +
+ + + +


+

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

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

+As explained in +Vertical placement and spacing of headers/footers, +HEADER_MARGIN + HEADER_GAP determine the +default vertical starting position of running text on the page +UNLESS you have given mom your own top margin +(with +T_MARGIN). If you give +a top margin, mom ignores +HEADER_GAP; running text starts at your stated +top margin. + +

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

+

+	.HEADER_GAP 2c
+
+ +If your document uses +footers, +replace HEADER_, above, with +FOOTER_. The argument to +FOOTER_GAP is the distance from the +baseline of type in footers to the last baseline of running text +on the page. +

+As explained in +Vertical placement and spacing of headers/footers, +FOOTER_MARGIN + FOOTER_GAP determine the +default vertical end position of running text on the page +UNLESS you have given mom a bottom margin +(with +B_MARGIN). If you give +a bottom margin, mom ignores +FOOTER_GAP; running text ends at your stated +bottom margin. +

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

+NOTE: Mom uses +HEADER_GAP and +FOOTER_GAP to establish the start and end baseline +positions of running text with respect to both headers and footers +AND page numbers. If you wish to change the gap between +the last line of running text and a bottom page number, use +FOOTER_GAP. If page numbers are at the top of the +page, change the gap between the number and the first line of running +text with HEADER_GAP. +
+


+ + + + +

Header/footer separator rule

+
+ +

+The header/footer separator rule is a modest horizontal rule, +set slightly below the header (or above the footer), that runs +the length of the +header +and helps separate it visually from +running text. If +you don't want the rule, you can turn it off. If you want it, +but at a different vertical position relative to the header (or +footer), you can alter its placement. +

+

+ +
+

+ +Macro: HEADER_RULE toggle + +

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

+

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

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


+

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

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

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

+

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

+ADDITIONAL NOTE: When using +FOOTER_RECTO +and +FOOTER_VERSO, +make sure that the default size for footers +(FOOTER_SIZE) +is set to the largest size of type that will be used in the +footer or mom may not get the rule gap right. +Inline changes to the size of type in +FOOTER_RECTO and FOOTER_VERSO +should always be negative (smaller) than the default. +
+


+ + +

Pagination

+
+ +

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

Pagination macros list

+ + + +
+ + + +
+

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

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

+

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

+ +Macro: PAGENUMBER <number> + +

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

+PAGENUMBER need not be used only to give +mom a "first page" number. It can be used at +any time to tell mom what number you want a +page to have. Subsequent page numbers will, of course, be +incremented by 1 from that number. +
+ + + +


+

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

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

+ + +
DIGIT=arabic digits (1, 2, 3...) +
ROMAN=upper case roman numerals (I, II, III...) +
roman=lower case roman numerals (i, ii, iii...) +
ALPHA=upper case letters (A, B, C...) +
alpha=lower case letters (a, b, c...)
+
+ + + +


+

+ +Macro: PAGENUM_ON_FIRST_PAGE toggle + +

+This macro applies only if you've enabled +FOOTERS. +If FOOTERS are on, mom automatically +places page numbers at the tops of pages except on +the first page of a document (or on first pages after +COLLATE). If you'd +like the page number to appear on "first" pages when +footers are on, invoke PAGENUM_ON_FIRST_PAGE with +no argument. Any other argument turns the feature off (OFF, +QUIT, END, X...). +

+As with most of the control macros, +PAGENUM_ON_FIRST_PAGE can be invoked at any time, +meaning that if you don't want a page number on the very first +page of a document, but do want one on pages that appear after +COLLATE, omit it before the first +START +of the document, then invoke it either just before or after your +first COLLATE. +
+ + + +


+

+ +Macro: DRAFT_WITH_PAGENUMBER + +

+Sometimes, in +COPYSTYLE DRAFT, +the center part of page headers gets overcrowded because of the draft +and revision information that go there by default. +DRAFT_WITH_PAGENUMBER is one way to +fix the problem. +

+Invoked without an argument, DRAFT_WITH_PAGENUMBER +removes draft/revision information from the page headers and attaches +it instead to the document's page numbering, in the form +

+

+    Draft #, Rev. # / <pagenumber>
+
+ +See the note in +COPYSTYLE DRAFT +for other ways of dealing with crowded page headers when formatting +draft-style copy. +
+
+ + + +

Pagination control macros

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

1. Page number family/font/size

+

+See +Arguments to the control macros. +

+

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

2. Page number position

+

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

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

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

+

+	.PAGENUM_POS TOP RIGHT
+
+ +

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

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

+

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

+


+Next   +Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/groff/contrib/mom/momdoc/inlines.html b/contrib/groff/contrib/mom/momdoc/inlines.html new file mode 100644 index 0000000..99cfaf7 --- /dev/null +++ b/contrib/groff/contrib/mom/momdoc/inlines.html @@ -0,0 +1,595 @@ + + + +Mom -- Inline escapes + + + + + +Next   +Prev   +Back to Table of Contents + + +

+ Inline escapes +

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

Introduction to inline escapes

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

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

+In groff, the escape character is the backslash ( \ ). Groff interprets +everything following the backslash as instructions, not literal text, +until the escape sequence is complete. Should you need the actual +backslash character as part of a line of text, simply enter it twice +( \\ ). Groff understands that this means "please print a backslash +character." (You can also use \e to print a literal +backslash.) +

+Groff has a number of ways of recognising what constitutes a complete +escape sequence. This is both a boon and a curse; some escape +sequences have no terminating delimiter and consequently become +difficult to distinguish from real input text. Others require +the use of an opening parenthesis with no corresponding closing +parenthesis. Still others need to be enclosed in square brackets. +

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

+Despite mom's best intentions, there are still +a number of typesetting functions that can only be accomplished +with groff's native inline escapes. I've listed the ones that +strike me as essential, but there are many others. If you want +to know what they are, please read the +canonical reference materials +pertaining to groff. +

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

+

Inlines index

+ +
+ + + +

Mom's personal inlines

+ +

Changing fonts

+ +

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

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

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

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


+

Changing point size

+ +

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

+

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

+

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

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

+

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

Pairwise kerning

+ +

+Pairwise kerning means moving specific letter pairs closer +together or further apart (see +Typesetting terms, kerning +for more details). +

+Mom permits inline pairwise +kerning through the use of the inline escapes +

+ +
\*[BU #]Closes the space between letters (Back Units). +
\*[FU #]Opens the space between letters (Forward Units). +
+
+"#" is the number of kern units +by which to close or open the space between letters. Decimal fractions +are allowed. +

+For example, +

+

+	THE HUMAN COST OF COMMODIF\*[FU 1]YING FRESH W\*[BU 4]A\*[BU 5]TER
+
+ +moves the letter Y in "COMMODIFYING" 1 kern unit away from +the letter F, and the letter A in "WATER" 4 kern units closer +to the letter W. Additionally, the letter T in "WATER" is moved 5 kern +units closer to the letter A. +

+For backward compatibility, the forms +

+ +
\*[BU1]...\*[BU36] +Move back 1...36 +kern units +
\*[FU1]...\*[FU36] +Move forward 1...36 +kern units +
+
+also exist (i.e. with no space before the number of kern units desired, +up to a limit of 36). +

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


+

Horizontal inline movement

+ +

+Sometimes, you may need to insert a specified amount amount of white +space into an +output line, +or -- occasionally -- back up to a +previous position on an +output +line in order to create special typographic effects. +

+Mom's inline escapes for these horizontal movements are +

+ + +
\*[FWD #<unit>] +Move forward inline the specified number of +units of measure; +decimal fractions are allowed. + +
\*[BCK #<unit>] +Move backward inline the specified number of +units of measure; +decimal fractions are allowed. +
+

+For example, +

+

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

+NOTE: For backward compatibility, the forms +

+ + +
\*[BP.25]...\*[BP12.75]Move back .25...12.75 points +
\*[FP.25]...\*[FP12.75]Move forward .25...12.75 points
+
+also exist (i.e. with no space before the digit and points being +the unit of measure, hence no unit of measure required). Both +accept quarter points, so it's possible to do, for example, +\*[FP.5] or \*[BP1.25] up to a limit +of 12.75 points. +
+ + + +


+

Vertical inline movement

+ +

+If you need to move portions of type up or down on a line, +mom provides the following inline escapes: +

+ + +
\*[UP #<unit>] +Move up inline the specified number of +units of measure + +
\*[DOWN #<unit>] +Move down inline the specified number of +units of measure +
+
+For example, +

+

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

+NOTE: For backward compatibility, the following are +also available: +

+ + +
\*[ALD.25]...\*[ALD12.75] +Advance lead .25...12.75 points (move downward) +
\*[RLD.25]...\*[RLD12.75] +Reverse lead .5...12.75 points (move upward)
+

+

+Both \*[ALD] and \*[RLD] work in +points, hence you musn't use a unit of measure. +
+ + + +


+

Full measure rules

+ +

+I find I often need rules drawn to the full measure of the current line +or tab length. The official way to do this is \l'\n(.lu', +which is annoying to type, and doesn't mean a whole heck of a lot if +you're new to groff. The inline, \*[RULE], is a simple +replacement for \l'\n(.lu'. Use it whenever you need +a rule drawn to the full measure of the current line or tab length, for +example: +

+

+	.LL 6P
+	\*[RULE]
+
+ +The above draws a rule the full measure of the 6-pica line length. +

+See groff's +Horizontal line drawing function +for more information on drawing horizontal rules. +
+


+ + + +

Groff inline escapes

+ +

Font control with \f

+ +

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

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

+A special instance of \f is +\f[font], where "font" can be a +complete legal family/font name combo. This is especially +useful should you need to change both family and font inline. +For example, if your prevailing family and font are Times Roman +and you want a few words in Courier Bold Italic, you could do +this: +

+

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

Inline horizontal motions with \h

+ +

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

+

+	\h'1.25i'
+
+ +moves you 1.25 inches to the right (forwards) of the horizontal +position on the current +output line. +\h'<distance>' is exactly equivalent to +\*[FWD #<unit>]. +

+

+	\h'-1.25i'
+
+ +moves you 1.25 inches to the left (backwards). +\h'-<distance>' is exactly equivalent to +\*[BCK #<unit>]. +
+ + + +
+

Inline vertical motions with \v

+ +

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

+

+	\v'.6m'
+
+ +moves you (approx.) 2/3 of an +em +downward on the current +output line. +\v'<distance>' is exactly equivalent to +\*[DOWN #<unit>]. +

+

+	\v'-.6m'
+
+ +moves you (approx.) 2/3 of an em upward. +\v'<-distance>' is exactly equivalent to \*[UP #<unit>]. +

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

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


+

String width function \w

+ +

+In the context of mom, the string width inline +\w'string' primarily serves to let you +establish the horizontal measure of something (e.g. indents) based +on the length of a bit of text. For example, if you want a left +indent the length of the word "Examples:" plus a +space, you can set it with the \w inline escape: +

+

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

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


+

Horizontal line drawing function \l

+ +

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

+

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

+For an easy way of drawing rules to the full measure of the current +line or tab length, see +Full measure rules. +

+The weight (thickness) of rules varies according to the point size +in effect when you invoke \l, but you can't fix +the weight with any real precision. A point size of 12 produces +a tastefully moderate rule weight of between one-half and one +point (depending on your printer), and is the point size used by +mom for all macros and routines that create rules. +

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

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


+

Special characters and symbols

+ +

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

+

+    CHARACTER                   ESCAPE SEQUENCE
+    ---------                   ---------------
+
+    Comment line                \#
+    Fixed-width space           \<space>  i.e. backslash followed by a space
+    Unbreakable space           \~
+    Digit-width (figure) space  \0
+    Zero-width character        \&
+    Discretionary hyphen        \%
+    Backslash                   \\ or \e
+    Plus/minus (arithmetic)     \(+-
+    Subtract (arithmetic)       \(mi
+    Multiply (arithmetic)       \(mu
+    Divide (arithmetic)         \(di
+    Em-dash                     \(em
+    En-dash                     \(en
+    Left double-quote           \(lq
+    Right double-quote          \(rq
+    Bullet                      \(bu
+    Ballot box                  \(sq
+    One-quarter                 \(14
+    One-half                    \(12
+    Three-quarters              \(34
+    Degree sign                 \(de
+    Dagger                      \(dg
+    Foot mark                   \(fm
+    Cent sign                   \(ct
+    Registered trademark        \(rg
+    Copyright                   \(co
+    Section symbol              \(se
+
+ +
+Next   +Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/groff/contrib/mom/momdoc/intro.html b/contrib/groff/contrib/mom/momdoc/intro.html new file mode 100644 index 0000000..e21fa3c --- /dev/null +++ b/contrib/groff/contrib/mom/momdoc/intro.html @@ -0,0 +1,386 @@ + + + +What is mom? + + + + + +Next   +Back to Table of Contents + + + +

WHAT IS MOM?

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

Who is mom meant for?

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

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

+Because mom provides both typesetting and document +processing macros, it's safe to say she blurs the distinction between +document processing and document design. While her basic document style +comes with pretty spiffy defaults (okay -- change "spiffy" +to "typographically professional"), you can easily control +how all the various document elements look: titles, page headers and +footers, page numbering, heads, subheads, footnotes and so on can be +made to come out exactly the way you want. And should you need precise +typographic control over elements in a document that fall outside the +range of mom's document element tags, you don't have to +read up on groff +primitives +in order to accomplish what you want; the typesetting macros take +care of that. + + +

Typesetting with mom

+ + +Mom's typesetting macros control the basic parameters +of type: margins, line length, type family, font, point size, +linespacing, and so on. In addition, they allow you to move around +on the page horizontally and vertically, and to set up tabs, indents, +and columns. Finally, they let you adjust such typographic details as +justification style, letter spacing, word spacing, hyphenation, and +kerning. + +

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

+With mom's typesetting macros, you can, if you wish, +create individual output pages that you design from the ground up. +Provided you have not signalled to mom that you +want document processing (via the +START +macro; see below), every macro is a literal command that remains in +effect until you modify it or turn it off. This means that if you +want to create flyers, document covers, surveys, tabulated forms, +curricula vitae and so on, you may do so in the good old-fashioned +way: one step at a time with complete control over every element on +the page. +

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

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

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

Document processing with mom

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

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

Mom's philosophy

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

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

+Groff has traditionally solved the problem of formatting vs. tweaking +by requiring users of the common macro packages (mm, ms, me and their +offspring) to resort to groff +primitives +and +inline escapes +for their special typesetting needs. Not to put too fine a point on +it, groff primitives tend toward the abstruse, and most inline escapes +are about as readable in-line as an encrypted password. This does +not make for happy-camper writers, who either find themselves stuck +with document formatting style they don't really like, or are forced to +learn groff from the ground up -- a daunting task, to say the least. +

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

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

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

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

A note on mom's documentation

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

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

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

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

How to read macro arguments

+ + +

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

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

+

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

Toggle macros

+

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

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

+toggle +
+
+ +

Example 1: an argument requiring double-quotes

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

+

+	.TITLE "My Pulitzer Novel"
+
+ +

Example 2: a macro with required and optional arguments

+
+Macro: TAB_SET <tab #> <indent> <length> [ L | R | C | J [ QUAD ] ] +
+The first required argument is a number that identifies the tab (say, +"3"). The second required argument is an indent from the left margin +(say, 6 picas). The third required argument is the length of the tab +(say, 3 picas). Therefore, at a minimum, when using this macro, +you would enter: +

+

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

+

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

Example 3: a sample toggle macro:

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

+

+	.QUOTE
+	So runs my dream, but what am I?
+	An infant crying in the night
+	An infant crying for the light
+	And with no language but a cry.
+	.QUOTE OFF
+
+ +Alternatively, you could have turned the quote off with END, or +X, or something else. + +

+


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

WRITING LETTERS WITH MOM

+
+ + +

Introduction

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

+Because the letter macros are a subset of the document +processing macros, you can use +control macros +to design correspondence to your own specifications. However, +mom makes no pretence of providing complete design +flexibility in the matter of letters, which are, after all, simple +communicative documents whose only real style requirements are that +they be neat and professional-looking. + +

Tutorial on writing letters

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

+

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

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

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

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

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

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

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

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

+

+	.AUTHOR    "Yannick P. Guique"
+	.DOCTYPE    LETTER
+	.PRINTSTYLE TYPESET
+	.START
+	.DATE
+	August 25, 2004
+	.TO
+	GUILLAUME BARRIÈRES
+	Minidoux Corporation
+	5000 Pannes Drive
+	Redmond, Virginia
+	.FROM
+	Y.P. GUIQUE
+	022 Umask Road
+	St-Sauveur-en-dehors-de-la-mappe, Québec
+	.GREETING
+	Dear Mr. Barrières,
+	.PP
+	It has come to my attention that you have been lobbying the
+	US government to prohibit the use of open source software by
+	endeavouring to outlaw so-called "warranty free"
+	applications.
+	.PP
+	I feel it is my duty to inform you that the success of your
+	operating system with its embedded web browser relies heavily
+	on open source programs and protocols, most notably TCP/IP.
+	.PP
+	Therefore, in the interests of your corporation's fiscal health,
+	I strongly advise that you withdraw support for any US
+	legislation that would cripple or render illegal open source
+	development.
+	.CLOSING
+	Sincerely,
+
+
+ + +

Defaults for letters

+
+ +In letters, mom sets: +

+

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

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

+

+PARAMETER             PRINTSTYLE TYPESET   PRINTSTYLE TYPEWRITE
+---------             ------------------   --------------------
+
+Paper size            8.5 x 11 inches      8.5 x 11 inches
+Left/right margins    1.25 inches          1.25 inches
+Header margin         3.5 picas            3.5 picas
+ (for page numbers)
+Header gap            3 picas              3 picas
+ (for page numbers)
+Family                Times Roman          Courier
+Font                  roman                roman
+Point size            12                   12
+Line space            13.5                 12 (i.e. singlespaced)
+Paragraph indent      3 ems                3 picas
+Spaced paragraphs     yes                  no
+Footers*              yes                  yes
+Footer margin         3 picas              3 picas
+Footer gap            3 picas              3 picas
+Page numbers          top, centered        top, centered
+
+*Footers contain a "next page" number of the form .../#
+
+
+ + +

The letter macros

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

+

+ + + +
+

+ +Macro: DATE + +

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

+

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

+ +Macro: TO + +

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

+

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

+ +Macro: FROM + +

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

+

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

+ +Macro: GREETING + +

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

+

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

+ +Macro: CLOSING + +

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

+

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

+ +Macro: NO_SUITE + +

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

+


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

RECTO/VERSO PRINTING and COLLATING

+
+ + +

Recto/verso and collating

+
+ + + + +

Introduction to recto/verso

+
+ +Recto/verso printing allows you to set up a mom +document in such a way that it can be printed on both sides of a +printer sheet and subsequently bound. +

+With recto/verso, mom automatically takes control +of the following aspects of alternating page layout: +
+

    +
  • switching left and right margins (if they're not equal) +
  • switching the left and right parts of the default 3-part + headers + or + footers + (see the + General description of headers) +
  • switching + HEADER_RECTO + and + HEADER_VERSO + if user-defined, single string recto/verso headers + or footers are used in place of the default 3-part + headers or footers +
  • switching the page number position (if page numbers are not centered) +
+

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

Recto/verso macros list

+ + + + +
+ + + +

Recto/verso printing

+
+
+Macro: RECTO_VERSO + +

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

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

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


+ +

Switch header left part/right part

+
+
+Macro: SWITCH_HEADERS + +

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

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

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

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


+ + + + +

Introduction to collating

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

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

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

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

+ +Two words of caution: +

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

Collate document files

+
+
+Macro: COLLATE + +

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

+

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

+

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

LIST OF RESERVED WORDS

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

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

+

+TYPESETTING
+===========
+
++++MACROS+++
+
+Page layout
+-----------
+PAGELENGTH  Page width
+PAGE        Page width/length; left, right, top, bottom margins
+PAGEWIDTH   Page width
+PAPER       Letter, legal, or A4
+
+B_MARGIN  Space to leave at page bottom
+L_MARGIN  Page offset
+R_MARGIN  Line length as a function of pagewidth - pageoffset - rightmargin
+T_MARGIN  Advance lead from page top
+
+Page control
+------------
+DO_B_MARGIN  Margin at bottom of page
+DO_T_MARGIN  Margin at top of page
+
+Style
+-----
+CONDENSE   Set percentage of pseudo-condense (alias of CONDENSE_OR_EXTEND)
+EXTEND     Set percentage of pseudo-extend (alias of CONDENSE_OR_EXTEND)
+FAMILY     Family
+FT         Font
+LL         Line length
+LS         Leading (.vs)
+PT_SIZE    Point size
+SETBOLDER  Set degree of emboldening (pseudo-bold) in units
+SETSLANT   Set degree of pseudo-italic
+
+Autolead
+--------
+AUTOLEAD  Always lead n points more than .PT_SIZE
+
+Flush
+-----
+JUSTIFY  Justified text
+QUAD     Filled text, left, right, or center
+
+Quad
+----
+CENTER  Non-filled text, center
+LEFT    Non-filled text, left
+RIGHT   Non-filled text, right
+
+Hyphenation
+-----------
+HY      Turn hyphenation on/off, or set LINES, MARGIN, SPACE
+HY_SET  Set LINES, MARGIN, SPACE in a single command
+
+Advanced style
+--------------
+KERN       Turn automatic kerning on or off
+LIGATURES  Turn ligatures on or off
+SS         Sentence space control
+WS         Word space control
+
+Line breaks
+-----------
+BR      Alias of br
+EL      Breaks line but doesn't advance
+SPACE   Alias of sp
+SPREAD  Alias of brp
+
+Ald/rld
+-------
+ALD  Advance lead
+RLD  Reverse lead
+
+Indents
+-------
+HI   Indent hang
+IB   Indent both
+IBX  Indent both off
+IL   Indent left
+ILX  Indent left off
+IQ   Indents off
+IR   Indent right
+IRX  Indent right off
+IX   Indents off -- deprecated
+TI   Indent temporary
+
+Tabs
+----
+ST       String tab
+TAB_SET  Tab Set
+TN       Tab Next
+TQ       Tab Quit
+
+MCO      Turn on multi-column mode
+MCR      Return to top of column
+MCX      Turn off multi-column mode
+
+Underscore
+----------
+UNDERSCORE   Underscores words or phrases
+UNDERSCORE2  Double underscores words or phrases
+
+Underline
+---------
+UNDERLINE  Underlines whole passages (Courier only)
+
+Smart Quotes
+------------
+SMARTQUOTES  Turns smart quotes on or off
+
+Misc + Support
+--------------
+BR_AT_LINE_KERN  Deposit a break before RW and WE
+CAPS             Convert u/lc to UC
+COMMENT          Don't print lines till COMMENT OFF (alias of SILENT)
+DROPCAP_ADJUST   Points (poss. fractional) to add/subtract from drop caps
+DROPCAP          Create drop cap
+DROPCAP_FAMILY   Drop cap family
+DROPCAP_FONT     Drop cap font
+DROPCAP_GUTTER   Drop cap gutter
+DROPCAP_OFF      Support only; restores .in if there was one
+EW               Extra white -- loosen overall line kern (character spacing)
+LEADER_CHARACTER Sets leader character
+PAD              Insert padding spaces at marked places
+PADMARKER        Sets character to use instead of # in PAD
+PRINT            Simply prints args passed to it; keeps my code indented nicely
+RW               Reduce white -- tighten overal line kern (character spacing)
+SILENT           Don't print lines till SILENT OFF
+SIZESPECS        Get cap-height, x-height and descender depth for current point size
+TRAP             Turn traps off or on
+
++++DIVERSIONS+++
+
+NO_FLASH    Diverts output of SILENT or COMMENT so they don't print
+NULL        Diverts SIZESPECS in PRINT_HDRFTR so it SIZESPECS doesn't screw up FOOTER and FOOTNOTE processing when FOOTERS are on
+PAD_STRING  Diverts $PAD_STRING for processing
+TYPESIZE    Diverts SIZESPECS routine so it doesn't print
+
++++NUMBER REGISTERS+++
+
+#ALD                    ALD value
+#AUTOLEAD_FACTOR        Using FACTOR arg to AUTOLEAD? (toggle)
+#AUTO_LEAD              Using autolead? (toggle)
+#AUTO_LEAD_VALUE        Auto leading value
+#BL_INDENT              Value of left indent when IB
+#B_MARGIN               Bottom margin
+#BOLDER_UNITS           # of units to embolden type
+#BR_INDENT              Value of right indent when IB
+c                       column mark
+#CONDENSE               Are we in pseudo-condense mode? (toggle)
+#COND_WIDTH             Width of pseudo-condensed type (pointsize x $COND_PERCENT)
+#CURRENT_TAB            Current tab number
+#DC_GUT                 Width of dropcap gutter
+#DEGREES                # of degrees slant for pseudo-italic
+#EXTEND                 Are we in pseudo-extend mode? (toggle)
+#EXT_WIDTH              Width of pseudo-extended type (pointsize x $EXT_PERCENT)
+#FILL_MODE              Are we in fill mode (i.e. \n(.u=1)? (toggle)
+#FONT_FOR_PAD           Used to ensure that the font in effect prior
+                          to PAD is restored at the start of every iteration
+                          of $PAD_STRING
+#H_INDENT               Value of left indent when IH
+#HL_INDENT              Value of the hang when IH
+#HYPHENATE              Hyphenation on? (toggle)
+#HY_SET                 Did we manually set hyphenation parameters? (toggle)
+#IN_TAB                 Are we in a tab? (toggle)  Set in macro TAB; used in ST to
+                          determine whether to add #ST_OFFSET to #ST<#>_OFFSETT
+#INDENT_ACTIVE          Indicates whether an indent is active (toggle)
+#INDENT_BOTH_ACTIVE     Toggle
+#INDENT_LEFT_ACTIVE     Toggle
+#INDENT_RIGHT_ACTIVE    Toggle
+#INDENT_STYLE_BOTH      Indicates IB when #INDENT_ACTIVE=1 (toggle)
+#INDENT_STYLE_HANG      Indicates IH when #INDENT_ACTIVE=1 (toggle)
+#INDENT_STYLE_LEFT      Indicates IL when #INDENT_ACTIVE=1 (toggle)
+#INDENT_STYLE_RIGHT     Indicates IR when #INDENT_ACTIVE=1 (toggle)
+#INDENT_STYLE_TEMP      Indicates IT when #INDENT_ACTIVE=1 (toggle)
+#IX_WARN                Toggles to 1 the first time IX is user-invoked
+#KERN                   Kern on? (toggle)
+#LAST_TAB               Last tab number set in multi-columns
+#LEAD                   Leading (alias)
+#LIGATURES              Ligatures on? (toggle)
+#L_INDENT               Value of left indent
+#L_LENGTH               Line length
+#L_MARGIN               Page offset if set with LMARGIN; if .po used, \n(.o returns
+#LOOP                   #LOOP=1 if a while loop executes; otherwise 0.
+#NEXT_TAB               Current tab number + 1 (used in TN)
+#NEXT_TAB               Next tab in an n+1 sequence
+#OPEN_CLOSE             Manipulates character " to print `` or ''
+p                       Output line horiz position at end of $PAD_STRING
+#PAD_COUNT              Number of times # was included in arg to PAD
+#PAD_SPACE              Size of padding space
+#PAGE_LENGTH            Page length (alias)
+#PAGE_WIDTH             Page width
+#PP_ACTIVE              Are we in the context of a para? (toggle)
+#PRINT_FOOTER_ON_PAGE_1 toggle
+#PT_SIZE                Point size (fractional) in units (alias)
+#Q_AT_TOP               Does a quote start at the top of a new page? (toggle)
+#QUAD                   In autoquad mode? (toggle)
+#RESTORE_LEAD           Lead value in effect prior to AUTOLEAD
+#RESTORE_PT_SIZE        Stores current point size (in units) prior to underscore
+#R_INDENT               Value of right indent
+#RLD                    RLD value
+#R_MARGIN               Right margin
+#SILENT                 Is silent on? (toggle)
+#SIZE_FOR_PAD           Used to ensure that the size in effect prior
+                          to PAD is restored at the start of every iteration
+                          of $PAD_STRING
+#SLANT_ON               Is SLANT on? (toggle)
+#SMART_QUOTES           Smartquotes on? (toggle)
+#SPACE_TO_END           Whitespace at end of string passed to PAD
+#ST<#>_LENGTH           Length of ST<#>; calculated during ST <#>
+#ST<#>_MARK             Page offset of autotab <#> at ST<#>X
+#ST_NUM                 Incrementing counter for autotab identification
+#ST_OFFSET              Offset (from current tab) to add to #ST<#>_OFFSET
+                          when calculating string indents set from within tabs
+#ST<#>_OFFSET           Indent of autotab <#> (page offset)
+t                       "mark" register set in T_MARGIN; recalled in LS and AUTOLEAD if #T_MARGIN_SET is 1
+#TAB_ACTIVE             Are we in a tab? (toggle)
+#TAB_NUMBER             Tab number
+#TAB_OFFSET             Tab indent
+#T_INDENT               Value of temporary indent
+#T_MARGIN               Top margin
+#T_MARGIN_SET           Did we set the top margin with T_MARGIN? (toggle)
+#USER_SET_L_LENGTH      Did user invoke LL? (toggle)
+u                       Horiz position of start of underscore
+
++++STRINGS+++
+
+$COND_PERCENT        Percentage by which to pseudo-condense type
+$CURRENT_TAB         Current tab number
+$DC_ADJUST           +|- # of points to subtract from dropcap
+$DC_FAM              Drop cap family
+$DC_FT               Drop cap font
+$EXT_PERCENT         Percentage by which to pseudo-extend type
+$FAMILY              Family
+$FAMILY_FOR_PAD      Used to ensure that the family in effect prior
+                       to PAD is restored at the start of every iteration
+                       of $PAD_STRING
+$FONT                Font
+$PAD_MARKER          Character to mark off padding in PAD
+$PAD_STRING          Arg passed to PAD
+$QUAD_VALUE          Quad value (left, right, center, justify)
+$QUOTE0              ``
+$QUOTE1              ''
+$RESTORE_QUAD_VALUE  Quad value for use in restoring L, R, C, J (after tabs)
+$SS_VAR              Holds + or - sentence space value
+$ST<#>_FILL          Always QUAD if QUAD passed to ST <#>
+$ST<#>_QUAD_DIR      Quad direction supplied to ST for <#>
+$TAB_NUMBER          Argument passed to TAB macro to call TAB# macro created in TAB_SET
+$WS_CONSTANT         12; used to hold groff default wordspace
+$WS                  Holds WS value; concatenation of WS_CONSTANT and WS_VAR
+$WS_VAR              + or - value to add to $WS_CONSTANT
+
++++ALIASES+++
+
+ALIAS         als
+ALIASN        aln
+BR            br
+CENTRE        CENTER
+COMMENT       SILENT
+CONDENSE      CONDENSE_OR_EXTEND
+EXTEND        CONDENSE_OR_EXTEND
+FAM           FAMILY
+FT            FONT
+HYPHENATE     HY
+HYPHENATION   HY
+LIG           LIGATURES
+LL            LINE_LENGTH
+MAC           de
+NEW_PAGE      bp
+NEWPAGE       NEW_PAGE
+PAGELENGTH    PAGE_LENGTH
+PAGE_LENGTH   pl
+PAGEWIDTH     PAGE_WIDTH
+SPREAD        brp
+SP            sp
+STRING        ds
+TABSET        TAB_SET
+TB            TAB
+TI            IT
+UNDERSCORE_2  UNDERSCORE2
+
++++ALIASES FOR NUMBER REGISTERS+++
+
+#DIVER_DEPTH    dn   -- diversion depth
+#DIVER_WIDTH    dl   -- diversion width
+#INDENT         .i   -- value of current indent
+#LEAD           .v   -- line space (.vs, not .ls)
+#L_LENGTH       .l   -- line length
+#NUM_ARGS       .$   -- number of arguments passed to a macro
+#PAGE_LENGTH    .p   -- page length
+#PT_SIZE        .ps  -- current point size (fractional) in units
+#TRAP_DISTANCE  .t   -- distance to next trap
+
++++INLINE ESCAPES+++
+
+BCK          Inline backward horizontal movement
+BOLDER       Pseudo-bold on
+BOLDERX      Pseudo-bold off
+BP           Back points (horizontal movement)
+BU           Back units (inline pairwise kerning)
+COND_FOR_SUP Pseudo-condense string for use with superscripts (called with CONDSUP)
+COND_FOR_SUP Pseudo-extend string for use with superscripts (called with EXTSUP)
+COND         Pseudo-condense type
+CONDX        Pseudo-condense off
+CONDSUP      Pseudo-condensed superscript (using value set with CONDENSE)
+CONDSUPX     Pseudo-condensed superscript off
+DOWN         Inline downward vertical movement
+EXT          Pseudo-extend type
+EXTX         Pseudo-extend off
+EXTSUP       Pseudo-extended superscript
+EXTSUPX      Pseudo-extended superscript off
+FP           Forward points (horizontal movement)
+FU           Forward units (inline pairwise kerning)
+FWD          Inline forward horizontal movement
+LEADER       Deposit leader to end of current LL or TAB
+RULE         Draw a rule to the full measure of the current line or tab length
+SLANT        Slant (pseudo-italic on
+SLANTX       Slant off
+ST<#>        String tab end marker
+ST<#>        String tab start marker
+SUP          Superscript
+SUPX         Superscript off
+UP           Inline upward vertical movement
+
++++SPECIAL CHARACTERS+++
+
+FEET         The foot character \(fm
+INCH         The inch character \(fm\(fm
+
+------------------------------------------------------------------------
+
+DOCUMENT PROCESSING
+===================
+
++++MACROS+++
+
+Document info
+-------------
+AUTHOR    Author
+CHAPTER   Chapter number
+DRAFT     Draft number
+REVISION  Revision number
+SUBTITLE  Doc subtitle
+TITLE     Doc title
+
+Document style
+--------------
+COPYSTYLE   Output style (DRAFT or FINAL)
+DEFAULTS    In START, sets defaults
+DOCTYPE     Kind of doc (DEFAULT, CHAPTER, NAMED, LETTER)
+PAGENUMBER  Page number that appears on 1st page of doc
+PAPER       Paper size (LETTER, LEGAL, A4)
+PRINTSTYLE  Print style (TYPEWRITE or TYPESET)
+
+Document tags
+-------------
+BLOCKQUOTE  Block-indented, quoted text
+COL_BREAK   Breaks and spreads line before invocation; moves to next column on page or 1st col of next page.  An alias of COL_NEXT.
+COL_NEXT    Moves to next column on page or 1st col of next page
+ENDNOTE     Endnote
+ENDNOTES    Output endnotes
+EPIGRAPH    Epigraph before 1st para 
+FINIS       Prints --END--
+FOOTNOTE    Collects footnotes in text for printing at bottom of page
+HEAD        Section title (main heads)
+LINEBREAK   Break between narrative sections
+PARAHEAD    Paragraph head
+PP          Paragraph
+QUOTE       Poetic or line for line quotes
+START       Prints info collected with doc info macros
+SUBHEAD     Subheads
+
+Headers/footers
+--------------
+BREAK_QUOTE          Manually break a footnoted quote that crosses a page/column
+DO_FOOTER            Prints footer (after footnote processing, if any)
+FOOTER_ON_FIRST_PAGE Print footer on first page? (toggle)
+FOOTER               Trap-invoked footer macro
+HEADER               Trap-invoked header macro
+PAGINATE             Turns page numbering on or off (doc default=on)
+RECTO_VERSO          Enables switch HEADER_LEFT and HEADER_RIGHT on alternate pages
+
+Alter doc "look" and/or change defaults
+---------------------------------------
+ALWAYS_FULLSPACE_QUOTES  Fullspace quotes instead of default 1/2 spacing them.
+ATTRIBUTE_STRING         What to print before author (default is "by")
+AUTHOR_FAMILY            Family to use for author in doc header
+AUTHOR_FONT              Font to use for author in doc header
+AUTHOR_SIZE              ps to use for author in doc header
+BLOCKQUOTE_FAMILY        Family to use in blockquotes
+BLOCKQUOTE_FONT          Font to use in blockquotes
+BLOCKQUOTE_QUAD          How to quad blockquotes
+BLOCKQUOTE_SIZE          How much to de/increase point size of bquotes
+CHAPTER_STRING           What to print whenever the word "chapter" is required
+COLUMNS                  Print in columns
+DOC_FAMILY               Overall doc family
+DOCHEADER_ADVANCE        Start position of docheader (relative to top of page)
+DOCHEADER_LEAD           +|- value applied to #DOC_LEAD to in/decrease leading of doc header
+DOC_HEADER               Print doc header?
+DOC_LEAD_ADJUST          Adjust #DOC_LEAD to fill page to #B_MARGIN
+DOC_LEAD                 Overall doc leading
+DOC_LEFT_MARGIN          Doc left margin
+DOC_LINE_LENGTH          Doc line length
+DOC_PT_SIZE              Overall doc point size
+DOC_QUAD                 Overall quad of document
+DOC_RIGHT_MARGIN         Doc right margin
+DOCTYPE_FAMILY           Family to use for doctype string in doc header
+DOCTYPE_FONT             Font to use for doctype string in doc header
+DOCTYPE_SIZE             ps to use for doctype string in doc header
+DOCTYPE                  Type of doc (DEFAULT, CHAPTER, NAMED, LETTER)
+DO_QUOTE                 Print quote (invoked from QUOTE or BLOCKQUOTE)
+DRAFT_STRING             What to print whenever the word "draft" is required
+DRAFT_WITH_PAGENUMBER    Attach draft/revision info to page number (instead of putting it HEADER center)
+ENDNOTE_FAMILY           Family for endnotes
+ENDNOTE_FONT             Font for endnotes
+ENDNOTE_LEAD             Leading for endnotes page
+ENDNOTE_PARA_INDENT      First line indent of paras in multi-para endnotes
+ENDNOTE_PARA_SPACE       Whether to space paras in multi-para endnotes
+ENDNOTE_PT_SIZE          Base point size for endnotes page
+ENDNOTE_QUAD             Endnote quad
+ENDNOTE_STRING           Endnotes page head
+ENDNOTE_STRING_FAMILY    Family for endnotes page head
+ENDNOTE_STRING_FONT      Font for endnotes page head
+ENDNOTE_STRING_QUAD      Quad direction for endnotes page head
+ENDNOTE_STRING_SIZE      Size for endnotes page head
+ENDNOTE_STRING_UNDERSCORE Underscoring of endnotes page head
+ENDNOTE_TITLE            Endnotes identifying title
+ENDNOTE_TITLE_FAMILY     Family for endnotes identifying title
+ENDNOTE_TITLE_FONT       Font for endnotes identifying title
+ENDNOTE_TITLE_QUAD       Quad direction for endnotes identifying title
+ENDNOTE_TITLE_SIZE       Size for endnotes identifying title
+ENDNOTE_TITLE_UNDERSCORE Underscoring of endnotes identifying title
+ENDNOTE_NUMBER_FAMILY    Family of endnote numbers
+ENDNOTE_NUMBER_FONT      Font of endnote numbers
+ENDNOTE_NUMBER_SIZE      Size of endnote numbers
+ENDNOTE_NUMBERS_ALIGN_RIGHT Hang endnote numbers and align right
+ENDNOTE_NUMBERS_ALIGN_LEFT  Dont' hang endnote numbers and align left
+ENDNOTES_HDRFTR_CENTER   Print header/footer center string on endnotes pages?
+ENDNOTES_HEADER_CENTER   Print header center string on endnotes pages?
+ENDNOTES_FOOTER_CENTER   Print footer center string on endnotes pages?
+EPIGRAPH_AUTOLEAD        Autolead value for epigraphs
+EPIGRAPH_FAMILY          Family to use in epigraphs
+EPIGRAPH_FONT            Font to use in epigraphs
+EPIGRAPH_INDENT          Value by which to multiply PP_INDENT for block epigraphs
+EPIGRAPH_QUAD            Quad value of block style epigraphs
+EPIGRAPH_SIZE            ps de/increase of epigraphs*
+FINIS_STRING             What to print when FINIS is invoked
+FOOTER_GAP               Distance between running text and footer
+FOOTER_MARGIN            Distance from footer to bottom of page
+FOOTERS                  Turns footers on or off
+FOOTNOTE_AUTOLEAD        Autolead to use in footnotes
+FOOTNOTE_FAMILY          Family to use in footnotes
+FOOTNOTE_FONT            Font to use in footnotes
+FOOTNOTE_MARKERS         Turns footnote markers on or off
+FOOTNOTE_MARKER_STYLE    STAR or NUMBER; default=STAR
+FOOTNOTE_QUAD            Quad to use in footnotes
+FOOTNOTE_RULE_ADJ        # of points to raise footnote rule from its baseline
+FOOTNOTE_RULE_LENGTH     Length of footnote separator rule
+FOOTNOTE_RULE            Turns printing of fn separator rule on or off; default is on
+FOOTNOTE_SIZE            ps of footnotes
+HDRFTR_CENTER_CAPS       Center part of header/footer in caps? (toggle)
+HDRFTR_CENTER_FAMILY     Family of center part of header/footer
+HDRFTR_CENTER_FONT       Font of center part of header/footer
+HDRFTR_CENTER_SIZE       ps in/decrease of center part of header/footer**
+HDRFTR_CENTER            String to go in center part of header/footer; default doctype 
+HDRFTR_CENTER            The header/footer center string
+HDRFTR_FAMILY            Family to use in the headers/footers
+HDRFTR_GAP               Distance from header/footer to running text
+HDRFTR_LEFT_CAPS         Left part of header/footer in caps? (toggle)
+HDRFTR_LEFT_FAMILY       Family of left part of header/footer
+HDRFTR_LEFT_FONT         Font of left part of header/footer
+HDRFTR_LEFT_SIZE         ps in/decrease of left part of headers/footers**
+HDRFTR_LEFT              String to go in left part of header/footer; default author
+HDRFTR_LEFT              The header/footer left string
+HDRFTR_MARGIN            Distance from top of page to header
+HDRFTR_PLAIN             Header/footer fam/ft/ps all same as running text
+HDRFTR_RECTO             User-defined, single string recto header/footer
+HDRFTR_RIGHT_CAPS        Right part of header/footer in caps? (toggle)
+HDRFTR_RIGHT_FAMILY      Family of right part of headers/footers
+HDRFTR_RIGHT_FONT        Font of right part of headers/footers
+HDRFTR_RIGHT_SIZE        Size of right part of headers/footers
+HDRFTR_RIGHT             The header/footer right string
+HDRFTR_RULE_GAP          Space between header/footer and header/footer rule
+HDRFTR_RULE_INTERNAL     Prints the header/footer rule
+HDRFTR_RULE              Turns header/footer rule on or off
+HDRFTR_RULE              Turns header/footer rule on or off.  When invoked internally, prints the rule.
+HDRFTR_SIZE              ps in/decrease of headers/footers*
+HDRFTR_VERSO             User-defined, single string verso header/footer
+HEAD_CAPS                Print section titles in caps? (toggle)
+HEADER_GAP               Space between header and running text
+HEADER_MARGIN            Space from top of page to header
+HEADERS                  Turns headers on or off
+HEAD_FAMILY              Family to use in section titles
+HEAD_FONT                Font to use in section titles
+HEAD_QUAD                Quad value of section titles
+HEAD_SIZE                How much to in/decrease point size of section titles
+HEAD_SPACE               Give HEADs 2 line-spaces before. If OFF, only 1.  Default is on.
+HEAD_UNDERLINE           Underline section titles? (toggle)
+INDENT_FIRST_PARAS       Indent 1st paras? (doc default=not indented) 
+ITALIC_MEANS_ITALIC      For TYPEWRITE; render .FT I in italic.
+NUMBER_HEADS             Print head numbers
+NUMBER_PARAHEADS         Print parahead numbers
+NUMBER_SUBHEADS          Print subhead numbers
+PAGENUM_FAMILY           Family to use in footers
+PAGENUM_FONT             Font to use for page numbers
+PAGENUM_HYPHENS          Turns on/off hyphens surrounding page numbers
+PAGENUM_ON_FIRST_PAGE    Print page number on first page when footers are on (toggle)
+PAGENUM_POS              Controls placement of page numbers default=bottom/centered
+PAGENUM_SIZE             How much to in/decrease point size of page numbers
+PAGENUM_STYLE            Page # in roman, arabic, or alphabetic
+PARAHEAD_FAMILY          Family to use for paraheads
+PARAHEAD_FONT            Font to use for paraheads
+PARAHEAD_INDENT          How mucht to indent paraheads
+PARAHEAD_SIZE            Size of paraheads
+PARA_INDENT              Size of para indent
+PARA_SPACE               Put a line space before paras
+PP_FONT                  Overall doc font
+QUOTE_FAMILY             Family to use in pquotes
+QUOTE_FONT               Font to use in pquotes
+QUOTE_INDENT             Value by which to multiply PP_INDENT for block quotes
+QUOTE_SIZE               How much to de/increase point size of pquotes
+RESET_FOOTNOTE_NUMBER    Reset fn# to 1, or, if arg PAGE, reset automatically to 1 on every page
+RESET_HEAD_NUMBER        Reset head number
+RESET_PARAHEAD_NUMBER    Reset parahead number
+RESET_SUBHEAD_NUMBER     Reset subhead number
+REVISION_STRING          What to print whenever the word "revision" is required
+SLANT_MEANS_SLANT        In TYPEWRITE, render \*[SLANT] as slant
+SUBHEAD_FAMILY           Family to use in subheads
+SUBHEAD_FONT             Font to use in subheads
+SUBHEAD_SIZE             How much to in/decrease point size of subheads
+SUBTITLE_FAMILY          Family to use for subtitle in doc header
+SUBTITLE_FONT            Font to use for subtitle in doc header
+SUBTITLE_SIZE            ps to use for subtitle in doc header
+SWITCH_HDRFTR            Switch HDRFTR_LEFT and HDRFTR_RIGHT
+TITLE_FAMILY             Family to use for title in doc headers
+TITLE_FONT               Font to use for title in doc headers
+TITLE_SIZE               How much to in/decrease title at start of doc
+UNDERLINE_ITALIC         In TYPEWRITE, render .FT I as underlined
+UNDERLINE_QUOTES         In TYPEWRITE, underline quotes? (toggle)
+UNDERLINE_SLANT          In TYPEWRITE, render \*[SLANT] as underlined
+
+ *relative to #DOC_PT_SIZE
+**relative to overall ps of headers as set by HEADER_SIZE
+
++++LETTER MACROS+++
+
+CLOSING      Closing (ie. Yours truly,)
+DATE         Date string for letters
+FROM         Addressor's name and address
+GREETING     Full salutation (eg. Dear John Smith,)
+NO_SUITE     Remove suite page numbers from bottom of letter pages
+TO           Addressee's name and address
+ALL_DONE     .em (the "end macro") for letters
+
++++DIVERSIONS+++
+
+B_QUOTE      Block (indented) quote text
+CLOSING      Closing (ie. Yours truly,)
+DATE         Date string for letters
+EPI_TEXT     Epigraph text
+FN_OVERFLOW  Excess footnotes when B_MARGIN is reached
+FOOTNOTES    Text of footnotes
+FROM_ADDRESS Addressor's name and address
+GREETING     Full salutation (eg. Dear John Smith,)
+P_QUOTE      Line for line (poetic) quote text
+TO_ADDRESS   Addressee's name and address
+
++++SUPPORT+++
+
+CHECK_INDENT         Applies indents to doc elements inside ev's (head, subhead, etc)
+D0_QUOTE             Outputs quotes with space adjustments before and after
+DIVERT_FN_LEFTOVER   Diverts excess fn stored in FN_OVERFLOW into FOOTNOTE
+DIVERT_FN_OVERFLOW   Diverts excess fn stored in FN_OVERFLOW when FN_DEFER into FOOTNOTE
+DO_EPIGRAPH          Outputs epigraphs with space adjustments before and after
+FN_OVERFLOW_TRAP     Fixed at B_MARGIN; if footnotes run longer than B_MARGIN, diverts excess into FN_OVERFLOW
+HDRFTR_RULE          Prints rule under header or over footer
+PRINT_FOOTNOTE_RULE  An alias of PRINT_FOOTNOTE; prints footnote separator rule
+PRINT_HDRFTR         Prints header/footer (trap invoked)
+PRINT_PAGE_NUMBER    Invoked in HEADER or FOOTER
+PRINT_USERDEF_HDRFTR Prints user defined, single string recto/verso header/footer
+REMOVE_INDENT        Removes indents set with CHECK_INDENT
+TRAPS                Sets hdrftr traps; optionally adjusts #DOC_LEAD to fill page to #B_MARGIN
+
++++NUMBER REGISTERS+++
+
+#ADJ_DOC_LEAD              Adjust DOC_LEAD? (toggle)
+#ARG_NUM                   Keeps track of number of args passed to a macro
+#AUTHOR_LINES              # of lines of authors in doc header; odd=0 even=1
+#AUTHOR_NUM                Keeps track of user-defined string AUTHOR_<#> in AUTHOR
+#AUTHORS                   Equals final value of AUTHOR_NUM; used for authors in doc header
+#BROKEN_QUOTE              Did we invoke BREAK_QUOTE? (toggle)
+#CAP_HEIGHT_ADJUST         Tallest cap height of strings LEFT, CENTER, and RIGHT in footers; used to place rule over footer
+#CAPS_WAS_ON               In HDRFTR, to re-enable running text CAPS (toggle)
+#CENTER_CAP_HEIGHT         Cap height of center string in headers/footers
+#CHAPTER                   The chapter number
+#CLOSING                   Is there a closing (for letters)? 1=yes
+#COL_L_LENGTH              Line length of columns
+#COL_NEXT                  Was COL_NEXT invoked? (toggle; used in FOOTER)
+#COL_NUM                   Incrementing counter of num of columns; for use with #COL_<#>_L_MARGIN
+#COL_TOTAL                 #COL_L_LENGTH + #GUTTER; used to calculate #COL_<#>_L_MARGIN
+#COLUMNS                   Are columns turned on? (toggle)
+#COPY_STYLE                1=draft, 2=final
+#DATE                      Is there a date (for letters)? 1=yes
+dc                         "mark" register for document columns
+#DEPTH_1                   Doc header depth with lead adjustment (#DOCHEADER_LINES * #DOCHEADER_LEAD)
+#DEPTH_2                   Doc header depth without lead adjustment (#DOCHEADER_LINES * #DOC_LEAD)
+#DEPTH_TO_B_MARGIN         Page length minus #B_MARGIN
+#DOCHEADER_ADVANCE         Distance from top-of-page to baseline of docheader
+#DOCHEADER_LEAD_ADJ        +|- value applied to #DOC_LEAD to in/decrease leading of doc header
+#DOCHEADER_LEAD            Lead of doc header (#DOC_LEAD + #DOCHEADER_LEAD_ADJ)
+#DOCHEADER_SPACE_ADJ       Lead difference between #DEPTH_1 and #DEPTH_2
+#DOC_HEADER                Whether to print a doc header (toggle)
+#DOC_LEAD_ADJ              Incrementing value (in units) added to #DOC_LEAD to fill page to #B_MARGIN
+#DOC_LEAD                  Leading used in body
+#DOC_L_LENGTH              Global L_LENGTH
+#DOC_L_MARGIN              Global L_MARGIN
+#DOC_LR_MARGIN_TMP         In HEADER, if RECTO_VERSO=1, temporarily holds DOC_L_MARGIN during page margin switch
+#DOC_PT_SIZE               Point size used for body text
+#DOC_R_MARGIN              Global R_MARGIN
+#DOCS                      Always 1 after START
+#DOC_TYPE                  1=default, 2=chapter, 3=named, 4=letter
+#DRAFT                     The draft number
+#DRAFT_WITH_PAGENUM        Are we attaching draft/revision info to page number? (toggle)
+#EM_ADJUST                 Amount to raise \(em at END
+#EN_PS                     ps of endnotes
+#EN_LEAD                   Lead of endnotes
+#EN_STRING_UNDERSCORE      Underscore endnotes page head? (toggle)
+#EN_TITLE_UNDERSCORE       Underscore endnotes document identifier? (toggle)
+#EN_NUMBERS_ALIGN_RIGHT    Hang and align endnote numbers right? (toggle)
+#EN_NUMBERS_ALIGN_LEFT     Align endnote numbers with left margin? (toggle)
+#EN_NUMBERS_PLACEHOLDERS   Number of placeholders when endnote numbers hang and align right
+#EN_NUMBER_L_LENGTH        Line length for endnote numbers when they're right aligned
+#EN_PP_INDENT              First line indent of paras in multi-para endnotes
+#EN_PP_SPACE               Space multi-paras in endnotes? (toggle)
+#EN_TEXT_INDENT            Page offset for text of endnotes when numbers right align
+#END_QUOTE                 For PP=0 indenting; did we just end a quote? (toggle)
+#ENDNOTE                   Are we in an endnote? (toggle)
+#EN_HDRFTR_CENTER          Should we print centre string of headers/footers on endnotes pages? (toggle)
+#EPI_ACTIVE                Are we in an epigraph? (toggle)
+#EPI_DEPTH                 Depth of epigraph from first baseline to last
+#EPI_FITS                  Does epigraph fit on page/column? (toggle)
+#EPIGRAPH                  Did we have an epigraph? (toggle) 
+#EPI_LEAD_DIFF             Difference between #DOC_LEAD and #EPI_LEAD
+#EPI_LEAD                  Leading of epigraph; set by AUTOLEAD
+#EPI_LINES_EVEN            Even # of lines at end of epi crossing page in TYPEWRITE (d-spaced)?
+#EPI_LINES                 Number of lines in the epigraph
+#EPI_LINES_TO_END          Number of epigraph lines remaining after footer trap is sprung
+#EPI_LINES_TO_TRAP         Number of epigraph lines till footer trap is sprung
+#EPI_L_LENGTH              Epigraph line length
+#EPI_OFFSET                Left margin of epigraphs
+#EPI_OFFSET_VALUE          Epigraph indent as a function of page offset
+#EPI_ON                    Are we in an epigraph? (toggle)
+#EPI_WHITESPACE            Space after epigraph to compensate for epigraph leading
+#FN_AUTOLEAD               Autolead value of footnotes
+#FN_BL_INDENT              Left indent of INDENT BOTH in footnotes
+#FN_BR_INDENT              Right indent of INDENT BOTH in footnotes
+#FN_COUNT_FOR_COLS         Holds a separate footnote count for columns (so they don't reset to 0 1 until page break)
+#FN_DEFER                  Defer footnote to next page/column? (toggle)  If 0, don't defer.
+#FN_DEFER_SPACE            Whether to deposit space before footnote 1 because there's a deferred footnote on the page
+#FN_DEPTH                  Depth of footnote diversion(s)
+#FN_FOR_EPI                Signals to epigraph that a footnote is being processed
+#FN_LEAD                   Lead in footnotes after FN_AUTOLEAD is applied
+#FN_L_INDENT               Left indent of INDENT LEFT in footnotes
+#FN_LINES                  Number of lines in fn; used to calculate fn depth
+#FN_MARKERS                Print footnote markers? (toggle)
+#FN_MARKER_STYLE           1=STAR; 2=NUMBER
+#FN_NUMBER                 Running count of fn #; used to print fn marker numbers
+#FN_R_INDENT               Right indent of INDENT RIGHT in footnotes
+#FN_RULE_ADJ               # of points to raise footnote separator from its baseline
+#FN_RULE_LENGTH            Length of footnote separator rule
+#FN_RULE                   Print fn rule? (toggle)
+#FN_WAS_DEFERED            Tells HEADER about a defered footnote
+#FOOTER_GAP                Amount of space between end of text and page #
+#FOOTER_MARGIN             Amount of space between page # and bottom of page
+#FROM                      Is there an addressor (for letters)? 1=yes
+#FULLSPACE_QUOTES          Should we fullspace quotes? (toggle)
+#GREETING                  Is there a greeting (for letters)? 1=yes
+#GUTTER                    Width of gutter between columns
+#HDRFTR_CENTER_CAPS        Center part of header/footer in caps? (toggle; default=off)
+#HDRFTR_HEIGHT             Cap height of $HDRFTR_RECTO/$HDRFTR_VERSO strings
+#HDRFTR_LEFT_CAPS          Left part of header/footer in caps? (toggle; default=off)
+#HDRFTR_RIGHT_CAPS         Right part of header/footer in caps? (toggle; default=on)
+#HDRFTR_RULE_GAP           Space between header/footer and header/footer rule
+#HDRFTR_RULE               Print head/footer rule? (toggle)
+#HDRFTR_TMP_CAPS_SWITCH    Temporarily holds HDRFTR_LEFT_CAPS value if #SWITCH_HDRFTR=1
+#HEAD                      1=main/section head 2=subhead
+#HEAD_CAPS                 Print section titles in caps? (toggle)
+#HEADER_GAP                Distance from header to running text
+#HEADER_MARGIN             Distance from top of page to header
+#HEADERS_ON                Headers on? (toggle)
+#HEADER_STATE              Saves header state in COLLATE for use in START after COLLATE
+#HEAD_NUM                  Head number
+#HEAD_SPACE                2 line spaces before heads? (toggle; 1=yes, 0=no)
+#HEAD_UNDERLINE            Underline section titles? (toggle)
+#IGNORE                    Should we ignore this macro? Set to 1 in TYPEWRITE.
+#INDENT_FIRST_PARAS        Indent first paras? (toggle)
+#INDENT_FIRSTS             Tells foonotes to leave INDENT_FIRST_PARAS alone if it's on for running text.
+#ITALIC_MEANS_ITALIC       For TYPEWRITE.  1=yes; 0=no
+#LEFT_CAP_HEIGHT           Cap height of left string in headers/footers
+#LETTER_STYLE              1=BUSINESS 2=PERSONAL
+#LINEBREAK                 Did we have a linebreak? (toggle)
+#LINES_PER_PAGE            # of lines (at DOC_LEAD) that fit on page after #B_MARGIN is set
+#L_LENGTH_FOR_EPI          Stores line length at top of doc for use with EPIGRAPH when columns are on
+#L_MARGIN_DIFF             Difference between DOC_L_MARGIN and L_MARGIN
+#n%_AT_PAGENUM_SET         Page # from n% when PAGENUMBER invoked
+#NEXT_AUTHOR               Supplies correct digit to AUTHOR_<#> when printing authors in doc header
+#NO_TRAP_RESET             Should we reset page traps? (toggle)
+#NUM_AUTHORS               # of authors mod 2 to test if odd or even # of authors
+#NUMBER_HEAD               Are heads numbered? (toggle)
+#NUMBER_PH                 Are paraheads numbered? (toggle)
+#NUMBER_SH                 Are subheads numbered? (toggle)
+#NUM_COLS                  Number of columns per page
+#PAGE_NUM_ADJ              What to add to n% to get #PAGENUMBER
+#PAGENUMBER                The page number
+#PAGENUM_STYLE_SET         Did we set pagenumber style? (toggle)
+#PAGE_NUM_H_POS            1=left 2=center 3=right; default=2
+#PAGE_NUM_HYPHENS          Print hyphens surrounding page numbers? (toggle)
+#PAGE_NUM_HYPHENS_SET      Did user set (or unset) hyphens around page numbers? (toggle)
+#PAGE_NUM_POS_SET          Did user set page number position? (toggle)
+#PAGE_NUM_SET              Test if PAGE_1_NUM was used to set 1st page number
+#PAGE_NUMS                 Print page numbers? (toggle)
+#PAGE_NUM_V_POS            1=top 2=bottom; default=2
+#PAGE_TOP                  \n(nl after HEADER completes itself
+#PH_NUM                    Parahead number
+#PAGINATION_STATE          Saves pagination state in COLLATE for use in START after a COLLATE
+#PP                        0 at first para; auto-increments
+#PP_AT_PAGE_BREAK          # of last (incl. partial) para on page
+#PP_INDENT                 How much to indent paras
+#PP_SPACE                  Put space before paras? (toggle)
+#PP_SPACE_SUSPEND          Suspend para spacing for blockquotes and epigraphs
+#PP_STYLE_PREV             In footnotes, stores PP style in effect prior to invoking FOOTNOTE
+#PP_STYLE                  Regular para=1; quote or epi para=2
+#PRINT_PAGENUM_ON_PAGE_1   Should we print the page number on first page of doc when footers are on? (toggle)
+#PRINT_STYLE               Typewrite=1, typeset=2
+#PT_SIZE_IN_UNITS          Stored value of \n[.ps] from last time PT_SIZE was called
+#Q_DEPTH                   Depth of quote
+#Q_FITS                    Does this quote fit on one page/column? (toggle)
+#Q_L_LENGTH                Line length of quotes
+#Q_OFFSET                  Page offset for quotes
+#Q_OFFSET_VALUE            Factor by which to multiply PP_INDENT to offset quotes
+#Q_PP                      In PP, stores para # in QUOTE.  Removed in ENDQUOTE.
+#Q_TOP                     Vertical place on page that a quote starts
+#QUOTE                     1=PQUOTE, 2=BQUOTE
+#RECTO_VERSO               Switch HEADER_LEFT and HEADER_RIGHT on alternate pages? (toggle); default=0
+#REPEAT                    Number of times to repeat linebreak character
+#RESET_EN_PP               Holds value of register #EN_PP_INDENT
+#RESET_FN_NUMBER           Should fn# start at 1 on every page? (toggle)
+#RESET_L_LENGTH            Stores current line length when necessary
+#RESET_PARA_SPACE          Holds current value of toggle register #PP_SPACE
+#RESET_PP_INDENT           Stores value of PP_INDENT when necessary
+#RESET_QUOTE_SPACING       Stores value of toggle register #FULLSPACE_QUOTES (used in endnotes)
+#RESTORE_DOC_LEAD          Holds value of current doc lead (used in endnotes)
+#RESTORE_OFFSET            Page offset at moment footer trap is sprung; not currently used
+#REVISION                  The revision number
+#RIGHT_CAP_HEIGHT          Cap height of right string in headers/footers
+#SH_LEAD_ADJUST            #DOC_LEAD/8 (TYPESET) or /2 (TYPEWRITE) (used for subhead spacing)
+#SH_NUM                    Subhead number
+#SINGLE_SPACE              Is TYPEWRITE in single space mode? (toggle)
+#SLANT_MEANS_SLANT         For TYPEWRITE.  1=yes; 0=no
+#SLANT_WAS_ON              Keeps track of SLANT when it needs to go off for a while
+#SPACE_REMAINING           Space remaining to footer trap; used to decide whether or not to defer a footnote
+#START                     If 1, signals completion of START
+#START_FOR_FOOTERS         Toggle set in START; signals to PRINT_HDRFTR that START has been invoked, allowing PRINT_HDRFTR to decide whether or not to print a footer on page 1
+#SUITE                     Current page number (for letters)
+#SUP_PT_SIZE               Point size of superscript
+#SWITCH_HDRFTR             Switch HDRFTR_LEFT and HDRFTR_RIGHT? (toggle)
+#TAB_OFFSET#               "#" at the end is from $CURRENT_TAB
+#TO                        Is there an addressee date (for letters)? 1=yes
+#UNDERLINE_ITALIC          For TYPEWRITE.  1=yes; 0=no
+#UNDERLINE_QUOTE           Underline pquotes? (toggle)
+#UNDERLINE_SLANT           For TYPEWRITE.  1=yes; 0=no
+#UNDERLINE_WAS_ON          In HEADER to re-enable running text UNDERLINE (toggle)
+#USERDEF_HDRFTR            User defined single string recto/verso header/footer? (toggle)
+#USERDEF_HDRFTR_RECTO_QUAD 1=left, 2=center, 3=right
+#USERDEF_HDRFTR_VERSO_QUAD 1=left, 2=center, 3=right
+#USER_DEF_HEADER_CENTER    User defined center title? (1=yes); used in COPYSTYLE
+#USER_DEF_HEADER_LEFT      User defined center title? (1=yes); used in COPYSTYLE
+#USER_DEF_HEADER_RIGHT     User defined center title? (1=yes); used in COPYSTYLE
+#VARIABLE_FOOTER_POS       Wandering trap position for processing footnotes and footers; pos depends on footnotes
+ 
++++STRINGS+++
+
+$ATTRIBUTE_STRING              "by" line in doc header
+$AUTHOR_1...9                   Document author(s)
+$AUTHOR_FAM                     Family to use for author in doc header
+$AUTHOR_FT                      Font to use for author in doc header
+$AUTHOR_SIZE_CHANGE             ps in/decrease of author in doc header*
+$BQUOTE_FAM                     Family to use for blockquotes
+$BQUOTE_FT                      Font to use for blockquotes
+$BQUOTE_QUAD                    Quad value for blockquotes
+$BQUOTE_SIZE_CHANGE             ps in/decrease of blockquotes*
+$CENTER_TITLE                   What to put in the middle of header title
+$CHAPTER_STRING                 What to print whenever the word "chapter" is required
+$COPY_STYLE                     DRAFT or FINAL
+$DOC_FAM                        Predominant font family used in the document
+$DOC_QUAD                       Quad used for body text (justified or left) 
+$DOC_TYPE                       Document type (default, chapter, named, letter)
+$DOCTYPE_FAM                    Family to use for DOCTYPE string in doc header
+$DOCTYPE_FT                     Font to use for DOCTYPE string in doc header
+$DOCTYPE_SIZE_CHANGE            ps in/decrease of DOCTYPE string in doc header*
+$DRAFT_STRING                   What to print whenever the word "draft" is required
+$EN_FAMILY                      Family for endnotes
+$EN_FT                          Font for endnotes
+$EN_QUAD                        Quad for endnotes
+$EN_STRING                      Endnotes page head
+$EN_STRING_FAM                  Endnotes page head family
+$EN_STRING_FT                   Endnotes page head font
+$EN_STRING_QUAD                 Endnotes page head quad direction
+$EN_STRING_SIZE_CHANGE          Endnotes page head size***
+$EN_TITLE                       Endnote document identifier
+$EN_TITLE_FAM                   Endnote document identifier family
+$EN_TITLE_FT                    Endnote document identifier font
+$EN_TITLE_QUAD                  Endnote document identifier quad direction
+$EN_TITLE_SIZE_CHANGE           Endnote document identifier size***
+$EN_NUMBER_FAM                  Endnote numbering family
+$EN_NUMBER_FT                   Endnote numbering font
+$EN_NUMBER_SIZE_CHANGE          Endnote numbering size***
+$EPI_AUTOLEAD                   Autolead value (decimals ok) of epigraphs
+$EPI_FAM                        Family to use in epigraphs
+$EPI_FT                         Font to use in epigraphs
+$EPI_QUAD                       Quad in block-style epigraphs (justified or left)
+$EPI_SIZE_CHANGE                ps in/decrease of epigraphs*
+$FINIS_STRING                   What to print when FINIS macro is invoked
+$FN_FAM                         Family used in footnotes
+$FN_FT                          Font used in footnotes
+$FN_QUAD                        Quad used in footnotes
+$FN_SIZE_CHANGE                 ps in/decrease of footnotes*
+$HDRFTR_CENTER_FAM              Family of center part of headers
+$HDRFTR_CENTER_FT               Font of center part of headers
+$HDRFTR_CENTER_SIZE_CHANGE      ps in/decrease of center title in headers**
+$HDRFTR_CENTER                  What to put in center part of headers; default doctype
+$HDRFTR_FAM                     Family to use in headers
+$HDRFTR_LEFT_FAM                Family of left part of headers
+$HDRFTR_LEFT_FT                 Font of left part of headers
+$HDRFTR_LEFT_SIZE_CHANGE        ps in/decrease of author in headers**
+$HDRFTR_LEFT                    What to put in left part of headers; default author
+$HDRFTR_RIGHT_FAM               Family of right part of headers
+$HDRFTR_RIGHT_FT                Font of right part of headers
+$HDRFTR_RIGHT_SIZE_CHANGE       ps in/decrease of right part of headers**
+$HDRFTR_RIGHT                   What to put in right part of headers; default title
+$HDRFTR_SIZE_CHANGE             ps in/decrease of headers*
+$HDRFTR_TMP_SIZE_CHANGE_SWITCH  Temporarily holds HDRFTR_LEFT_SIZE_CHANGE if #SWITCH_HDRFTRS=1
+$HDRFTR_TMP_SWITCH              Temporarily holds HDRFTR_LEFT if #SWITCH_HDRFTRS=1
+$HEAD_FAM                       Family to use for section titles
+$HEAD_FT                        Font to use for section titles
+$HEAD_QUAD                      Quad valude of section titles
+$HEAD_SIZE_CHANGE               ps in/decrease of section titles*
+$LINEBREAK_CHAR                 Character that marks line breaks
+$LINEBREAK_CHAR_V_ADJ           +|- amount by which to raise/lower linebreak character
+PAGE#                           For use in hdrftr strings where page # is needed; \*[PAGE]
+$PAGENUM_STYLE                  String passed to PAGENUM_STYLE
+$PAGE_NUM_FAM                   Family of page numbers
+$PAGE_NUM_FT                    Font of page numbers
+$PAGE_NUM_SIZE_CHANGE           ps in/decrease of page numbers
+$PAPER                          Paper size (LETTER, A4, LEGAL); default=LETTER
+$PP_FT                          Font used in paragraphs
+$QUOTE_FAM                      Family to use for pquotes
+$QUOTE_FT                       Font to use for pquotes
+$QUOTE_SIZE_CHANGE              ps in/decrease of pquotes*
+$REVISION_STRING                What to print whenever the word "revision" is required
+$SH_FAM                         Family to use in subheads
+$SH_FT                          Font to use in subheads
+$SH_SIZE_CHANGE                 ps in/decrease of subheads*
+$SUBTITLE                       Document subtitle
+$SUBTITLE_FAM                   Family to use for subtitle in doc header
+$SUBTITLE_FT                    Font to use for subtitle in doc header
+$SUBTITLE_SIZE_CHANGE           Font to use for subtitle in doc header
+$SUITE                          The #SUITE number register
+$TITLE                          Document title
+$TITLE_FAM                      Family to use for title in doc header
+$TITLE_FT                       Font to use for title in doc header
+$TITLE_SIZE_CHANGE              ps in/decrease of title in doc header*
+$USERDEF_HDRFTR_RECTO           User defined header/footer recto string
+$USERDEF_HDRFTR_VERSO           User defined header/footer verso string
+
+  *relative to #DOC_PT_SIZE
+ **relative to overall ps of headers as set by HEADER_SIZE
+***relative to overall ps of endnotes
+
++++PREPROCESSOR KEYWORDS+++
+
+(eqn)
+EQ
+EN
+
+(grn)
+GS
+GE
+GF
+
+(pic)
+PS
+PE
+
+(refer)
+R1
+R2
+[
+]
+
+(tbl)
+TS
+TE
+TH
+
+(grap)
+G1
+G2
+
+(ideal)
+IS
+IE
+
+(chem)
+cstart
+cend
+
++++ALIASES+++
+
+BREAK_BLOCKQUOTE      BREAK_QUOTE
+BREAK_CITATION        BREAK_QUOTE
+BREAK_CITE            BREAK_QUOTE
+CITATION              BLOCKQUOTE
+CITE                  BLOCKQUOTE
+COL_BREAK             COL_NEXT
+DOC_FAM               DOC_FAMILY
+DOC_LLENGTH           DOC_LINE_LENGTH
+DOC_L_LENGTT          DOC_LINE_LENGTH
+DOC_L_MARGIN          DOC_LEFT_MARGIN
+DOC_LMARGIN           DOC_LEFT_MARGIN
+DOC_LS                DOC_LEAD
+DOC_PS                DOC_PT_SIZE
+DOC_R_MARGIN          DOC_RIGHT_MARGIN
+DOC_RMARGIN           DOC_RIGHT_MARGIN
+FOOTER_CENTER_CAPS    HDRFTR_CENTER_CAPS
+FOOTER_CENTER_FAM     HDRFTR_CENTER_FAMILY
+FOOTER_CENTER_FAMILY  HDRFTR_CENTER_FAMILY
+FOOTER_CENTER_FONT    HDRFTR_CENTER_FONT
+FOOTER_CENTER_FT      HDRFTR_CENTER_FONT
+FOOTER_CENTER         HDRFTR_CENTER
+FOOTER_CENTER_PS      HDRFTR_CENTER_SIZE
+FOOTER_CENTER_SIZE    HDRFTR_CENTER_SIZE
+FOOTER_CENTRE_CAPS    HDRFTR_CENTER_CAPS
+FOOTER_CENTRE_FAM     HDRFTR_CENTER_FAMILY
+FOOTER_CENTRE_FAMILY  HDRFTR_CENTER_FAMILY
+FOOTER_CENTRE_FT      HDRFTR_CENTER_FONT
+FOOTER_CENTRE         HDRFTR_CENTER
+FOOTER_CENTRE_PS      HDRFTR_CENTER_SIZE
+FOOTER_CENTRE_SIZE    HDRFTR_CENTER_SIZE
+FOOTER_FAM            HDRFTR_FAMILY
+FOOTER_FAMILY         HDRFTR_FAMILY
+FOOTER_LEFT_CAPS      HDRFTR_LEFT_CAPS
+FOOTER_LEFT_FAM       HDRFTR_LEFT_FAMILY
+FOOTER_LEFT_FAMILY    HDRFTR_LEFT_FAMILY
+FOOTER_LEFT_FONT      HDRFTR_LEFT_FONT
+FOOTER_LEFT_FT        HDRFTR_LEFT_FONT
+FOOTER_LEFT           HDRFTR_LEFT
+FOOTER_LEFT_PS        HDRFTR_LEFT_SIZE
+FOOTER_LEFT_SIZE      HDRFTR_LEFT_SIZE
+FOOTER_PLAIN          HDRFTR_PLAIN
+FOOTER_RECTO          HDRFTR_RECTO
+FOOTER_RIGHT_CAPS     HDRFTR_RIGHT_CAPS
+FOOTER_RIGHT_FAM      HDRFTR_RIGHT_FAMILY
+FOOTER_RIGHT_FAMILY   HDRFTR_RIGHT_FAMILY
+FOOTER_RIGHT_FONT     HDRFTR_RIGHT_FONT
+FOOTER_RIGHT_FT       HDRFTR_RIGHT_FONT
+FOOTER_RIGHT          HDRFTR_RIGHT
+FOOTER_RIGHT_PS       HDRFTR_RIGHT_SIZE
+FOOTER_RIGHT_SIZE     HDRFTR_RIGHT_SIZE
+FOOTER_RULE_GAP       HDRFTR_RULE_GAP
+FOOTER_RULE           HDRFTR_RULE
+FOOTER_SIZE           HDRFTR_SIZE
+FOOTER_VERSO          HDRFTR_VERSO
+HDRFTR_RULE_INTERNAL  HDRFTR_RULE
+HEADER_CENTER_CAPS    HDRFTR_CENTER_CAPS
+HEADER_CENTER_FAM     HDRFTR_CENTER_FAMILY
+HEADER_CENTER_FAMILY  HDRFTR_CENTER_FAMILY
+HEADER_CENTER_FONT    HDRFTR_CENTER_FONT
+HEADER_CENTER_FT      HDRFTR_CENTER_FONT
+HEADER_CENTER         HDRFTR_CENTER
+HEADER_CENTER_PS      HDRFTR_CENTER_SIZE
+HEADER_CENTER_SIZE    HDRFTR_CENTER_SIZE
+HEADER_CENTRE_CAPS    HDRFTR_CENTER_CAPS
+HEADER_CENTRE_FAM     HDRFTR_CENTER_FAMILY
+HEADER_CENTRE_FAMILY  HDRFTR_CENTER_FAMILY
+HEADER_CENTRE_FONT    HDRFTR_CENTER_FONT
+HEADER_CENTRE_FT      HDRFTR_CENTER_FONT
+HEADER_CENTRE         HDRFTR_CENTER
+HEADER_CENTRE_PS      HDRFTR_CENTER_SIZE
+HEADER_CENTRE_SIZE    HDRFTR_CENTER_SIZE
+HEADER_FAM            HDRFTR_FAMILY
+HEADER_FAMILY         HDRFTR_FAMILY
+HEADER_LEFT_CAPS      HDRFTR_LEFT_CAPS
+HEADER_LEFT_FAM       HDRFTR_LEFT_FAMILY
+HEADER_LEFT_FAMILY    HDRFTR_LEFT_FAMILY
+HEADER_LEFT_FONT      HDRFTR_LEFT_FONT
+HEADER_LEFT_FT        HDRFTR_LEFT_FONT
+HEADER_LEFT           HDRFTR_LEFT
+HEADER_LEFT_PS        HDRFTR_LEFT_SIZE
+HEADER_LEFT_SIZE      HDRFTR_LEFT_SIZE
+HEADER_PLAIN          HDRFTR_PLAIN
+HEADER_RECTO          HDRFTR_RECTO
+HEADER_RIGHT_CAPS     HDRFTR_RIGHT_CAPS
+HEADER_RIGHT_FAM      HDRFTR_RIGHT_FAMILY
+HEADER_RIGHT_FAMILY   HDRFTR_RIGHT_FAMILY
+HEADER_RIGHT_FONT     HDRFTR_RIGHT_FONT
+HEADER_RIGHT_FT       HDRFTR_RIGHT_FONT
+HEADER_RIGHT          HDRFTR_RIGHT
+HEADER_RIGHT_PS       HDRFTR_RIGHT_SIZE
+HEADER_RIGHT_SIZE     HDRFTR_RIGHT_SIZE
+HEADER_RULE_GAP       HDRFTR_RULE_GAP
+HEADER_RULE           HDRFTR_RULE
+HEADER_SIZE           HDRFTR_SIZE
+HEADER_VERSO          HDRFTR_VERSO
+PAGENUM               PAGENUMBER
+PAGINATION            PAGINATE
+PP_FT                 PP_FONT
+PRINT_FOOTNOTE_RULE   FOOTNOTE_RULE
+SWITCH_FOOTERS        SWITCH_HDRFTR
+SWITCH_HEADERS        SWITCH_HDRFTR
+
+ +
+Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/groff/contrib/mom/momdoc/toc.html b/contrib/groff/contrib/mom/momdoc/toc.html new file mode 100644 index 0000000..e3dccf1 --- /dev/null +++ b/contrib/groff/contrib/mom/momdoc/toc.html @@ -0,0 +1,208 @@ + + + +Mom -- Table of Contents + + + + + +

Table of Contents

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

USING TYPESETTING MACROS DURING DOCUMENT PROCESSING

+
+ +During document processing, most of the +typesetting macros +affect type in the document globally. For example, if you turn kerning +off, pairwise kerning is disabled not only in paragraphs, but +also in headers, footers, quotes, and so on. +

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

+There are, however, some typesetting macros that, used during document +processing, behave in special ways. These are the macros that deal +with the basic parameters of type style: horizontal and vertical margins, +line length, +family, +font, +point size, +leading, +and +quad. +

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

+Mom assumes that any changes to these parameters +stem from a temporary need to set type in a style different from that +provided by mom's +document element tags. +In other words, you need to do a bit of creative typesetting in the +middle of a document. +

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

+

+MACRO           EFFECT DURING DOCUMENT PROCESSING
+-----           ---------------------------------
+
+L_MARGIN        *The left margin of all running text
+                 assumes the new value.
+
+                *The line length remains unaltered.
+
+                *The header and footer left margin
+                 remain at the current document default.
+
+                (You won't use this often by itself.  Most
+                 likely, you'll use it in combination with
+                 R_MARGIN or LL.)
+
+R_MARGIN        *The right margin of all running text
+                 assumes the new value.  In other words,
+                 the line length is altered.
+
+                *The header and footer right margin
+                 remain at the current document default.
+
+LL              *The line length of all running text
+                 is set to the new value.
+
+                *The header and footer line length remain
+                 at the current document default.
+
+FAMILY          *Changes family for the duration of the
+                 current tag only.  As soon as another document
+                 element tag is invoked, the family reverts to
+                 the current default for the new tag.
+
+FT              *Changes font for the duration of the
+                 current tag only.  As soon as another document
+                 element tag is entered, the font reverts
+                 to the current default for the new tag.
+
+                 N.B. -- \*[SLANT] and \*[BOLDER] affect
+                 paragraph text, and remain in effect for all
+                 paragraphs until turned off.  If you want to
+                 use them in a macro that takes a string
+                 argument, include the escape in the string.
+                 \*[COND] and \*[EXT] behave similarly.
+
+PT_SIZE         *Changes point size for the duration of the
+                 current tag only.  As soon as another document
+                 element tag is entered, the point size reverts
+                 to the current document default for the new
+                 tag.
+
+LS              *Changes line space for the duration of the
+                 current tag only.  As soon as another document
+                 element tag is entered, the line space reverts to
+                 the current document default for the new
+                 tag.  Highly NOT recommended, since changes to
+                 a document's leading interfere with mom's
+                 ability to balance bottom margins.
+
+QUAD            *Changes quad for the duration of the
+                 current tag only.  As soon as another document
+                 element tag is entered, the quad reverts to
+                 the current document default for the new
+                 tag.
+
+                 N.B. -- Line-for-line quadding macros
+                 (LEFT, CENTER, RIGHT) are also temporary,
+                 overridden by the QUAD value of any subsequent
+                 document element tag.
+
+
+ + + + +

Top and bottom margins in document processing

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

+Put another way, in document processing, T_MARGIN +and B_MARGIN set the top and bottom margins of +running text, but have no effect on the placement of +headers, +footers, +or page numbers. + +

+


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

THE TYPESETTING MACROS

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

Introduction to the typesetting macros

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

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

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


+ + + + + + +

Page setup: paper size and page margins

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

+The +PAPER +macro provides a shortcut for setting the page to the correct dimensions +for a number of well-known, established paper sizes. The +PAGE +macro provides a convenient way of setting the page dimensions and +some or all of the page margins with a single macro. +
+ + +

Page setup macros list

+ + + + + + +
+

Page width

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

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

+

+	.PAGEWIDTH 8.5i
+
+ + + +
+

Page length

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

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

+

+	.PAGELENGTH 11i
+
+ + + +
+

Paper

+
+Macro: PAPER <paper type> + +

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

+

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

+

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

+

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

Left margin

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

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

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

+

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

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


+

Right margin

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

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

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

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

+

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

+

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

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

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


+

Top margin

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

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

+

+	.T_MARGIN 2.5c
+
+ +T_MARGIN calculates the vertical position of the +first line of type on a page by treating the top edge of the printer +sheet as a baseline. Therefore, +

+

+	.T_MARGIN 1.5i
+
+ +puts the baseline of the first line of type 1-1/2 inches beneath +the top of the page. +

+IMPORTANT: T_MARGIN does two +things: it establishes the top margin for pages that come after +it AND it moves to that position on the current page. Therefore, +T_MARGIN should only be used at the top of a file +(prior to entering text) or after +NEWPAGE, +like this: +

+

+	.NEWPAGE
+	.T_MARGIN 6P
+	<text>
+
+ +NOTE: T_MARGIN means something +slightly different when you're using the +document processing macros. +See +Top and bottom margins in document processing +for an explanation. +
+ + + +
+

Bottom margin

+
+Macro: B_MARGIN <bottom margin> +
+*Requires a unit of measure + +

+B_MARGIN sets a nominal position at the bottom +of the page beyond which you don't want your type to go. When the +bottom margin is reached, mom starts a new page. +B_MARGIN requires a unit of measure. Decimal +fractions are allowed. To set a nominal bottom margin of 3/4 inch, +enter +

+

+	.B_MARGIN .75i
+
+ +Obviously, if you haven't spaced the type on your pages so that +the last lines fall perfectly at the bottom margin, the margin will +vary from page to page. Usually, but not always, the last line of +type that fits on a page before the bottom margin causes +mom to start a new page. +

+Occasionally, owing to a peculiarity in groff, +an extra line will fall below the nominal bottom margin. If you're +using the +document processing macros, +this is unlikely to happen; the document processing macros are very +hard-nosed about aligning bottom margins. +

+NOTE: The meaning of B_MARGIN is +slightly different when you're using the document processing macros. +See +Top and bottom margins in document processing +for an explanation. +
+ + + +


+

Page

+
+Macro: PAGE +<width> [ <length> [ <lm> [ <rm> [ <tm> [ <bm> ] ] ] ] ] +
+*All arguments require a unit of measure + +

+PAGE lets you establish paper dimensions and page +margins with a single macro. The only required argument is page width. +The rest are optional, but they must appear in order and you can't +skip over any. <lm>, <rm>, <tm> +and <bm> refer to the left, right, top and bottom +margins respectively. +

+Assuming your page dimensions are 11 inches by 17 inches, and that's +all you want to set, enter +

+

+	.PAGE 11i 17i
+
+ +If you want to set the left margin as well, say, at 1 inch, +PAGE would look like this: +

+

+	.PAGE 11i 17i 1i
+
+ +Now suppose you also want to set the top margin, say, at 1-1/2 +inches. <tm> comes after <rm> +in the optional arguments, but you can't skip over any arguments, +therefore to set the top margin, you must also give a right margin. +The PAGE macro would look like this: +

+

+        .PAGE 11i 17i 1i 1i 1.5i
+                         |   |
+        required right___|   |___top margin
+                margin
+
+ +Clearly, PAGE is best used when you want a convenient +way to tell mom just the dimensions of your printer +sheet (width and length), or when you want to tell her everything +about the page (dimensions and all the margins), for example +

+

+	.PAGE 8.5i 11i 45p 45p 45p 45p
+
+ +This sets up an 8-1/2 by 11 inch page with margins of 45 points +(5/8-inch) all around. +

+NOTE: Only use PAGE at the +start of a document, before entering any text. And remember, +when you're using the +document processing macros, +top margin and bottom margin mean something slightly different than +when you're using just the typesetting macros (see +Top and bottom margins in document processing). +

+Additionally, if you invoke PAGE with a top margin +argument, any macros you invoke after PAGE will +almost certainly move the +baseline +of the first line of text down by one linespace. To compensate, do +

+

+	.RLD 1v
+
+ +immediately before entering any text, or, if it's feasible, make +PAGE the last macro you invoke prior to entering text. +
+ + + +
+

Start a new page

+
+Macro: NEWPAGE + +

+Whenever you want to start a new page, use NEWPAGE, by +itself with no argument. Mom will finish up +processing the current page and move you to the top of a new one +(subject to the top margin set with +T_MARGIN. +

+Experts: NEWPAGE is an alias of +.bp. You can use either, or mix 'n' match with +impunity. +
+


+ + + + + + +

Basic Typesetting Parameters

+
+ +Basic parameter macros deal with the fundamental requirements +for setting type: family, font, point size, leading and line length. +

+If you're using the typesetting macros only, the arguments passed +to the basic parameter macros remain in effect until you change them. +The document processing macros handle things differently. See +Typesetting Macros in Document Processing +for an explanation. +
+ +

Basic parameter macros list

+
    +
  • FAMILY (type family) +
  • FONT (font) +
  • PT_SIZE (point size of type) +
  • LS (line spacing/leading) +
  • AUTOLEAD (automatic line spacing) +
  • LL (line length) +
+ + + +
+

Type family

+
+Macro: FAMILY <family> +
+Alias: FAM + +

+FAMILY takes one argument: the name of the type family +you want. Groff comes with a number of PostScript families, each +identified by a 1-, 2- or 3-letter mnemonic. The standard families +are: + + +
AAvant Garde +
BM Bookman +
HHelvetica +
NNew Century Schoolbook +
PPalatino +
TTimes Roman
+

+The argument you pass to FAMILY is the identifier at +left above. For example, if you want Helvetica, enter +

+

+	.FAMILY H
+
+ +NOTE: The font macro +(FT) lets you to specify both the type family +and the desired font with a single macro. While this saves a few +keystrokes, I recommend using FAMILY for family, +and FT for font, except where doing so is genuinely +inconvenient. +

+Experts: +
+If you add other PostScript families to groff's /font/devps directory, +be sure to follow the groff standard for naming families and fonts. +For example, if you add the Garamond family, name the font files +

+

+	GARAMONDR
+	GARAMONDI
+	GARAMONDB
+	GARAMONDBI
+
+ +GARAMOND then becomes a legal family name you can pass to +FAMILY. (You could, of course, shorten GARAMOND to just +G, or GD.) R, I, B, and BI after GARAMOND are the roman, italic, +bold and bold-italic fonts respectively. +
+ + + +
+

Font

+
+Macro: FT R | I | B | BI + +

+FT takes one of four possible arguments specifying the +desired font: + + +
R = roman +
I = italic +
B = bold +
BI = bold-italic
+

+For example, if your family is Helvetica, entering +

+

+	.FT B
+
+ +will give you the Helvetica bold font. If your family were +Palatino, you'd get the Palatino bold font. +

+You can specify both family and font in the FT macro. +As an example, +

+

+	.FT HB
+
+ +sets the font to Helvetica bold. I strongly recommend keeping +family and font separate. +

+Fonts can also be changed inline. See +Inline Escapes, font control. +
+ + + +


+

Point size of type

+
+Macro: PT_SIZE <size of type in points> +
+*Does not require a unit of measure + +

+PT_SIZE (Point Size) takes one argument: the size of type +in points. Unlike most other macros that establish the size or measure +of something, PT_SIZE does not require that you supply a +unit of measure since it's a near universal convention that type size +is measured in points. Therefore, to change the type size to, say, +11 points, enter +

+

+	.PT_SIZE 11
+
+ +Point sizes may be fractional (e.g. 10.25 or 12.5). +

+You can prepend a plus or a minus sign to the argument to +PT_SIZE, in which case the point size will be changed by + +or - the original value. For example, if the point size is 12, +and you want 14, you can do +

+

+	.PT_SIZE +2
+
+ +then later reset it to 12 with +

+

+	.PT_SIZE -2
+
+ +The size of type can also be changed inline. See +Inline Escapes, changing point size. +
+ + + +
+

Line spacing/leading

+
+Macro: LS <distance between lines> +
+*Does not require a unit of measure + +

+LS (Line Space) takes one argument: the distance you want, typically +in points, from baseline to baseline of type. The argument may +be fractional (e.g. 12.25 or 14.5). Like PT_SIZE, +LS does not require a unit of measure, since +leading +is most often given in points. Therefore, to set the linespace to +14 points, you would enter +

+

+	.LS 14
+
+ +However, if you wish, you may specify a unit of measure by appending +it directly to the argument passed to LS. For example, +if you want a linespace of 1/4 of an inch, enter +

+

+	.LS .25i
+
+ +You can prepend a plus or a minus sign to the argument to +LS, in which case the line spacing will be changed +by + or - the original value. For example, if the line spacing is +14 points, and you want 17 points, you can do +

+

+	.LS +3
+
+ +then later reset it to 14 points with +

+

+	.LS -3
+
+ +Experts: +
+LS should not be confused with the groff primitive +ls. LS acts like vs. +mom does not provide a macro analogous to +ls. +
+ + + +
+

Automatic line spacing

+
+Macro: AUTOLEAD <amount of automatic leading> [FACTOR] +
+*Does not require a unit of measure + +

+Without the FACTOR argument, AUTOLEAD +calculates the linespace for you by adding its argument to the +current point size of type. All subsequent PT_SIZE +requests automatically update the linespacing by the autolead amount. +

+Used in this way, AUTOLEAD does not require a unit +of measure; points is assumed. However, you may use an alternate +unit of measure by appending it to the argument. The argument may +be a decimal fraction (e.g. .5 or 2.75). +

+As an example, if your current point size of type is 12, entering +

+

+	.AUTOLEAD 2
+
+ +changes the linespace to 14 points, regardless any linespacing +already in effect. From here on, every change to the size of type +(with PT_SIZE, not +inline) +changes the linespace as well. If you decrease the type size to 9 +points, the leading decreases to 11 points. If you increase the type +size to 16 points, the leading increases to 18 points. +

+Automatic updating of the linespacing continues until you enter a +"manual" line space value with LS. +

+If you give AUTOLEAD the optional +FACTOR argument, AUTOLEAD +calculates the line space as a factor of the +numeric argument +you gave AUTOLEAD. For example, if your point +size is 12, +

+

+	.AUTOLEAD 1.125 FACTOR
+
+sets the leading at 13.5 points. If you change the point size +to 14, the leading automatically changes to 15.75 (14 x 1.125). +

+NOTE: There's no need to prepend a plus sign (+) +to AUTOLEAD's argument, although you may do so if you +wish. +
+ + + +


+

Line length

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

+LL (Line Length) takes one argument: the distance from the +left margin of the page to the maximum allowable point on the +right at which groff should place type. The line length, in +other words, as the macro suggests. +

+LL requires a unit of measure. Therefore, to set the line +length to 39 picas, you would enter +

+

+	.LL 39P
+
+ +As with other macros that require a unit of measure, the argument to +LL may be fractional. For example, +

+

+	.LL 4.5i
+
+ +sets the line length to 4-1/2 inches. + +

+NOTE: The right margin +macro (R_MARGIN) can also be used to set line +length. +
+


+ + + + + + +

Justifying, quadding, filling and breaking lines

+
+ +The justification and quadding macros deal with how type aligns along +the left and right margins. In a nutshell, type either aligns at the +left margin, at the right margin, at both margins, or at neither margin +(centered). +

+These macros also determine whether or not +input lines are joined and +filled during output. +

+Additionally, macros that deal with how to break +output lines are covered in this +section, as is the +inline escape for joining output lines. +

+You may encounter some words here that are unfamiliar. Refer to +Typesetting terms and +Groff terms for an explanation. + +

Justification, quad, fill, and break macro list

+ +
    +
  • Fill modes +
      +
    • JUSTIFY (set lines justified) +
    • QUAD (set filled lines flush left, right or centered) +
    +
  • Nofill modes +
      +
    • LEFT (set non-filled lines flush left) +
    • RIGHT (set non-filled lines flush right) +
    • CENTER (set non-filled lines centered) +
    +
  • Breaking lines +
      +
    • BR (manually break an output line) +
    • EL (break a line without advancing to the next output line) +
    • SPACE (break a line and add space before the next output line) +
    • SPREAD (break and force-justify an output line) +
    +
  • Joining lines +
      +
    • \c inline escape +
    +
+ + + +
+

Justify lines

+
+Macro: JUSTIFY +
+Fill mode + +

+JUSTIFY doesn't take an argument. +Input lines +after JUSTIFY are +filled and +justified +upon output. +

+To break lines and prevent them from being filled and justified, +use the +BR macro. +
+ + + +


+

Quad lines left, right, or center

+
+Macro: QUAD L | LEFT | R | RIGHT | C | CENTER | J | JUSTIFY +
+Alias: FILL +
+Fill mode + +

+QUAD takes one argument: the direction in which lines +should be +quadded. +Input lines +after QUAD are +filled +upon output. +

+If L or LEFT, type is set flush +along the left margin. +

+If R or RIGHT, type is +set flush along the right margin. +

+If C or CENTER type is set centered +on the current line length. +

+J and JUSTIFY justify text, +and are included as a convenience only. Obviously, if text is +justified, it isn't quadded. QUAD J and +QUAD JUSTIFY have exactly the same effect as JUSTIFY. +

+To break lines and prevent them from being filled, use the +BR macro. +
+ + + +


+

Set non-filled lines flush left, right, or centered

+
+Macro: LEFT +  Macro: RIGHT +  Macro: CENTER + (alias CENTRE) +
+Nofill mode + +

+LEFT, RIGHT and +CENTER let you enter text on a line for line basis +without having to use the +BR macro after each line. +Consider the following: +

+

+	.QUAD LEFT
+	So runs my dream, but what am I?
+	.BR
+	An infant crying in the night
+	.BR
+	An infant crying for the light
+	.BR
+	And with no language but a cry.
+	.BR
+
+ +Because text after QUAD is +filled, you have to use the +BR +macro to prevent the lines from running together. Not only is this +annoying to type, it's awkward to read in a text editor. Much better +to do +

+

+	.LEFT
+	So runs my dream, but what am I?
+	An infant crying in the night
+	An infant crying for the light
+	And with no language but a cry.
+
+ +IMPORTANT: Because LEFT, +RIGHT and CENTER are nofill +modes, groff does not always respect the current line length. +Input lines +that run long may exceed it, or get broken in undesirable ways. +Therefore, when using these three macros, you should preview your +work to ensure that all lines fit as expected. +
+ + + +
+

Manually break lines

+
+Macro: BR + +

+When using JUSTIFY or QUAD, +BR tells mom about partial lines +that you want broken (as opposed to +filled). +Any partial +output line +that immediately precedes BR will be +quadded +in the direction of the current quad, or set flush left if text is +justified. + +

+Most of the time, you won't need the BR macro. +In fill modes, mom tries to be sensible about +where breaks are needed. If the nature of a macro is such that under +most circumstances you'd expect a break, mom puts +it in herself. Equally, in macros where a break isn't normally +desirable, no break occurs. This means text files don't get cluttered +with annoying BR's. +

+NOTE: Lines of text in +nofill mode +never require a BR. Furthermore, in nofill mode, +ALL macros cause a break. If a break is not desired, use the +\c +inline escape. + +

+Experts: BR is an alias for br. +You can use either, or mix 'n' match with impunity. +
+ + + +


+

Manually break a line without advancing on the page

+
+Macro: EL + +

+The mnemonic "EL" is borrowed from old Compugraphic typesetting +systems, where it stood for "End Line." Conceptually, +EL is equivalent to the notion of a carriage return +with no linefeed. + +

+Every once in a while, the need arises for breaking a line without +advancing on the page. Imagine, for example, that you're working from +marked-up copy. The markup indicates 24 points of space between +two given lines, but the prevailing line spacing is 12.5 points. +You may find it more convenient to break the first line with +EL and instruct mom to advance 24 +points to the next line, rather than calculating the lead that needs +to be added to 12.5 to get 24. To demonstrate: +

+

+	.LS 12.5
+	A line of text.
+	.EL
+	.ALD 24p
+	The next line of text.
+
+ +may be more instuitive than +

+

+	.LS 12.5
+	A line of text.
+	.ALD 11.5p
+	The next line of text.
+
+ +The first example has the further advantage that should you wish +to change the prevailing line space but keep the 24 points lead, +you don't have to recalculate the extra space. +

+"ALD" in the above examples stands for "Advance +LeaD" (another mnemonic borrowed +from Compugraphic), which is covered in the section +Vertical movement. +

+IMPORTANT: +EL does not work as advertised on the last +output line +of pages that contain a footer trap (e.g. one set with +B_MARGIN +or in documents formatted using the +document processing macros). +The reason is that the EL macro itself deposits +a line break that trips the trap (hey, I like that -- +"trips the trap"), and once the trap has been sprung, +mom can't recover. She places the line after +the EL on the next page. +

+If you need EL functionality on the last line of +a page with a footer trap, turn the trap off with +TRAP, +as in this example: +

+

+	3.
+	.TRAP OFF
+	.EL
+	.TRAP
+	\*[FP12]Establish, once and for all, if 42 really is the answer.
+
+ +The above looks something like this upon output: +

+

+	3.  Establish, once and for all, if 42 really is the answer.
+
+ +with "3." flush at the left margin, and "Establish, +once and for all..." on the same line as "3." but +starting 12 points in from the left margin. +

+If you hadn't turned the trap off for .EL, +"3." would have appeared at the bottom of the page by +itself, with "Establish, once and for all..." +appearing at the top of the next page. +
+ + + +


+

Break lines and add space between

+
+Macro: SPACE <space to add between lines> +
+Alias: SP + +

+SPACE breaks a line, just like +BR, then adds space after the line. With no +argument, it adds an extra line space. If you pass it a numeric +argument without supplying a +unit of measure, +it advances that number of extra line spaces. For example: +

+

+	.SPACE
+
+ +breaks the line then adds an extra linespace, whereas +

+

+	.SPACE 2
+
+ +breaks the line and adds two extra linespaces. + +

+If you supply a unit of measure, SPACE breaks the +line then adds the specified amount of extra space to the current +linespace, as in +

+

+	.SPACE 6p
+
+ +which breaks the line then adds six points of space to the current +linespace. + +

+SUGGESTION: SPACE and +ALD +can be used interchangeably (.SPACE 6p and +.ALD 6p are equivalent). However, +ALD without an argument does nothing, whereas +SPACE without an argument adds an extra line +space. I recommend using SPACE when you +want an extra line space (or multiple thereof), and +ALD whenever you want some other value of space +after a line. + +

+Experts: SPACE is an alias of sp. +You can use either, or mix 'n' match with impunity. +
+ + + +


+

Break and force justify (spread) lines

+
+Macro: SPREAD + +

+Sometimes, you need to break a line of +justified +text and have it come out fully justified, not +quadded +left the way it would be with the BR macro. +An example of where you'd do this would be when you want to prevent a +word at the end of a line from being hyphenated (say, a proper name). +SPREAD is the macro that lets you break the line +and have it came out fully justified. + +

+Experts: SPREAD is an alias for brp. +You can use either, or mix 'n' match with impunity. +
+ + + +


+

Join input lines

+
+Inline: \c + +

+Sometimes, especially when in one of the +nofill modes, +a macro will cause a break where you don't want one. In order +to prevent this from happening (in other words, to join +input lines +together, forming one +output line), +use the groff +inline escape +\c at the end of each input line to +be joined to another, like this: +

+

+	.LEFT
+	.FAMILY T
+	.FT R
+	Some lines of text to be \c
+	.FAMILY H
+	.FT B
+	joined \c
+	.FAMILY T
+	.FT R
+	together.
+
+ +Upon output, the lines will be joined together to read +

+

+	Some lines of text to be joined together.
+
+ +with the word "joined" in Helvetica bold. Note the +space before \c. Without it, the last three +words of the output line would read +

+

+	bejoinedtogether
+
+ +Please also note that had the example been in one of the +fill modes, +there'd have been no need for the \c. +
+
+ + + + + + +

Typographic refinements

+
+ +The macros in this section help you tweak groff's behaviour, +ensuring that your documents look typographically professional. +
+ + +

Typographic refinements macro list

+
+ +
    +
  • Word and sentence spacing +
      +
    • WS (word spacing) +
    • SS (sentence space) +
    +
  • Letter spacing (track kerning) + +
  • Hyphenation +
      +
    • HY (turn auto hyphenation on/off, or set specific hyphenation parameters) +
    • HY_SET (set all hyphenation parameters) +
    +
  • Automatic kerning and ligatures +
      +
    • KERN (turn automatic pairwise kerning on or off) +
    • LIGATURES (turn automatic generation of ligatures on or off) +
    +
+ + + +
+

Word spacing

+
+Macro: WS <+|-wordspace> | DEFAULT + +

+WS (Word Space) increases or decreases the amount +of space between words. In +nofill modes, +or if +QUAD +is in effect, the space between words is fixed. Therefore, if you +change the word spacing with WS, the change applies +uniformly to the space between every word on every line. However, +when text is +justified, +the space between words varies from line to line (in order to justify +the text). Consequently, the change you make with WS +represents the minimum (and ideal) space groff will try to put between +words before deciding whether to hyphenate a final word or to stretch +the word spacing. + +

+Word space is relative to type size. Knowing how it's calculated is +unimportant. What matters is having a sense of how the value passed +to WS affects the look of your type. Generally, +in/decreasing the word space by a value of 1 or 2 produces a difference +that in many cases is scarcely visible; in/decreasing by a value of 5 +or so produces a subtle but noticeable difference; and in/decreasing +by a value greater than 10 is always apparent. You should preview +your work to assess the effect of WS. + +

+WS +takes as its argument a whole number preceded by a plus or minus sign. +Therefore, to decrease the word space slightly, you might enter +

+

+	.WS -4
+
+ +To increase it by a noticeable amount, you might enter +

+

+	.WS +12
+
+ +You can reset the word spacing to its previous value by switching +the plus or minus sign, like this: +

+

+	.WS +4
+	A line of text
+	.WS -4
+
+ +The .WS -4 undoes the effect of .WS ++4. You can also reset WS to +its groff default by entering +

+

+	.WS DEFAULT
+
+ +This can be particularly useful if you've been playing around +with plus and minus values, and can't remember by how much you +have to in/decrease the word space to get it back to normal. +
+ + + +
+

Sentence space

+
+Macro: SS <+sentence space> | 0 | DEFAULT + +

+SS (Sentence Space) tells groff how to treat double +spaces it encounters between sentences in +input lines. +If you use SS, input sentences with two spaces +after them AND input sentences that fall at the end of input lines +all receive a normal word space plus an additional amount of space +whose size is determined by the + value passed as an argument to +SS. Thus, +

+

+	.SS +2
+
+ +means that input sentences with two spaces after them receive a normal +word space PLUS the +2 value passed to SS. +

+Like +WS, increasing the sentence space by a value of +1 or 2 produces a difference that in many cases is scarcely visible; +increasing by a value of 5 or so produces a subtle but noticeable +difference (i.e. the space between double-spaced input sentences will +be slightly but visibly greater than the space between words); and +increasing by a value greater than 10 is always apparent. You should +preview your work to assess the effect of SS. +

+There's an additional argument you can pass SS: +the number zero (without the + sign). It's the argument you'll +use most often. Typeset copy should never have two spaces between +sentences, and the "zero" argument tells groff to give the extra +spaces no space at all (effectively removing them). Therefore, +if you double-space your sentences (as you should when writing in a +text editor), get in the habit of putting +

+

+	.SS 0
+
+ +at the top of your files. + +

+If you do use SS for something other than ensuring +that you don't get unwanted sentence spaces in output copy, you +can set or reset the sentence space to the groff default (the same +width as a word space, i.e. double-spaced input sentences will appear +double-spaced on output as well) with +

+

+	.SS DEFAULT
+
+ +If you're using the +document processing macros +and your +PRINTSTYLE +is TYPEWRITE, .SS DEFAULT is the default, +because you do want double spaces between sentences in copy +that imitates the look of a typewritten document. +

+IMPORTANT: SS with an argument other than +"0" should only be used if you're of the old (and wise) +school of typists that puts two spaces between sentences. If you +ignore this advice and use SS when you habitually +put only one space between sentences, you risk producing output where +the space between sentences is not equal. +
+ + + +


+

Automatic hyphenation control

+
+Macro: HY toggle +
+Macro: HY LINES <max. number of consecutive hyphenated lines> +
+Macro: HY MARGIN <size of hyphenation margin> +
+Macro: HY SPACE <extra interword spacing to prevent hyphenation> +
+Macro: HY DEFAULT +
+Aliases: HYPHENATE, HYPHENATION + +

+HY, as you can see, can be invoked with a number of +arguments. In all cases, the aliases HYPHENATE +or HYPHENATION can be used in place of +HY. To aid in understanding the various arguments +you can pass to HY, I've broken them down into +separate sections. + +

1. HY

+ +

+HY by itself (i.e. with no argument) simply turns +automatic hyphenation on. Any argument other than LINES, +MARGIN, SPACE or DEFAULT, turns automatic +hyphenation off. For example, as explained in +How to read macro arguments, +you could turn HY off by entering +

+

+	.HY OFF
+	   or
+	.HY X
+	   or
+	.HY END
+
+ +HY observes the following default hyphenation rules: +
+
    +
  1. Last lines (i.e. ones that will spring a trap -- typically + the last line on a page) will not be hyphenated. +
  2. The first and last two characters of a word are never + split off. +
+ +

2. HY LINES

+ +

+HY LINES sets the maximum number of consecutive +hyphenated lines that will appear in output copy. 2 is a very +good choice, and you'd set it with +

+

+	.HY LINES 2
+
+ +By default, when you turn automatic hyphenation on, there is no +limit to the number of consecutive hyphenated lines. + +

+NOTE: +Discretionary hyphens +count when groff is figuring out how many lines to hyphenate; +explicit hyphens do not. + +

3. HY MARGIN

+ +

+HY MARGIN sets the amount of room allowed at +the end of a line before hyphenation is tripped (e.g. if there's +only 6 points left at the end of a line, groff won't try to hyphenate +the next word). HY MARGIN only applies if you're +using +QUAD, and is really only useful if you're +using QUAD LEFT. + +

+As an example, if you don't want groff to hyphenate words when there's +only 18 points of space left at the end of a left-quadded line, +you'd enter +

+

+	.HY MARGIN 18p
+
+ +NOTE: The numeric argument after HY +MARGIN requires a +unit of measure. + +

4. HY SPACE

+ +

+HY SPACE sets an amount of extra interword +space that groff will try to put between words on a +line in order to PREVENT hyphenation. HY SPACE +applies only to +justified lines. Generally speaking, +you'll want this value to be quite small, since too big a value +will result in lines with gaping holes between the words. A reasonable +value might be half a point, or one point, which you'd set with +

+

+	.HY SPACE .5p
+	    or
+	.HY SPACE 1p
+
+ +NOTE: The numeric argument after HY +SPACE requires a +unit of measure. + +

4. HY DEFAULT

+ +

+HY DEFAULT resets automatic hyphenation to its +default behaviour, cancelling any changes made with LINES, +MARGIN, and/or SPACE. + +

A note on hyphenation in general

+ +

+Hyphenation is a necessary evil. If it can be avoided, it should be. +If it can't be, it should occur infrequently. That's the reason for +number of parameters you can set with HY. + +

+Furthermore, hyphenation in +rag +copy requires a great deal of attention. At best, it should be +avoided completely by individually adjusting the number of words +on consecutive lines to achieve a pleasing, natural-looking rag. +Since such adjustments are often too fussy for document +processing, I recommend playing around with HY MARGIN +a bit if your copy looks hyphen-heavy. +
+ + + +


+

Set hyphenation parameters all at once

+
+Macro: HY_SET <lines> [ <margin> [ <space> ] ] +
+Alias: HYSET + +

+HY_SET lets you set the parameters for hyphenation +with a single macro. <lines>, <margin> and <space> +correspond to the numeric values required by +LINES, MARGIN and +SPACE as described +above. + +

+To set just the maximum number of consecutive hyphenated lines, +you'd enter +

+

+	.HY_SET 2
+
+ +If you wanted the same number of maximum consecutive hyphenated lines +and a hyphenation margin for use with +rag +copy, +

+

+	.HY_SET 2 36p
+
+ +would set the hyphenation margin to 36 points. + +

+If you wanted the same number of maximum consecutive hyphenated +lines and a hyphenation space of 2 points for use with +justified +copy, +

+

+	.HYSET 2 0 2p
+
+ +is how you'd do it. +
+ + + +
+

Reduce whitespace

+
+Macro: RW <amount of whitespace reduction between letters> +
+ +

+RW (Reduce Whitespace) and its corresponding macro, +EW (Expand Whitespace), allow you to tighten +(or loosen) +output lines +by uniformly reducing or expanding the space between characters. +This is particularly useful when you want to squeeze or stretch +lines on a narrow measure. + +

+The value passed to RW may be a whole number or a +decimal fraction. Since a value of 1 produces a noticeable reduction +in the space between letters at text sizes, you'll most likely use +small decimal values when tightening lines. For example, +

+

+	.RW .1
+	  or
+	.RW .2
+
+ +may be just enough to squeeze an extra character or two on a +line without the change in letter spacing being obvious. I +highly recommend previewing your work to assess the effect of +RW. + +

+

+IMPORTANT: RW affects all +fonts +in the +family +current at the time it's invoked. It must be reset to zero to +cancel its effect (.RW 0) on those fonts, or reinvoked +(possibly with a different value) if you change family. +

+NOTE: By default, RW does not deposit a +break +(BR) when it's invoked. If you want +RW to break at the ends of the previous +input lines, +you can tell mom that's what you want by invoking the +BR_AT_LINE_KERN +toggle macro. +
+ + + +


+

Expand whitespace

+
+Macro: EW <amount of whitespace expansion between letters> +
+ +

+EW (Expand Whitespace) expands the amount of +whitespace between letters, effectively "loosening" lines +of type. + +

+The value passed to EW may be a whole number or a +decimal fraction. Since a value of 1 produces a noticeable +expansion in the space between letters at text sizes, you'll most likely use +small decimal values when loosening lines. For example, +

+

+	.EW .1
+	  or
+	.EW .2
+
+ +may be just enough to open up a line without the change in letter +spacing being obvious. I highly recommend previewing your work to +assess the effect of EW. + +

+NOTE: By default, EW does not deposit a +break +(BR) when it's invoked. If you want +EW to break at the ends of the previous +input lines, +you can tell mom that's what you want by invoking the +BR_AT_LINE_KERN +toggle macro. +
+ + + +


+

Break before line kerning

+
+Macro: BR_AT_LINE_KERN toggle +
+ +

+By default, mom does not break +input lines +when you invoke RW or EW. +If you'd like mom to break input lines prior +to RW or EW, invoke +BR_AT_INPUT_LINE without any argument. To +disable the breaks, invoke BR_AT_INPUT_LINE +with any argument (OFF, QUIT, Q, X...), like +this +

+

+	.BR_AT_LINE_KERN OFF
+	    or
+	.BR_AT_LINE_KERN X
+
+
+ + + +
+

Automatic kerning

+
+Macro: KERN toggle +
+ +

+By itself (i.e. with no argument), KERN turns +automatic pairwise +kerning +on. With any argument (e.g. OFF, Q, X), pairwise kerning is turned +off. +

+Kerning of individual character pairs can be controlled with the +inline escapes +\*[BU #] and \*[FU #]. See +Inline Escapes, kerning. +
+ + + +


+

Automatic ligature generation

+
+Macro: LIGATURES toggle +
+Alias: LIG + +

+Provided your current font has +ligatures, +LIGATURES, by itself, turns on automatic +generation of ligatures. When automatic ligature generation is +on, simply typing the letters of a ligature combination will +produce the correct ligature upon output. For example, if you +type the word "finally", the fi combination will be +output as an fi ligature. Generally speaking, ligatures are A +Good Thing, hence mom has them on by default. +

+LIGATURES with any argument turns automatic +ligature generation off. +

+NOTE: Not all fonts support ligatures. +
+


+ + + + + + +

Type modifications: pseudo-italic, -bold, -condensed, -extended

+
+ +It sometimes happens that a PostScript +family +doesn't contain all the fonts you need. You might, for example, +be missing an italic font, or a bold font. Or you might not be able +to get your hands on a condensed family. That's where these macros +and inline escapes come in. With them, you can fake the fonts +you're missing. A word of caution, though: "faked" +fonts are just that -- faked. You should only use them as a +last resort, and then only sparingly. A word or two or a line +or two in a faked font will pass unnoticed; large patches of +type in a faked font look typographically cheap. +
+ + +

Type modifications macro list

+
+ +
    +
  • Pseudo italic +
      +
    • SETSLANT -- degree of pseudo-italicising +
    • \*[SLANT] -- inline escape for pseudo-italicising type +
    +
  • Pseudo bold + +
  • Pseudo condensed +
      +
    • CONDENSE -- percentage for pseudo-condensed type +
    • \*[COND] -- inline escape for pseudo-condensed type +
    +
  • Pseudo extended +
      +
    • EXTEND -- percentage for pseudo-extended type +
    • \*[EXT] -- inline escape for pseudo-extending +
    +
+ + + +
+

Set degree of slant for pseudo-italicising

+
+Macro: SETSLANT <degrees to slant type> | RESET + +

+Pseudo-italicising of type is accomplished by slanting a roman font +a certain number of degrees to the right. SETSLANT +lets you fix the number of degrees. Mom's +default is 15, which produces an acceptable approximation of an +italic font. If you want another value -- say, 13 degrees -- +you'd set it by entering +

+

+	.SETSLANT 13
+
+ +If you change the degree of slant and later want to set it back +to the mom default, do +

+

+	.SETSLANT RESET
+
+ +NOTE: By itself, SETSLANT +will not start pseudo-italicising type; it merely tells +mom what degree of slant you want. To start +pseudo-italicising, use the +inline escape +\*[SLANT]. +
+ + + +
+

Pseudo italic on/off

+
+Inline: \*[SLANT] -- turn pseudo-italic on +
+Inline: \*[SLANTX] -- turn pseudo-italic off + +

+\*[SLANT] begins pseudo-italicising type. +\*[SLANTX] turns the feature off. Both are +inline escapes, +therefore they should not appear as separate lines, but rather +be embedded in text lines, like this: +

+

+	Not \*[SLANT]everything\*[SLANTX] is as it seems.
+
+ +Alternatively, if you wanted the whole line pseudo-italicised, +you'd do +

+

+	\*[SLANT]Not everything is as it seems.\*[SLANTX]
+
+ +Once \*[SLANT] is invoked, it remains in effect +until turned off. + +

+NOTE: If you're using the +document processing macros +with +PRINTSTYLE TYPEWRITE, +mom underlines pseudo-italics by default. To +change this behaviour, use the special macro +SLANT_MEANS_SLANT. +
+ + + +


+

Set amount of emboldening

+
+Macro: SETBOLDER <amount of emboldening, in machine units> | RESET + +

+Emboldening of type is accomplished by printing characters +twice; the second printing is slightly offset from the first, +effectively "thickening" the character. +SETBOLDER lets you set the number of +machine units +for the offset. Mom's default is 700 units, which +produces an acceptable approximation of a bold font. If you want +another value -- say, 500 units -- you'd set it by entering +

+

+	.SETBOLDER 500
+
+ +If you change the emboldening offset and later want to set it back +to the mom default, do +

+

+	.SETBOLDER RESET
+
+ +NOTE: By itself, SETBOLDER +will not start emboldening type; it merely tells +mom what you want the emboldening offset to be. +To start emboldening, use the +inline escape +\*[BOLDER]. +
+ + + +
+

Emboldening on/off

+
+Inline: \*[BOLDER] -- turn emboldening on +
+Inline: \*[BOLDERX] -- turn emboldening off + +

+\*[BOLDER] begins emboldening type. +\*[BOLDERX] turns the feature off. Both are +inline escapes, +therefore they should not appear as separate lines, but rather +be embedded in text lines, like this: +

+

+	Not \*[BOLDER]everything\*[BOLDERX] is as it seems.
+
+ +Alternatively, if you wanted the whole line emboldened, +you'd do +

+

+	\*[BOLDER]Not everything is as it seems.\*[BOLDERX]
+
+ +Once \*[BOLDER] is invoked, it remains in effect +until turned off. + +

+NOTE: If you're using the +document processing macros +with +PRINTSTYLE TYPEWRITE, +mom ignores \*[BOLDER] +requests. +
+ + + +


+

Set percentage for pseudo-condensed type

+
+Macro: CONDENSE <pseudo-condense percentage> + +

+Pseudo-condensing of type is accomplished by reducing the width of +characters at a given point size without reducing their height, +effectively narrowing them so they look like condensed type. +CONDENSE tells mom what +percentage of the normal character width you want the characters +to be condensed. +

+Mom has no default value for +CONDENSE, therefore you must set it before using the +inline escape +\*[COND]. +80 percent of the normal character width is a good value, and +you'd set it like this: +

+

+	.CONDENSE 80
+
+ +NOTE: By itself, CONDENSE +will not start pseudo-condensing type; it merely tells +mom what percentage of the normal character +width you want characters to be condensed. +To start pseudo-condensing, use the +inline escape +\*[COND]. +

+Additional note: Make sure that pseudo-condensing +is off (with +\*[CONDX]) +before before making any changes to the pseudo-condense percentage +with CONDENSE. +
+ + + +


+

Pseudo-condensing on/off

+
+Inline: \*[COND] -- turn pseudo-condensing on +
+Inline: \*[CONDX] -- turn pseudo-condensing off + +

+\*[COND] begins pseudo-condensing type. +\*[CONDX] turns the feature off. Both are +inline escapes, +therefore they should not appear as separate lines, but rather +be embedded in text lines, like this: +

+

+	\*[COND]Not everything is as it seems.\*[CONDX]
+
+ +\*[COND] remains in effect until you turn it +off with \*[CONDX]. + +

+IMPORTANT: You MUST turn \*[COND] +off before making any changes to the point size of your type, either +via the +PT_SIZE +macro or with the \s inline escape. If you wish +the new point size to be pseudo-condensed, simply reinvoke +\*[COND] afterwards. Equally, +\*[COND] must be turned off before changing the +condense percentage with CONDENSE. + +

+NOTE: If you're using the +document processing macros +with +PRINTSTYLE TYPEWRITE, +mom ignores \*[COND] +requests. +
+ + + +


+

Set percentage for pseudo-extended type

+
+Macro: EXTEND <pseudo-extend percentage> + +

+Pseudo-extending of type is accomplished by increasing the width of +characters at a given point size without increasing their height, +effectively widening them so they look like extended type. +EXTEND tells mom what +percentage of the normal character width you want the characters +to be extended. +

+Mom has no default value for +EXTEND, therefore you must set it before using the +inline escape +\*[EXT]. +120 percent of the normal character width is a good value, and +you'd set it like this: +

+

+	.EXTEND 120
+
+ +NOTE: By itself, EXTEND +will not start pseudo-extending type; it merely tells +mom what percentage of the normal character +width you want characters to be extended. +To start pseudo-extending, use the +inline escape +\*[EXT]. + +

+Additional note: Make sure that +pseudo-extending is off (with +\*[EXTX]) +before before making any changes to the pseudo-extend percentage +with EXTEND. +
+ + + +


+

Pseudo-extending on/off

+
+Inline: \*[EXT] -- turn pseudo-extending on +
+Inline: \*[EXTX] -- turn pseudo-extending off + +

+\*[EXT] begins pseudo-extending type. +\*[EXTX] turns the feature off. Both are +inline escapes, +therefore they should not appear as separate lines, but rather +be embedded in text lines, like this: +

+

+	\*[EXT]Not everything is as it seems.\*[EXTX]
+
+ +\*[EXT] remains in effect until you turn it +off with \*[EXTX]. + +

+IMPORTANT: You MUST turn \*[EXT] +off before making any changes to the point size of your type, either +via the +PT_SIZE +macro or with the \s inline escape. If you wish +the new point size to be pseudo-extended, simply reinvoke +\*[EXT] afterwards. Equally, +\*[EXT] must be turned off before changing the +extend percentage with EXTEND. + +

+NOTE: If you're using the +document processing macros +with +PRINTSTYLE TYPEWRITE, +mom ignores \*[EXT] +requests. +
+


+ + + + + + +

Vertical movement

+
+ +The two macros in this section allow you to move down or up on the page +relative to the current +baseline. + + +

Vertical movement macro list

+
+
    +
  • ALD -- Advance Lead +
  • RLD -- Reverse Lead +
+ + + +
+

Advance Lead (move downward)

+
+Macro: ALD <distance to move downward> +
+*Requires a unit of measure + +

+ALD takes one argument: the distance to move downward +on the page relative to the current vertical position. +

+Used by itself, or preceded by +BR, +ALD will advance by one line space plus the +distance you specify. Preceded by +EL, +it will advance by exactly the distance you specify. +

+ALD requires a unit of measure. Decimal fractions +are allowed, and values may be combined. Therefore, to move down +on the page by 1/4 of an inch, you could enter either +

+

+	.ALD .25i
+	    or
+	.ALD 1P+6p
+
+ +As the mnemonic (Advance +LeaD) suggests, you'll most often +use ALD with +points +of lead. + +

+NOTE: if you want to use ALD +at the top of a page (i.e. to advance to the starting position +of type on a page), combine the value you want with -1v (minus +one line space), like this: +

+

+	.ALD 1i-1v
+
+ +At the top of a page, this will advance one inch from the +top edge of the paper. Without the -1v, the same command would +advance one inch from the top of the page plus the distance of +one line space. +

+Important: Do NOT use ALD in this +way if you have set a top margin with +T_MARGIN +or +PAGE. +
+ + + +


+

Reverse Lead (move upward)

+
+Macro: RLD <distance to move upward> +
+*Requires a unit of measure + +

+RLD takes one argument: the distance to move +upward on the page relative to the current vertical position. +

+Used by itself, or preceded by +BR, +RLD will advance by one line space, then +reverse by the distance you specify. Preceded by +EL, +it will reverse by exactly the distance you specify. +

+RLD requires a unit of measure. Decimal fractions +are allowed, and values may be combined. Therefore, to move up +on the page by 1/4 of an inch, you could enter either +

+

+	.RLD .25i
+	    or
+	.RLD 1P+6p
+
+ +As the mnemonic (Rdvance +LeaD) suggests, you'll most often +use RLD with +points +of lead. +
+
+ + + + + + +

Tabs

+
+ +Mom provides two different kinds of tab setup: +typesetting tabs and string tabs. Neither one has anything to +do with the tab key on your keyboard, and both are utterly +divorced from groff's notion of tabs. I recommend reading this +section carefully in order to understand how +mom handles tabs. + +

Typesetting tabs

+

+Typesetting tabs are defined by both an indent from the left margin and +a line length. This is quite different from typewriter-style tab stops +(the groff norm) that only define the left indent. In conjunction +with the multi-column macros, typesetting tabs significantly facilitate +tabular and columnar work. +

+Typesetting tabs are created with the TAB_SET +macro. TAB_SET identifies the tab (by number), +establishes its left indent and line length, and optionally sets +a quad direction and fill mode. After tabs have been created with +TAB_SET, they can be called at any time with the +TAB macro. +

+NOTE: see the section +Typesetting Macros in Document Processing +for information and advice on using tabs with the +document processing macros. + +

Quickie tutorial on typesetting tabs

+

+Say you want to set up three tabs to produce an employee evaluation +that looks something like this: +

+ +

+	CRITERION       EVALUATION     COMMENTS
+
+	Service           Good         Many clients specifically request
+	                               support from Joe by name.
+
+	Punctuality    Satisfactory    Tends to arrive after 8:00am, but
+	                               often works through lunch hour.
+
+	Team spirit     Needs work     Persistently gives higher priority
+	                               to helping clients than respecting
+	                               organizational hierarchy.
+
+ +You want the first tab ("CRITERION") +
+
    +
  • to begin at the left margin of the page (i.e. no indent) +
  • to have a line length of 5 picas +
  • to be set flush left +
+
+Tabs must be numbered, and each has to be set up with a separate +TAB_SET +line. Therefore, to set up tab 1, you enter +

+

+   .TAB_SET  1  0  5P  L
+             |  |  |   |
+      tab #__|  |  |   |__direction
+                |  |
+        indent__|  |__length
+
+ +You want the second tab ("EVALUATION") +
+
    +
  • to begin 8 picas from the left margin +
  • to have a length of 9 picas +
  • to be set centered. +
+
+You set it up like this: +

+

+   .TAB_SET  2  8P  9P  C
+             |  |   |   |
+      tab #__|  |   |   |__direction
+                |   |
+        indent__|   |__length
+
+ +You want the third tab ("COMMENTS") +
+
    +
  • to begin 19 picas from the left margin +
  • to have a length of 17 picas +
  • to be set flush left, filled +
+
+The setup looks like this: +

+

+   .TAB_SET  3  19P  17P  L  QUAD
+             |   |    |   |    |
+             |   |    |   |    |__fill output lines
+             |   |    |   |
+      tab #__|   |    |   |__direction
+                 |    |
+         indent__|    |__length
+
+ +Once the tabs are set up, you can call them in one of two ways: +
+
    +
  • TAB (with the tab + number as an argument) breaks the current line, + advances one linespace, and calls the tab. +
  • TN (Tab Next) keeps + you on the current line and moves over to the next + tab in sequence (i.e. from 1 to 2, 2 to 3, etc.). +
+
+To exit from tabs and restore your original left margin, line length, +quad direction and fill mode, use +TQ +(Tab Quit). +

+Here's how the input for our sample employee evaluation looks +(with some introductory parameters): +

+

+	.PAGE 8.5i 11i 1i 1i 1i
+	.FAMILY  T
+	.FT      R
+	.PT_SIZE 14
+	.LS      16
+	.QUAD    LEFT
+	.KERN
+	.HY OFF
+	.SS 0
+	.TAB_SET 1 0   5P  L
+	.TAB_SET 2 8P  9P  C
+	.TAB_SET 3 19P 17P L QUAD
+	.TAB 1
+	CRITERION
+	.TN
+	EVALUATION
+	.TN
+	COMMENTS
+	.SP
+	.TAB 1
+	Service
+	.TN
+	Good
+	.TN
+	Many clients specifically request support from Joe by name.
+	.SP
+	.TAB 1
+	Punctuality
+	.TN
+	Satisfactory
+	.TN
+	Tends to arrive after 8:00am, but often works through lunch hour.
+	.SP
+	.TAB 1
+	Team spirit
+	.TN
+	Needs work
+	.TN
+	Persistently gives higher priority to helping clients
+	than respecting organizational hierarchy.
+	.TQ
+
+ +Try setting this up and previewing it with +

+

+	groff -mom -X <filename>
+
+ +Notice how .TN simply moves over to the next tab, +while the combination .SP/.TAB 1 breaks the +line, advances by one extra linespace, and calls the first tab. +

+Notice, too, how the QUAD argument passed to +tab 3 means you don't have to worry about the length of +input lines; +mom +fills +the tab and sets the type flush left. + +

String tabs (autotabs)

+

+String tabs let you mark off tab positions inline. Left indents +and line lengths are calculated from the beginning and end positions of +the marks. This is especially useful when tab indents and lengths +need to be determined from the text that goes in each tab. +

+Setting up string tabs is a two-step procedure. First, you enter an +input line in which you mark off where you want tabs to begin and end. +(This is often best done in conjunction with the +SILENT +macro.) +

+Next, you invoke the +ST +macro for every string tab you defined, and optionally pass quad and +fill information to it. That done, string tabs are called with +the +TAB +macro, just like typesetting tabs. +

+In combination with the +PAD +macro and the groff inline escape +\h +(move horizontally across the page) or mom's +\*[FP#] +(Forward Points) inline, string tabs provide +tremendous flexibility in setting up complex tab structures. + +

Quickie tutorial on string tabs

+

+Say you want to set up tabs for the +employee evaluation form +used as an example in the +typesetting tabs tutorial. +This time, though, you want to play around with the point size of +type, so you can't know exactly how long the tabs will be or where +they should start. All you know is +
+

    +
  • CRITERION is the longest line in tab 1 +
  • EVALUATION is the longest line in tab 2 +
  • tab 3 should extend to the current right margin +
  • you want a 1 pica gutter between each tab +
+
+This is an ideal job for string tabs. +

+The first thing you need for string tabs is an +input line +with tab positions marked on it. Tabs are marked with the +inline escapes +\*[ST#] and \*[ST#X]. (In this +example, we enclose the input line with the +SILENT +macro so the line doesn't print. We also use the +PAD +macro to permit defining tab 3 as simply "the amount of +space remaining on the input line.") +

+The setup looks like this: +

+

+	.SILENT
+	.PAD "\*[ST1]CRITERION\*[ST1X]\*[FP12]\*[ST2]EVALUATION\*[ST2X]\*[FP12]\*[ST3]#\*[ST3X]"
+	.SILENT OFF
+
+ +The long line after .PAD looks scary, but it isn't. +Here's what it means when broken down into its component parts: +
+
    +
  • The longest line in tab 1 is "CRITERION", so we + enclose CRITERION with begin/end markers for string tab 1: +

    + \*[ST1]CRITERION\*[ST1X] +
    +

  • We want a 1 pica (12 points) gutter between tab 1 and 2, + so we insert 12 points of space with \*[FP12] + (Forward Points 12): +

    + \*[FP12] +
    +

  • The longest line in tab 2 is "EVALUATION", so + we enclose EVALUATION with begin/end markers for string + tab 2: +

    + \*[ST2]EVALUATION\*[ST2X] +
    +

  • We want 1 pica (12 points) between tab 2 and 3, so we + insert 12 points of space with another \*[FP12]: +

    + \*[FP12] +
    +

  • We want tab 3 to be as long as whatever space remains on + the current line length, so we enclose the + pad marker + (#) with begin/end markers for string tab 3: +

    + \*[ST3]#\*[ST3X] +
    +

+
+The tabs are now defined, but they require +quad direction +and +fill +information. For each string tab defined above, enter a +separate +ST +line, like this: +

+

+	.ST  1  L
+	.ST  2  L
+	.ST  3  L  QUAD
+	     |  |   |
+	     |  |   |__fill output lines
+	     |  |
+	tab__|  |__direction
+	number
+
+ +From here on in, you call the tabs with +TAB +and +TN +just like typesetting tabs (see +typesetting tabs tutorial). +

+Here's the complete setup and entry for the sample employee +evaluation form utilising string tabs. +

+

+	.PAGE 8.5i 11i 1i 1i 1i
+	.FAMILY  T
+	.FT      R
+	.PT_SIZE 14
+	.LS      16
+	.QUAD    LEFT
+	.KERN
+	.HY OFF
+	.SS 0
+	.SILENT
+	.PAD "\*[ST1]CRITERION\*[ST1X]\*[FP12]\*[ST2]EVALUATION\*[ST2X]\*[FP12]\*[ST3]#\*[ST3X]"
+	.SILENT OFF
+	.ST  1  L
+	.ST  2  L
+	.ST  3  L  QUAD
+	.TAB 1
+	CRITERION
+	.TN
+	EVALUATION
+	.TN
+	COMMENTS
+	.SP
+	.TAB 1
+	Service
+	.TN
+	Good
+	.TN
+	Many clients specifically request support from Joe by name.
+	.SP
+	.TAB 1
+	Punctuality
+	.TN
+	Satisfactory
+	.TN
+	Tends to arrive after 8:00am, but often works through lunch hour.
+	.SP
+	.TAB 1
+	Team spirit
+	.TN
+	Needs work
+	.TN
+	Persistently gives higher priority to helping clients
+	than respecting organizational hierarchy.
+	.TQ
+
+ +Try setting this up and previewing it with +

+

+	groff -mom -X <filename>
+
+ +Now, change the point size of the above sample to 12 and preview +it again. You'll see that the tab structure remains identical (tab +1=CRITERION, tab 2=EVALUATION, tab 3=space remaining, and the gutter +between tabs is still 1 pica), while the position and length +of the tabs have altered because of the new point size. +

+Now try increasing the gutters to 2 picas (put an additional +\*[FP12] after each \*[FP12]). Preview the +file again, and notice how the tab structure remains the same, but +the gutters are wider. + + + +

Tabs macro list

+ + +
    +
  • TAB_SET (create typesetting tabs) +
  • \*[ST]...\*[STX] (inline escapes for marking String Tabs) +
  • ST (set String Tabs) +
  • TAB (call tabs) +
  • TN (Tab Next; call next tab in a sequence) +
  • TQ (Tab Quit) +
+ + + +
+

Set up typsetting tabs

+
+Macro: TAB_SET <tab number> <indent> <length> L | R | C | J [ QUAD ] +
+*<indent> and <length> require a unit of measure + +

+TAB_SET creates typesetting tabs that later can be +called with +TAB. +Typesetting tabs are numbered, and defined by an indent, a length, +and a "direction", hence TAB_SET has +four required arguments: +
+

    +
  • a tab number +
  • an indent (measured from the left margin of the page, + or, if you're already in a tab, from the left margin of the tab) +
  • a length +
  • a direction +
+
+To set up a centered tab 6 picas long and 9 points from the left +margin, you'd enter +

+

+	.TAB_SET 1 9p 6P C
+
+ +The tab number in the above ("1") is simply an +identifier. It could have been 4, or 17, or 296. There's no +need to set up tabs in numerical sequence. +

+By default, tabs are in +nofill +mode, meaning you can enter text in tabs on a line for line basis +without having to use the +BR +macro. If you want a tab to be +filled, +pass the optional argument QUAD, which will +make the tab behave as if you'd entered .QUAD L | R | +C. +

+For +justified +tabs, simply pass the argument J (without the +QUAD argument), like this: +

+

+	.TAB 1 9p 6P J
+
+ +Once tabs are set, they can be called at any time with the +TAB # +macro, where "#" is the number of the desired tab. +

+You can set up any number of typesetting tabs. However, be +aware that +string tabs +are also called with TAB #, so be careful that you +don't set up a typesetting tab numbered, say, 4, when you already +have a string tab numbered 4. Every tab, typesetting or string, +must have a unique numeric identifier. +

+NOTE: If you use TAB_SET while +you're currently inside a tab, the indent argument is the distance from +the tab's left margin, not the left margin of the page. Therefore, +you should exit tabs (with +TQ) +before creating new tabs (unless, of course, you want to set +up a tab structure within the confines of an existing tab). +

+IMPORTANT: Turn all indents off (see +Indents) +before setting up tabs with TAB_SET, or +mom may get confused. +
+ + + +


+

Mark positions of string tabs

+
+Inlines: \*[ST<number>]...\*[ST<number>X] + +

+String tabs need to be marked off with +inline escapes +before being set up with the +ST +macro. Any input line may contain string tab markers. +<number>, above, means the numeric identifier of +the tab. The following shows a sample input line with string +tab markers. +

+

+	\*[ST1]Now is the time\*[ST1X] for all \*[ST2]good men\*ST2X] to come to the aid of the party.
+
+ +String tab 1 begins at the start of the line and ends after the word +"time". String tab 2 starts at "good" and ends +after "men". Inline escapes (e.g. font or point size +changes, or horizontal movements, including +padding) +are taken into account when mom determines the +position and length of string tabs. +

+Up to nineteen string tabs may be marked (not necessarily all on +the same line, of course), and they must be numbered between 1 +and 19. +

+Once string tabs have been marked in input lines, they have to +be "set" with +ST, +after which they may be called, by number, with +TAB. +

+NOTE: Lines with string tabs marked off in them +are normal input lines, i.e. they get printed, just like any +input line. If you want to set up string tabs without the line +printing, use the +SILENT +macro. +

+IMPORTANT: Do not try to set up string tabs on +a line that is broken with +SPREAD. +Mom calculates string tab positions and lengths +as she reads the input line, not after the line has undergone +manipulations to the word spacing. +
+ + + +


+

Set string tabs

+
+Macro: ST <tab number> L | R | C | J [ QUAD ] + +

+After string tabs have been marked off on an input line (see +\*[ST]...\*[STX]), +you need to "set" them by giving them a direction +and, optionally, the QUAD argument. In this +respect, ST is like +TAB_SET +except that you don't have to give ST an indent +or a line length (that's already taken care of, inline, by +\*[ST]...\*[STX]). If you want string tab 1 to be +left, enter +

+

+	.ST 1 L
+
+ +If you want it to be left and +filled, enter +

+

+	.ST 1 L QUAD
+
+ +If you want it to be justified, enter +

+

+	.ST 1 J
+
+ +See the +Quickie tutorial on string tabs +for a full explanation of setting up string tabs. +
+ + + +
+

Call tabs

+
+Macro: TAB <tab number> +
+Alias: TB +

+After tabs have been defined (either with +TAB_SET +or +ST), +TAB moves to whatever tab number you pass it as +an argument. For example, +

+

+	.TAB 3
+
+ +moves you to tab 3. +

+ +NOTE: TAB breaks the line preceding +it and advances 1 linespace. Hence, +

+

+	.TAB 1
+	A line of text in tab 1.
+	.TAB 2
+	A line of text in tab 2.
+
+ +produces, on output +

+

+	A line of text in tab 1.
+	                           A line of text in tab 2.
+
+ +If you want the tabs to line up, use +TN +(Tab Next), like this: +

+

+	.TAB 1
+	A line of text in tab 1.
+	.TN
+	A line of text in tab 2.
+
+ +which produces +

+

+	A line of text in tab 1.   A line of text in tab 2.
+
+ +If the text in your tabs runs to several lines, and you want the +first lines of each tab to align, you must use the +multi-column macros. +

+ADDITIONAL NOTE: Any indents in effect prior to +calling a tab are automatically turned off by TAB. +If you were happily zipping down the page with a left indent of 2 +picas turned on, and you call a tab whose indent from the left margin +is 6 picas, your new distance from the left margin will be 6 picas, +not 6 picas plus the 2 pica indent. +
+ + + +


+

Tab Next

+
+Macro: TN +
+ +

+TN moves over to the next tab in numeric +sequence (tab n+1) without advancing on the page. See the +NOTE +in the description of the TAB macro for an +example of how TN works. +

+NOTE: TN is like +EL +in that it doesn't work as advertised on the last line before a +footer trap is sprung. If you need to use TN +on the last line of a page with a footer trap, turn the trap off with +TRAP, +as in this example: +

+

+	.TAB_SET 1 0  1P  L
+	.TAB_SET 2 1P 20P L
+	.TAB 1
+	.TRAP OFF
+	1.
+	.TN
+	The first rule of survival is "make and keep good friends."
+	.TRAP
+
+ +The above, at the bottom of a page, will look something like this: +

+

+	1.  The first rule of survival is "make and keep good friends."
+
+ +If you hadn't turned the trap off before .TN, +"1." would have appeared as the last line on the page, +with "The first rule of survival..." being the first +line on the next page. +
+ + + +
+

Tab Quit

+
+Macro: TQ +
+ +

+TQ takes you out of whatever tab you were in, +advances 1 linespace, and restores the left margin, line length, +quad direction and +fill mode +that were in effect prior to invoking any tabs. +
+


+ + + + + + +

Multi-Columns

+
+ +Tabs are not by nature columnar, which is to say that if the text +inside a tab runs to several lines, calling another tab does not +automatically move to the +baseline +of the first line in the previous tab. To demonstrate: +

+

+	.TAB 1
+	Carrots
+	Potatoes
+	Broccoli
+	.TAB 2
+	$1.99/5 lbs
+	$0.25/lb
+	$0.99/bunch
+
+ +produces, on output +

+

+	Carrots
+	Potatoes
+	Broccoli
+	           $1.99/5 lbs
+	           $0.25/lb
+	           $0.99/bunch
+
+ +The multi-column macros allow you to set tabs in columnar +fashion, rather than line by line. When you invoke multi-column +mode (with +MCO), +mom saves the position of the current baseline. +MCR +(Multi-column return) at any point while multi-columns are on +returns you to the saved position. Exiting multi-columns +(MCX) +quits the current tab (if you're in one) and moves you to the +bottom of the longest column. (Note that you do not have to use +multi-columns in conjunction with tabs.) +

+Using our example above, but setting it in multi-column mode, +

+

+	.MCO
+	.TAB 1
+	Carrots
+	Potatoes
+	Broccoli
+	.MCR
+	.TAB 2
+	$1.99/5 lbs
+	$0.25/lb
+	$0.99/bunch
+	.MCX
+
+ +produces +

+

+	Carrots   $1.99/5 lbs
+	Potatoes  $0.25/lb
+	Broccoli  $0.99/bunch
+
+ +NOTE: Do not confuse MCO with +the +COLUMNS +macro in the +document processing macros. + + +

Columns macro list

+
+ + + + +
+

Begin multi-column setting

+
+Macro: MCO +
+ +

+MCO +(Multi-Column On) +is the macro you use to begin multi-column setting. It marks +the current +baseline +as the top of your columns, for use late with +MCR. See the +introduction to columns +for an explanation of multi-columns and some sample +input. +

+NOTE: Do not confuse MCO with +the +COLUMNS +macro in the +document processing macros. +
+ + + +


+

Return to top of column

+
+Macro: MCR +
+ +

+Once you've turned multi-columns on (with +MCO), +MCR, at any time, returns you to the top of +your columns. +
+ + + +


+

Exit multi-columns

+
+Macro: MCX [ <distance to advance below longest column> ] +
+*Optional argument requires a unit of measure + +

+MCX takes you out of any tab you were in (by silently +invoking +TQ) and advances to the bottom of the longest +column. +

+Without an argument, MCX advances 1 linespace +below the longest column. Linespace, in this instance, is the +leading +in effect at the moment MCX is +invoked. +

+If you pass the <distance> argument to +MCX, it advances 1 linespace below the longest +column (see above) PLUS the distance specified by the argumemnt. +The argument requires a unit of measure; therefore, to advance +an extra 6 points below where MCX would +normally place you, you'd enter +

+

+	.MCX 6p
+
+ +NOTE: If you wish to advance a precise distance +below the +baseline +of the longest column, use MCX with an +argument of 0 (zero; no unit of measure required) in conjunction +with the +ALD +macro, like this: +

+

+	.MCX 0
+	.ALD 24p
+
+ +The above advances to precisely 24 points below the baseline +of the longest column. +
+
+ + + + + + +

Indents

+
+ +With mom's indents, you can indent from the left, +the right, or both margins. In addition, mom +provides temporary left indents (i.e. only one line is indented, +as at the start of a paragraph) and "hanging" left indents +(the reverse of a temporary indent; the first line isn't indented, +subsequent lines are). + +

A brief explanation of how mom handles indents

+

+Mom provides five kinds of indents: left, right, +both, temporary, and hanging. Each is invoked by its own name: +
+

    +
  • IL = Indent Left +
  • IR = Indent Right +
  • IB = Indent Both +
  • HI = Hanging Indent +
  • TI = Temporary Indent +
+
+In addition, there are four macros to control exiting from +indents: +
+
    +
  • IQ  = quit all active indents +
  • ILX = exit indent style left +
  • IRX = exit indent style right +
  • IBX = exit indent style both +
+
+This section deals exclusively with IL, IR and +IB. For an explanation +of hanging and temporary indents -- how they work and how to use +them -- see +Hanging indents +and +Temporary indents. +

+The first time you invoke any of mom's indents, +you must supply a measure. For example, +

+

+	.IL 2P
+
+ +indents text 2 picas from the left margin (or current tab +indent). +

+When you want to exit the above indent, use either +

+

+	.IQ
+	 or
+	.ILX
+
+ +The next time you want the same indent, invoke it without the +argument, like this: +

+

+	.IL
+
+ +As you can see, once you've supplied a measure to an indent macro +mom stores the value, obviating the need to repeat +it on subsequent invocations. And mom doesn't just +store the measure -- she hangs on to it tenaciously. Arguments passed +to IL, IR and IB are additive. +Consider the following: +

+

+	.LL 20P
+	.IR 2P    \"Indent right by 2 picas
+	A first block of text...
+	...
+	...
+	.IQ       \"Turn indent off
+	A second block of text...
+	...
+	...
+	.IR 2P    \"Indent right by an additional 2 picas (i.e. 4 picas)
+	A third block of text...
+	...
+	...
+
+ +The first block of text is right indented by 2 picas (i.e. the line +length is shortened by 2 picas to 18 picas). The second block of +text, after IQ, is, as you'd expect, set to the full +measure. The third block of text -- the one to pay attention to -- +is not right indented by 2 picas, but rather by 4 picas. +Mom adds the value of arguments to IL, +IR and IB to whatever value is already +in effect. +

+If you wanted the third block of text in the example above to +be right indented by just 2 picas (the original measure given to +IR), you would enter .IR without an +argument. +

+Because indent arguments are additive, putting a minus sign in front +of the argument can be used to subtract from the current value. +In the following example, the first line is indented 18 points, the +second is indented 36 points (18+18), and the third is again indented +18 points (36-18). +

+

+	.IL 18p     \"Indent left by 18 points      = 18 points
+	Now is the time
+	.IL 18p     \"Indent left by 18 points more = 36 points
+	for all good men to come
+	.IL -18p    \"Indent left by 18 points less = 18 points
+	to the aid of the party.
+
+ +Sometimes, you may want to clear out the stored indent values -- let +mom start indenting with a clean slate, as it were. +Giving the optional argument CLEAR to any of the +"indent quit" macros resets them to zero. +
+
    +
  • IQ CLEAR  = quit and clear all indents +
  • ILX CLEAR = quit and clear indent style left +
  • IRX CLEAR = quit and clear indent style right +
  • IBX CLEAR = quit and clear indent style both +
+
+Indent styles may be combined and manipulated separately. You could, +for example, have a left indent of 4 picas and a right indent of 6 +picas and control each separately, as in the following example. +

+

+	.IL 4P     \"Indent left 4 picas
+	.IR 6P     \"Indent right 6 picas
+	Some text
+	.IRX       \"Turn off the right indent only
+	More text  \"Text is still indented 4 picas left
+
+ +If, at .IRX, you wanted the text afterward to have no +indents (either left or right), you would enter .IQ, +which exits all indent styles at once. +

+A word of advice: Indents are best used only when +you have a compelling reason not to change the current left margin or +line length. In many instances where indents might seem expedient, +it's better to use tabs, or actually change the left margin or the +line length. Mom's indenting macros are flexible +and powerful, but easy to get tangled up in. Personally, I don't +use them much, except for cutarounds and multi-level lists à la html, +at which they excel. +

+NOTE: see the section +Typesetting Macros in Document Processing +for information and advice on using idents with the +document processing macros. + +

Indents macro list

+
    +
  • IL  (Indent left) +
  • IR  (Indent right) +
  • IB  (Indent both) +
  • TI  (Temporary indent, left) +
  • HI  (Hanging Indent) + +
  • IQ  (Quit indents, all) +
  • ILX (Exit indent style left) +
  • IRX (Exit indent style right) +
  • IBX (Exit indent style both) +
+ + + +
+

Indent left

+
+Macro: IL [ <measure> ] +
+*The optional argument requires a unit of measure + +

+IL indents text from the left margin of the page, +or if you're in a tab, from the left edge of the tab. Once +IL is on, the left indent is applied uniformly to +every subsequent line of text, even if you change the line length. +

+The first time you invoke IL, you must give it a +measure. Subsequent invocations with a measure add to the previous +measure. A minus sign may be prepended to the argument to subtract +from the current measure. The +\w +inline escape +may be used to specify a text-dependent measure, in which case +no unit of measure is required. For example, +

+

+	.IL \w'margarine'
+
+ +indents text by the width of the word "margarine". +

+With no argument, IL indents by its last +active value. See the +brief explanation of how mom handles indents +for more details. +

+NOTE: Calling a tab (with +TAB) +automatically cancels any active indents. +

+ADDITIONAL NOTE: Invoking IL +automtically turns off IB. +
+ + + +


+

Indent right

+
+Macro: IR [ <measure> ] +
+*The optional argument requires a unit of measure + +

+IR indents text from the right margin of the +page, or if you're in a tab, from the end of the tab. +

+The first time you invoke IR, you must give it a +measure. Subsequent invocations with a measure add to the previous +indent measure. A minus sign may be prepended to the argument to +subtract from the current indent measure. The +\w +inline esacpe +may be used to specify a text-dependent measure, in which case +no unit of measure is required. For example, +

+

+	.IR \w'jello'
+
+ +indents text by the width of the word "jello". +

+With no argument, IR indents by its last +active value. See the +brief explanation of how mom handles indents +for more details. +

+NOTE: Calling a tab (with +TAB) +automatically cancels any active indents. +

+ADDITIONAL NOTE: Invoking IR +automtically turns off IB. +
+ + + +


+

Indent both

+
+Macro: IB [ <left measure> <right measure> ] +
+*The optional arguments require a unit of measure + +

+IB allows you to set or invoke a left and a right +indent at the same time. +

+At its first invocation, you must supply a measure for both indents; +at subsequent invocations when you wish to supply a measure, both must +be given again. As with IL and IR, +the measures are added to the values previously passed to the macro. +Hence, if you wish to change just one of the values, you must +give an argument of zero to the other. +

+A word of advice: If you need to manipulate left and +right indents separately, use a combination of IL +and IR instead of IB. You'll +save yourself a lot of grief. +

+A minus sign may be prepended to the arguments to subtract from their +current values. The +\w +inline esacpe +may be used to specify text-dependent measures, in which case +no unit of measure is required. For example, +

+

+	.IB \w'margaraine' \w'jello'
+
+ +left indents text by the width of the word "margarine" +and right indents by the width of "jello". +

+Like IL and IR, IB +with no argument indents by its last active values. See the +brief explanation of how mom handles indents +for more details. +

+NOTE: Calling a tab (with +TAB) +automatically cancels any active indents. +

+ADDITIONAL NOTE: Invoking IB +automtically turns off IL and +IR. +
+ + + +


+

Temporary (left) indent

+
+Macro: TI [ <measure> ] +
+*The optional argument requires a unit of measure + +

+A temporary indent is one that applies only to the first line of +text that comes after it. It's chief use is indenting the first +line of paragraphs. (Mom's +PP +macro, for example, uses a temporary indent.) +

+The first time you invoke TI, you must give it +a measure. If you want to indent the first line of a +paragraph by, say, 2 +ems, +do +

+

+	.TI 2m
+
+ +Subsequent invocations of TI do not require you +to supply a measure; mom keeps track of the +last measure you gave it. +

+Because temporary indents are temporary, there's no need to turn +them off. +

+IMPORTANT: Unlike IL, IR and +IB, measures given to TI +are NOT additive. In the following example, the second .TI +2P is exactly 2 picas. +

+

+	.TI 1P
+	The beginning of a paragraph...
+	.TI 2P
+	The beginning of another paragraph...
+
+ + + +
+

Hanging indent

+
+Macro: HI [ <measure> ] +
+*The optional argument requires a unit of measure + +

+A hanging indent looks like this: +

+

+	The thousand injuries of Fortunato I had borne as best I
+	    could, but when he ventured upon insult, I vowed
+	    revenge.  You who so well know the nature of my soul
+	    will not suppose, however, that I gave utterance to a
+	    threat, at length I would be avenged...
+
+ +The first line of text "hangs" outside the left +margin. +

+In order to use hanging indents, you must first have a left indent +active (set with either +IL +or +IB). +Mom will not hang text outside the left margin set with +L_MARGIN +or outside the left margin of a tab. +

+The first time you invoke HI, you must give it +a measure. If you want the first line of a paragraph to hang by, +say, 1 pica, do +

+

+	.IL 1P
+	.HI 1P
+
+ +Subsequent invocations of HI do not require you +to supply a measure; mom keeps track of the +last measure you gave it. +

+Generally speaking, you should invoke HI immediately +prior to the line you want hung (i.e. without any intervening +control lines). +And because hanging indents affect only one line, there's no need to turn +them off. + +

A recipe for numbered lists

+

+A common use for hanging indents is setting numbered lists. +Consider the following example: +

+

+	.PAGE 8.5i 11i 1i 1i 1i 1i
+	.FAMILY  T
+	.FT      R
+	.PT_SIZE 12
+	.LS      14
+	.JUSTIFY
+	.KERN
+	.SS 0
+	.IL \w'\0\0.'    \"Indent left by 2 figure spaces and a period
+	.HI \w'\0\0.'    \"Hang first line of text back by 2 figure spaces and a period
+	1.\0The most important point to be considered is whether the
+	answer to the meaning of life, the universe, and everything
+	really is 42.  We have no-one's word on the subject except
+	Mr. Adams'.
+	.HI
+	2.\0If the answer to the meaning of life, the universe,
+	and everything is indeed 42, what impact does this have on
+	the politics of representation?  42 is, after all not a
+	prime number.  Are we to infer that prime numbers don't
+	deserve equal rights and equal access in the universe?
+	.HI
+	3.\0If 42 is deemed non-exclusionary, how do we present it
+	as the answer and, at the same time, forestall debate on its
+	exclusionary implications?
+
+ +First, we invoke a left indent with a measure equal to the width +of 2 +figures spaces +plus a period (using the +\w +inline escape). At this point, the left indent is active; text +afterward would normally be indented. However, we invoke a hanging +indent of exactly the same width, which hangs the first line (and +first line only!) to the left of the indent by the same distance +(in this case, that means "out to the left margin"). +Because we begin the first line with a number, a period, and a +figure space, the actual text ("The most important point...") +starts at exactly the same spot as the indented lines that +follow. +

+Notice that subsequent invocations of HI without a +measure produce exactly the same effect. +

+Paste the example above into a file and preview it with groff -mom -X +<filename> to see hanging indents in action. +

+IMPORTANT: Unlike IL, IR and +IB, measures given to HI +are NOT additive. Each time you pass a measure to +HI, the measure is treated literally. +
+ + + +


+

Quitting indents

+
+Macro: IQ  [ CLEAR ]  (quit any/all indents -- see *IMPORTANT NOTE) +
+Macro: ILX [ CLEAR ]  (exit Indent Left) +
+Macro: IRX [ CLEAR ]  (exit Indent Right) +
+Macro: IBX [ CLEAR ]  (exit Indent Both) + +

+*IMPORTANT NOTE: +
+    Formerly, the macro for quitting all indents was +.IX. This usage is now deprecated, in favour +of .IQ. .IX will +continue to behave as before, but mom will +issue a warning to stderr indicating that you should update your +documents. +
+    As a consequence of this change,
+ILX, IRX and IBX may +now also be invoked as ILQ, IRQ and +IBQ. Both forms are acceptable. +

+Without an argument, the macros to quit indents merely restore your +original left margin and line length. The measures stored in the +indent macros themselves are saved so you can call them again without +having to supply a measure. +

+If you pass these macros the optional argument CLEAR, +they not only restore your original left margin and line length, +but also clear any values associated with a particular indent style. +The next time you need an indent of the same style, you have to supply +a measure again. +

+IQ CLEAR, as you'd suspect, quits and clears +the values for all indent styles at once. + +

+


+Next   +Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/groff/contrib/mom/momdoc/using.html b/contrib/groff/contrib/mom/momdoc/using.html new file mode 100644 index 0000000..327e86b --- /dev/null +++ b/contrib/groff/contrib/mom/momdoc/using.html @@ -0,0 +1,223 @@ + + + +Using mom + + + + + +Next   +Prev   +Back to Table of Contents + + + +

USING MOM

+
+ +Introduction +
+Inputting macros +
+Invoking groff +
+Previewing documents +
+
+

Introduction

+ +As explained in the section +What is mom?, +mom can be used in two ways: for straight typesetting +or for document processing. The difference between the two is +that in straight typesetting, every macro is a literal +typesetting instruction that determines precisely how text +following it will look. Document processing, on the other hand, +uses markup "tags" (e.g. .PP for +paragraphs, .HEAD for heads, .FOOTNOTE +for footnotes, etc.) that make a lot of typesetting decisions +automatically. +

+You tell mom that you want to use the document +processing macros with the +START +macro, explained below. After START, +mom determines the appearance of text following +the markup tags automatically, although you, the user, can easily +change how mom interprets the tags. This gives you +nearly complete control over the look and feel of your documents. +In addition, the typesetting macros, in combination with document +processing, let you meet all sorts of typesetting needs that just +can't be covered by "one macro fits all" markup tags. + + +

How to input mom's macros

+ + +Regardless of which way you use mom, the +following apply. +
+
    +
  1. You need a good text editor for inputting + mom files. +

    + I cannot recommend highly enough that you use an + editor that lets you write syntax highlighting + rules for mom's macros and + inline escapes. + I use the vi clone called elvis, and find it a pure + joy in this regard. Simply colorizing macros and + inlines to half-intensity can be enough to make text stand + out clearly from formattting commands. +

  2. All mom's macros begin with a period + (dot) and must be entered in upper case (capital) + letters. +
  3. Macro + arguments + are separated from the macro itself by spaces. Multiple + arguments to the same macro are separated from each + other by spaces. Any number of spaces may be used. All + arguments to a macro must appear on the same line as the + macro. +
  4. Any argument (except a + string argument) + that is not a digit must be entered in upper case + (capital) letters. +
  5. Any argument that requires a plus or minus sign must + have the plus or minus sign prepended to the argument + with no intervening space (e.g. +2, -4). +
  6. Any argument that requires a + unit of measure + must have the unit appended directly to the argument, + with no intervening space (e.g. 4P, .5i, 2v). +
  7. String arguments, + in the sense that the term is used in this manual, must + be surrounded by double-quotes ("text of + string"). Multiple string arguments are separated + from each other by spaces (each argument surrounded by + double-quotes, of course). +
  8. If a string argument, as entered in your text editor, + becomes uncomfortably long (i.e. runs longer than the + visible portion of your screen or window), you may break + it into two or more lines by placing the backslash + character (\) at the ends of lines to break + them up, like this: +

    +

    +	.SUBTITLE "An In-Depth Consideration of the \
    +	Implications of Forty-Two as the Meaning of Life, \
    +	The Universe, and Everything"
    +	
    +
+ +It's important that formatted documents be easy to read/interpret +when you're looking at them in a text editor. One way to achieve +this is to group macros that serve a similar purpose together, and +separate them from other groups of macros with a blank comment line. +In groff, that's done with \# on a line by itself. +Consider the following, which is a template for starting the +chapter of a book. +

+

+	.TITLE   "My Pulizter Novel"
+	.AUTHOR  "Joe Blow"
+	.CHAPTER  1
+	\#
+	.DOCTYPE    CHAPTER
+	.PRINTSTYPE TYPESET
+	\#
+	.FAM     P
+	.PT_SIZE 10
+	.LS      12
+	\#
+	.START
+
+ + +

Printing -- invoking groff with mom

+
+ +After you've finished your document, naturally you will want to +print it. This involves invoking groff from the command line. +In all likelihood, you already know how to do this, but in case +you don't, here are two common ways to do it. +

+

+	groff -mom -l <filename>
+	groff -mom <filename> | lpr
+
+ +In the first, the -l option to groff tells +groff to send the output to your printer. In the second, you're +doing the same thing, except you're telling groff to pipe the +output to your printer. Basically, they're the same thing. The +only advantage to the second is that your system may be set up +to use something other than lpr as your print +command, in which case, you can replace lpr +with whatever is appropriate to your box. +

+Sadly, it is well beyond the scope of this manual to tell you +how to set up a printing system. See the README file for +minimum requirements to run groff with mom. +

+NOTE FOR ADVANCED USERS: I've sporadically had groff +choke on perfectly innocent sourced files within mom +documents. You'll know you have this problem when groff complains that +it can't find the sourced file even when you can plainly see that the +file exists, and that you've given .so the right path and +name. Should this happen, pass groff the -U (unsafe mode) +option along with the other options you require. Theoretically, you +only need -U with .open, .opena, .pso, .sy, +and .pi, however reality seems, at times, to dictate +otherwise. + + +

How to preview documents

+ + +Other than printing out hard copy, there are two well-established +methods for previewing your work. Both assume you have a working +X server. +

+Groff itself comes with a quick and dirty previewer called +gxditview. Invoke it with +

+

+	groff -X -mom <filename>
+
+ +It's not particularly pretty, doesn't have many navigation +options, requires a lot of work if you want to use other than +the "standard" groff PostScript fonts, and occasionally +has difficulty accurately reproducing some of +mom's macro effects +(smartquotes +and +leaders +come to mind). What it does have going for it is that it's fast and +doesn't gobble up system resources. +

+A surer way to preview documents is with gv +(ghostview). This involves processing documents with groff, +directing the output to a temporary (PostScript) file, then opening +the temporary file in gv. While that may sound +like a lot of work, I've set up my editor (elvis) to do it for me. +Whenever I'm working on a document that needs previewing/checking, +I fire up gv with the "Watch File" +option turned on. To look at the file, I tell elvis to process +it (with groff) and send it to a temporary file (groff +-mom filename > filename.ps), then open the file inside +gv. Ever after, when I want to look at any changes +I make, I simply tell elvis to work his magic again. The Watch File +option in gv registers that the file has changed, +and automatically loads the new version. Voilà! -- instant previewing. + +

+


+Next   +Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/groff/contrib/mom/om.tmac b/contrib/groff/contrib/mom/om.tmac new file mode 100644 index 0000000..6862c82 --- /dev/null +++ b/contrib/groff/contrib/mom/om.tmac @@ -0,0 +1,9265 @@ +.\" om.tmac +.\" +.\" Mom -- a typesetting/document-processing macro set for groff. +.\" +.\" Copyright (C) 2002 Free Software Foundation, Inc. +.\" Written by Peter Schaffter (df191@ncf.ca) +.\" +.\" This file is part of groff. +.\" +.\" groff is free software; you can redistribute it and/or modify it under +.\" the terms of the GNU General Public License as published by the Free +.\" Software Foundation; either version 2, or (at your option) any later +.\" version. +.\" +.\" groff is distributed in the hope that it will be useful, but WITHOUT ANY +.\" WARRANTY; without even the implied warranty of MERCHANTABILITY or +.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +.\" for more details. +.\" +.\" You should have received a copy of the GNU General Public License along +.\" with groff; see the file COPYING. If not, write to the Free Software +.\" Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +.\" +. +. +\# Version 1.1.4 +\# ------------- +\# +.if (\n[.x]\n[.y] < 118) \ +. ab You need GNU troff version 1.18 or higher to run this version of mom! +\# +\# Inasmuch as possible, macros that turn a feature on or off follow +\# a similar style. Invoking the macro without an argument turns +\# the feature on. Invoking it with any other argument turns it off. +\# Use of the argument OFF is recommended, but not required; users +\# may find other conventions preferable (e.g. NO, X, END, QUIT, etc.). +\# +\# "" in the description of arguments that can be passed +\# to a macro means that any argument turns the feature off. +\# +\# ==================================================================== +\# +\# TYPESETTING MACROS, STRINGS, AND ALIASES +\# ======================================== +\# +\# +++ALIASES+++ +\# +.als ALIAS als \"Alias .als as ALIAS +.als ALIASN aln \"Alias .aln (number registers) as ALIASN +\# +.ALIAS MAC de +.ALIAS BR br +.ALIAS SPACE sp +.ALIAS SP sp +.ALIAS PAGELENGTH pl +.ALIAS NEWPAGE bp +.ALIAS SPREAD brp +.ALIAS STRING ds +\# +\# ALIASES FOR NUMBER REGISTERS +\# ---------------------------- +\# +.ALIASN #PT_SIZE .ps \"fractional point size in units +.ALIASN #DIVER_DEPTH dn \"diversion depth +.ALIASN #DIVER_WIDTH dl \"diversion width +.ALIASN #TRAP_DISTANCE .t \"distance to next trap +.ALIASN #LEAD .v \"line space (.vs, not .ls) +.ALIASN #PAGE_LENGTH .p \"page length +.ALIASN #NUM_ARGS .$ \"number of arguments passed to a macro +.ALIASN #INDENT .i \"value of current indent +\# +\# ==================================================================== +\# +\# MISCELLANEOUS +\# ============= +.cflags 4 /\(en +\# +\# ==================================================================== +\# +\# END MACRO FOR LETTERS +\# --------------------- +\# *Arguments: +\# none +\# *Function: +\# The .em macro executed at the end of letters. Turns footers and +\# pagination off, terminates and outputs diversion CLOSING, indented with +\# the author's name underneath. +\# +.MAC ALL_DONE END +. br +. FOOTERS OFF +. PAGINATION OFF +. if \\n[#DOC_TYPE]=4 \{\ +. br +. if !'\\n(.z'' \{ .di \} +. IQ CLEAR +. TQ +. TAB_SET 1 \\n[#DOC_L_LENGTH]u/2u \\n[#DOC_L_LENGTH]u/2u LEFT +. ALD \\n[#DOC_LEAD]u*2u +. TAB 1 +. if \\n[#CLOSING] \{\ +. nf +. CLOSING +. \} +. ALD \\n[#DOC_LEAD]u*3u +. PRINT \\*[$AUTHOR_1] +. \} +.DO_FOOTER +.END +\# +\# +\# ===================================================================== +\# +\# +++PAGE LAYOUT+++ +\# +\# Macros that control the physical layout of the page: paper size +\# and margins. +\# +\# PAGE WIDTH +\# ---------- +\# *Argument: +\# +\# *Function: +\# Stores user supplied page width in register #PAGE_WIDTH. +\# *Notes: +\# #PAGE_WIDTH is used to establish the default LL (and right margin). +\# Requires unit of measure. +\# +.MAC PAGEWIDTH END +. br +. nr #PAGE_WIDTH \\$1 +. if !r#L_MARGIN \{ .L_MARGIN \\n(.o \} +. if !r#R_MARGIN \{ .R_MARGIN 1i \} +.END +\# +\# +\# L_MARGIN +\# -------- +\# *Argument: +\# +\# *Function: +\# Stores user supplied page offset in register #L_MARGIN. +\# Sets .po to user supplied offset. +\# *Notes: +\# Requires unit of measure. +\# +.MAC L_MARGIN END +. br +. nr #L_MARGIN (\\$1) +. po \\n[#L_MARGIN]u +.END +\# +\# +\# R_MARGIN +\# -------- +\# *Argument: +\# +\# *Function: +\# Stores user supplied right margin in register #R_MARGIN. +\# *Notes: +\# This is a pseudo-margin. Right margin is actually a function of +\# line length. The macro calculates line length from the page offset +\# and the value plugged into #R_MARGIN. +\# +\# N.B. -- PAGEWIDTH and L_MARGIN have to be defined before R_MARGIN. +\# +\# Requires unit of measure. +\# +.MAC R_MARGIN END +. br +. nr #R_MARGIN (\\$1) +. ll \\n[#PAGE_WIDTH]u-\\n[#L_MARGIN]u-\\n[#R_MARGIN]u +. ta \\n(.lu +. nr #L_LENGTH \\n(.l +.END +\# +\# +\# T_MARGIN +\# -------- +\# *Argument: +\# +\# *Function: +\# Stores the user supplied top margin in register #T_MARGIN. +\# Advances user supplied depth from the top of the page. +\# *Notes: +\# Requires unit of measure. +\# +.MAC T_MARGIN END +. br +. nr #T_MARGIN (\\$1) +. nr #T_MARGIN_SET 1 +. if !\\n[#DOCS] \{\ +. PRINT \& +. sp |\\n[#T_MARGIN]u-1v +. \} +. wh 0i DO_T_MARGIN +.END +\# +\# +\# B_MARGIN +\# -------- +\# *Argument: +\# +\# *Function: +\# Stores the user supplied bottom margin in register #B_MARGIN. +\# *Notes: +\# Requires unit of measure. +\# +.MAC B_MARGIN END +. br +. nr #B_MARGIN (\\$1) +. wh -\\n[#B_MARGIN]u DO_B_MARGIN +.END +\# +\# +\# PAGE +\# ---- +\# *Arguments: +\# [pagelength [leftmargin [rightmargin [topmargin [bottommargin]]]]] +\# *Function: +\# Page set-up. Collects arguments and passes them to the appropriate +\# macros. +\# *Notes: +\# All arguments after pagewidth are optional, but must appear +\# in the order given above. (User can fill in as much or as +\# little as desired.) +\# +\# All arguments require a unit of measure. +\# +.MAC PAGE END +. br +. PAGEWIDTH \\$1 +. PAGELENGTH \\$2 +. ie '\\$3'' \{ .L_MARGIN \\n(.o \} +. el \{ .L_MARGIN \\$3 \} +. ie '\\$4'' \{ .R_MARGIN 1i \} +. el \{ .R_MARGIN \\$4 \} +. if !'\\$5'' \{ .T_MARGIN \\$5 \} +. if !'\\$6'' \{ .B_MARGIN \\$6 \} +.END +\# +\# ===================================================================== +\# +\# +++PAGE CONTROL+++ +\# +\# Generic macros for breaking pages. +\# +\# DO_T_MARGIN +\# ----------- +\# *Argument: +\# +\# *Function: +\# Plants the top margin (set in .PAGE) at the top of each page. +\# *Notes: +\# The trap is set in .PAGE +\# +.MAC DO_T_MARGIN END +. ev 1 +. sp |\\n[#T_MARGIN]u-1v +. ev +.END +\# +\# +\# DO_B_MARGIN +\# ----------- +\# *Argument: +\# +\# *Function: +\# Plants the bottom margin (set in .PAGE) at the bottom of each page. +\# *Notes: +\# The trap is set in .PAGE. +\# +.MAC DO_B_MARGIN END +.ev 1 +. bp +.ev +.END +\# +\# ===================================================================== +\# +\# +++GENERAL STYLE MACROS+++ +\# +\# Macros that are likely to appear together to define general +\# type style: line length, family, font, point size, and line +\# spacing. +\# +\# LINE LENGTH +\# ----------- +\# *Argument: +\# +\# *Function: +\# Stores user supplied line length in register #L_LENGTH. +\# Sets .ll to #L_LENGTHu +\# *Notes: +\# Requires unit of measure. +\# +.MAC LL END +. nr #L_LENGTH (\\$1) +. nr #USER_SET_L_LENGTH 1 +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +.END +\# +\# +\# FAMILY +\# ------ +\# *Argument: +\# +\# *Function: +\# Stores user supplied font family in string $FAMILY. Sets .fam +\# to $FAMILY. +\# +.MAC FAMILY END +. if \\n[#PRINT_STYLE]=1 \{ .return \} +. if \\n[#IGNORE] \{ .return \} +. ds $FAMILY \\$1 +. fam \\*[$FAMILY] +.END +\# +\# +\# FONT +\# ---- +\# *Argument: +\# R | I | B | BI +\# *Function: +\# Stores user supplied font in $FONT and sets .ft to $FONT. +\# +.MAC FT END +. if \\n[#PRINT_STYLE]=1 \{\ +. ie '\\$1'I' \{\ +. if \\n[#UNDERLINE_ITALIC]=1 \{\ +. UNDERLINE +. return +. \} +. if \\n[#ITALIC_MEANS_ITALIC]=1 \{\ +. ds $FONT \\$1 +. ft \\*[$FONT] +. return +. \} +. \} +. el \{ .UNDERLINE OFF \} +. return +. \} +. ds $FONT \\$1 +. ft \\*[$FONT] +.END +\# +\# +\# POINT SIZE +\# ---------- +\# *Arguments: +\# +\# *Function: +\# Sets point size to user supplied value in scaled points. +\# If #AUTO_LEAD is on, sets .vs to #AUTOLEAD_VALUE+#PT_SIZE. +\# *Notes: +\# Must NOT use a unit of measure. +\# +.MAC PT_SIZE END +. if \\n[#PRINT_STYLE]=1 \{ .return \} +. if \\n[#IGNORE] \{ .return \} +. nr #PT_SIZE_SET 1 +. ps \\$1 +. if \\n[#AUTO_LEAD] \{\ +. ie \\n[#AUTOLEAD_FACTOR] \{ .vs \\n[#PT_SIZE]u*\\n[#AUTOLEAD_VALUE]u/1000u \} +. el \{ .vs \\n[#PT_SIZE]u+\\n[#AUTOLEAD_VALUE]u \} +. \} +. nr #PT_SIZE_IN_UNITS \\n[.ps] +.END +\# +\# +\# LEADING +\# ------- +\# *Argument: +\# +\# *Function: +\# Turns off #AUTO_LEAD if it's on. +\# Sets .vs to user supplied value. +\# *Notes: +\# Does not require unit of measure. LEAD automatically turns off AUTOLEAD. +\# +.MAC LS END +. if \\n[#PRINT_STYLE]=1 \{ .return \} +. if \\n[#IGNORE] \{ .return \} +. nr #LEAD_SET 1 +. if \\n[#AUTO_LEAD] \{\ +. rr #AUTO_LEAD +. rr #AUTOLEAD_FACTOR +. \} +. vs \\$1 +. if \\n[#T_MARGIN_SET]=1 \{\ +. sp |\\n[#T_MARGIN]u-1v +. rr #T_MARGIN_SET +. \} +.END +\# +\# +\# AUTOLEAD +\# -------- +\# *Argument: +\# [FACTOR] +\# *Function: +\# Stores user supplied auto-lead value in register #AUTOLEAD_VALUE. +\# Adds #AUT0LEAD_VALUE to #PT_SIZE when invoked to set leading. +\# All subsequent PT_SIZE requests reset the leading in the same way until +\# AUTOLEAD is turned off. +\# *Notes: +\# With the optional FACTOR argument, the current point size is +\# multiplied by #AUTOLEAD_VALUE instead of the two being added +\# together. +\# +\# When AUTOLEAD is turned off, the leading reverts to the leading value +\# in effect prior to invoking AUTOLEAD. +\# +.MAC AUTOLEAD END +. if \\n[#PRINT_STYLE]=1 \{ .return \} +. if \\n[#IGNORE] \{ .return \} +. nr #AUTO_LEAD 1 +. nr #AUTOLEAD_VALUE (p;\\$1) +. ie \\n[#NUM_ARGS]=2 \{\ +. if '\\$2'FACTOR' \{\ +. nr #AUTOLEAD_FACTOR 1 +. vs \\n[#PT_SIZE]u*\\n[#AUTOLEAD_VALUE]u/1000u +. \} +. \} +. el \{\ +. vs \\n[#PT_SIZE]u+\\n[#AUTOLEAD_VALUE]u +. \} +. if \\n[#T_MARGIN_SET] \{\ +. sp |\\n[#T_MARGIN]u-1v +. rr #T_MARGIN_SET +. \} +.END +\# +\# +\# STRINGS FOR INLINE CONTROL OF GENERAL TYPE STYLE +\# ------------------------------------------------ +.ds ROM \EfR +.ds IT \EfI +.ds BD \EfB +.ds BDI \Ef(BI +.ds PREV \EfP +.ds S \Es +\# +\# ADDITIONAL STRINGS +\# ------------------ +.ds RULE \El'\En(.lu' +\# +\# +\# ===================================================================== +\# +\# +++KERNING+++ +\# +\# AUTOMATIC PAIRWISE KERNING +\# -------------------------- +\# *Arguments: +\# | +\# *Function: +\# Turns automatic pairwise kerning on or off. +\# +.MAC KERN END +. ie '\\$1'' \{\ +. kern +. nr #KERN 1 +. \} +. el \{\ +. kern 0 +. nr #KERN 0 +. \} +.END +\# +\# +\# INLINE KERNING AND HORIZONTAL MOVEMENT +\# -------------------------------------- +\# *Kerning +\# Inline kerning provides a simple method for users to adjust the +\# amount of space between any two letters. It's predicated on a +\# unit of measure "U", which is 1/36 of the current point size as +\# returned by \n[.ps]. E.g., if the current point size is 18, +\# \n[.ps] returns 18000u, therefore U=500u. Since U remains +\# proportional relative to the current point size, the amount +\# of kerning between two letters as expressed in Us remains +\# visually similar regardless of changes in point size. +\# +\# N.B.--the amount of inline kerning supplied by \*[BU#] or +\# \*[FU#] is added to or subtracted from any kerning that already +\# takes place between two characters when automatic kerning is +\# turned on. +\# +\# In groff v. 1.17.2, it was not possible to pass arguments to macros that +\# were executed with inline escapes, nor thence to evaluate conditional +\# expressions. Consequently, each pseudo-escape \[BU#] had to be defined +\# separately with ".char". +\# +\# As of v. 1.18, one can pass arguments to inline strings/macros, +\# hence it is now possible to do \*[BU #] where #, inline, is the desired +\# number of kern units. The original .char definitions have been left in +\# for backward compatibility with documents created prior to mom-1.1.3c. +\# +\# +.nr #KERN_UNIT 36 +.ds BU \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*\\$1u)' +.ds FU \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*\\$1u)' +\# +.ds BU1 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*1u)' +.ds BU2 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*2u)' +.ds BU3 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*3u)' +.ds BU4 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*4u)' +.ds BU5 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*5u)' +.ds BU6 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*6u)' +.ds BU7 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*7u)' +.ds BU8 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*8u)' +.ds BU9 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*9u)' +.ds BU10 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*10u)' +.ds BU11 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*11u)' +.ds BU12 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*12u)' +.ds BU13 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*13u)' +.ds BU14 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*14u)' +.ds BU15 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*15u)' +.ds BU16 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*16u)' +.ds BU17 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*17u)' +.ds BU18 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*18u)' +.ds BU19 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*19u)' +.ds BU20 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*20u)' +.ds BU21 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*21u)' +.ds BU22 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*22u)' +.ds BU23 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*23u)' +.ds BU24 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*24u)' +.ds BU25 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*25u)' +.ds BU26 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*26u)' +.ds BU27 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*27u)' +.ds BU28 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*28u)' +.ds BU29 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*29u)' +.ds BU30 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*30u)' +.ds BU31 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*31u)' +.ds BU32 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*32u)' +.ds BU33 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*33u)' +.ds BU34 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*34u)' +.ds BU35 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*35u)' +.ds BU36 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*36u)' +\# +\# +.ds FU1 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*1u)' +.ds FU2 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*2u)' +.ds FU3 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*3u)' +.ds FU4 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*4u)' +.ds FU5 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*5u)' +.ds FU6 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*6u)' +.ds FU7 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*7u)' +.ds FU8 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*8u)' +.ds FU9 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*9u)' +.ds FU10 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*10u)' +.ds FU11 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*11u)' +.ds FU12 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*12u)' +.ds FU13 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*13u)' +.ds FU14 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*14u)' +.ds FU15 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*15u)' +.ds FU16 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*16u)' +.ds FU17 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*17u)' +.ds FU18 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*18u)' +.ds FU19 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*19u)' +.ds FU20 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*20u)' +.ds FU21 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*21u)' +.ds FU22 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*22u)' +.ds FU23 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*23u)' +.ds FU24 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*24u)' +.ds FU25 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*25u)' +.ds FU26 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*26u)' +.ds FU27 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*27u)' +.ds FU28 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*28u)' +.ds FU29 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*29u)' +.ds FU30 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*30u)' +.ds FU31 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*31u)' +.ds FU32 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*32u)' +.ds FU33 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*33u)' +.ds FU34 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*34u)' +.ds FU35 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*35u)' +.ds FU36 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*36u)' +\# +\# +\# *Horizontal movements +\# BP1...12.75 and FP1...12.75 move backwards or forwards inline by the +\# specified number of points. +\# Left in for backward compatibility with mom-1.1.3c, the preferred +\# methods for inline horizontal movements are now \*[BCK #] and +\# \*[FWD #]. +\# +.ds BCK \h'-\\$1\\$2' +.ds FWD \h'\\$1\\$2' +\# +.ds BP.25 \h'-.25' +.ds BP.5 \h'-.5' +.ds BP.75 \h'-.75' +.ds BP1 \h'-1p' +.ds BP1.25 \h'-1.25p' +.ds BP1.5 \h'-1.5p' +.ds BP1.75 \h'-1.75p' +.ds BP2 \h'-2p' +.ds BP2.25 \h'-2.25p' +.ds BP2.5 \h'-2.5p' +.ds BP2.75 \h'-2.75p' +.ds BP3 \h'-3p' +.ds BP3.25 \h'-3.25p' +.ds BP3.5 \h'-3.5p' +.ds BP3.75 \h'-3.75p' +.ds BP4 \h'-4p' +.ds BP4.25 \h'-4.25p' +.ds BP4.5 \h'-4.5p' +.ds BP4.75 \h'-4.75p' +.ds BP5 \h'-5p' +.ds BP5.25 \h'-5.25p' +.ds BP5.5 \h'-5.5p' +.ds BP5.75 \h'-5.75p' +.ds BP6 \h'-6p' +.ds BP6.25 \h'-6.25p' +.ds BP6.5 \h'-6.5p' +.ds BP6.75 \h'-6.75p' +.ds BP7 \h'-7p' +.ds BP7.25 \h'-7.25p' +.ds BP7.5 \h'-7.5p' +.ds BP7.75 \h'-7.75p' +.ds BP8 \h'-8p' +.ds BP8.25 \h'-8.25p' +.ds BP8.5 \h'-8.5p' +.ds BP8.75 \h'-8.75p' +.ds BP9 \h'-9p' +.ds BP9.25 \h'-9.25p' +.ds BP9.5 \h'-9.5p' +.ds BP9.75 \h'-9.75p' +.ds BP10 \h'-10p' +.ds BP10.25 \h'-10.25p' +.ds BP10.5 \h'-10.5p' +.ds BP10.75 \h'-10.75p' +.ds BP11 \h'-11p' +.ds BP11.25 \h'-11.25p' +.ds BP11.5 \h'-11.5p' +.ds BP11.75 \h'-11.75p' +.ds BP12 \h'-12p' +.ds BP12.25 \h'-12.25p' +.ds BP12.5 \h'-12.5p' +.ds BP12.75 \h'-12.75p' +\# +.ds FP.25 \h'.25' +.ds FP.5 \h'.5' +.ds FP.75 \h'.75' +.ds FP1 \h'1p' +.ds FP1.25 \h'1.25p' +.ds FP1.5 \h'1.5p' +.ds FP1.75 \h'1.75p' +.ds FP2 \h'2p' +.ds FP2.25 \h'2.25p' +.ds FP2.5 \h'2.5p' +.ds FP2.75 \h'2.75p' +.ds FP3 \h'3p' +.ds FP3.25 \h'3.25p' +.ds FP3.5 \h'3.5p' +.ds FP3.75 \h'3.75p' +.ds FP4 \h'4p' +.ds FP4.25 \h'4.25p' +.ds FP4.5 \h'4.5p' +.ds FP4.75 \h'4.75p' +.ds FP5 \h'5p' +.ds FP5.25 \h'5.25p' +.ds FP5.5 \h'5.5p' +.ds FP5.75 \h'5.75p' +.ds FP6 \h'6p' +.ds FP6.25 \h'6.25p' +.ds FP6.5 \h'6.5p' +.ds FP6.75 \h'6.75p' +.ds FP7 \h'7p' +.ds FP7.25 \h'7.25p' +.ds FP7.5 \h'7.5p' +.ds FP7.75 \h'7.75p' +.ds FP8 \h'8p' +.ds FP8.25 \h'8.25p' +.ds FP8.5 \h'8.5p' +.ds FP8.75 \h'8.75p' +.ds FP9 \h'9p' +.ds FP9.25 \h'9.25p' +.ds FP9.5 \h'9.5p' +.ds FP9.75 \h'9.75p' +.ds FP10 \h'10p' +.ds FP10.25 \h'10.25p' +.ds FP10.5 \h'10.5p' +.ds FP10.75 \h'10.75p' +.ds FP11 \h'11p' +.ds FP11.25 \h'11.25p' +.ds FP11.5 \h'11.5p' +.ds FP11.75 \h'11.75p' +.ds FP12 \h'12p' +.ds FP12.25 \h'12.25p' +.ds FP12.5 \h'12.5p' +.ds FP12.75 \h'12.75p' +\# +\# +\# WHOLE LINE KERNING (RW and EW) +\# ----------------------------- +\# The line kerning macros are special instances of track kerning, +\# used where a complete line needs to be tightened (or relaxed) in +\# order to accomodate or remove one or two more characters +\# than the default justification permits. +\# +\# *Argument: +\# +\# *Function: +\# Invokes .tkf (track kerning) for the current font with +\# 1 as both the upper and lower point size limits, so that +\# the value entered by the user applies regardless of point +\# size. RW ("Reduce Whitespace") reduces the amount of space +\# between all characters by an equal amount. EW ("Extra +\# Whitespace") increases the amount of space. +\# *Notes: +\# Decimal values are acceptable. +\# +\# The groff documentation is a tad confusing about what unit of +\# measure is used in track kerning, only that the width of each +\# character is increased or decreased by the amount(s) passed as +\# arguments to .tkf, and something about linear function of point +\# size. In fact, with the way I've put this macro together, it +\# doesn't matter. All the user needs to know is that a value +\# of one will produce an unacceptably tight or loose line at most +\# text point sizes; therefore, effective use of RW and EW is in +\# the fractional range below 1 (e.g. .25, .5). Given that RW +\# and EW are for massaging type, a certain amount of +\# experimentation and previewing is expected and necessary. +\# +\# \n(.f holds the current font number, which is acceptable to .tkf. +\# +\# RW and EW must be reset to 0 to cancel their effect on +\# subsequent output lines. +\# +.MAC RW END +. if \\n[#BR_AT_LINE_KERN] \{ .br \} +. tkf 1 1 -\\$1 1 -\\$1 +. tkf 2 1 -\\$1 1 -\\$1 +. tkf 3 1 -\\$1 1 -\\$1 +. tkf 4 1 -\\$1 1 -\\$1 +.END +\# +\# +.MAC EW END +. if \\n[#BR_AT_LINE_KERN] \{ .br \} +. tkf 1 1 \\$1 1 \\$1 +. tkf 2 1 \\$1 1 \\$1 +. tkf 3 1 \\$1 1 \\$1 +. tkf 4 1 \\$1 1 \\$1 +.END +\# +\# +\# BREAK AT LINE KERN +\# ------------------ +\# *Arguments: +\# toggle +\# *Function: +\# Enables/disables .br's before .RW and .EW +\# *Notes: +\# Mostly, users will want .br's before any kind of line kerning, but +\# there may be cases where they don't. BR_BEFORE_LINE_KERN is off by +\# default and must be invoked explicitly. +\# +.MAC BR_AT_LINE_KERN END +. ie '\\$1'' \{ .nr #BR_AT_LINE_KERN 1 \} +. el \{ .rr #BR_AT_LINE_KERN \} +.END +\# +\# ===================================================================== +\# +\# +++HYPHENATION+++ +\# +\# AUTO HYPHENATION +\# ---------------- +\# *Arguments: +\# | | DEFAULT +\# or +\# LINES <#> | MARGIN <#> | SPACE <#> +\# *Function: +\# Turns auto hyphenation on or off, resets the hyphenation style +\# to default, or permits the setting of various hyphenation +\# parameters. +\# *Notes: +\# HY ON defaults to .hy 14, i.e. no hyphens after the +\# first two or before the last two characters of a word, and +\# no hyphenation of the last line prior to a trap (e.g., +\# at the bottom of a page). +\# +\# HY DEFAULT resets the hyphenation style to .hy 14 (see +\# above) if that behaviour is desired after changes have been +\# made to LINES, MARGIN, or SPACE. +\# +\# HY LINES <#> sets the number of allowable consecutive hyphenated lines. +\# +\# HY MARGIN <#> sets the amount of space (ipPcm) allowed at the end +\# of a line in QUAD mode before hyphenation is tripped (e.g. if there's +\# only 6 points left, groff won't try to hyphenate the next word). +\# +\# HY SPACE sets the amount of extra interword space (ipPcm) that can +\# be added in JUSTIFY mode to prevent a line from being hyphenated. +\# +.MAC HY END +. ie '\\$1'' \{\ +. hy 14 +. nr #HYPHENATE 1 +. \} +. el \{\ +. if !'\\$1'LINES' \{\ +. nh +. nr #HYPHENATE 0 +. \} +. if !'\\$1'MARGIN' \{\ +. nh +. nr #HYPHENATE 0 +. \} +. if !'\\$1'SPACE' \{\ +. nh +. nr #HYPHENATE 0 +. \} +. if !'\\$1'DEFAULT' \{\ +. nh +. nr #HYPHENATE 0 +. \} +. if '\\$1'LINES' \{ .hlm \\$2 \} +. if '\\$1'MARGIN' \{ .hym \\$2 \} +. if '\\$1'SPACE' \{ .hys \\$2 \} +. if '\\$1'DEFAULT' \{\ +. hlm -1 +. hym 0 +. hys 0 +. \} +. \} +.END +\# +\# +\# HYPHENATION PARAMETERS +\# ---------------------- +\# *Arguments: +\# <# of lines> | | +\# *Function: +\# Allows user to specify .HY LINES, MARGIN, and SPACE with a single command. +\# +.MAC HY_SET END +. nr #HY_SET 1 +. hlm \\$1 +. hym \\$2 +. hys \\$3 +.END +\# +\# ===================================================================== +\# +\# +++VERTICAL SPACING+++ +\# +\# ADVANCE LEAD +\# ------------ +\# *Argument: +\# +\# *Function: +\# Creates or modifies register #ALD. Adds user supplied lead +\# below current baseline. +\# *Notes: +\# Requires unit of measure ipPcmv. +\# +.MAC ALD END +. nr #ALD (\\$1) +. sp \\n[#ALD]u +.END +\# +\# +\# REVERSE LEAD +\# ------------ +\# *Argument: +\# +\# *Function: +\# Creates or modifies register #RLD. Reverses user supplied +\# lead above current baseline. +\# *Notes: +\# Requires unit of measure ipPcmv. +\# +.MAC RLD END +. nr #RLD (\\$1) +. sp -\\n[#RLD]u +.END +\# +\# ALD/RLD STRINGS +\# --------------- +\# The strings \*[ALD.25]...\*[ALD12.75] and their corresponding \*[RLD] +\# forms have been left in for backward compatibility with documents +\# created using mom-1.1.3c or earlier. The prefered methods of advancing +\# and reversing on the page inline are \*[UP #] and \*[DOWN #]. +\# +.ds DOWN \v'\\$1\\$2' +.ds UP \v'-\\$1\\$2' +\# +.ds ALD.25 \v'.25p' +.ds ALD.5 \v'.5p' +.ds ALD.75 \v'.75p' +.ds ALD1 \v'1p' +.ds ALD1.25 \v'1.25p' +.ds ALD1.5 \v'1.5p' +.ds ALD1.75 \v'1.75p' +.ds ALD2 \v'2p' +.ds ALD2.25 \v'2.25p' +.ds ALD2.5 \v'2.5p' +.ds ALD2.75 \v'2.75p' +.ds ALD3 \v'3p' +.ds ALD3.25 \v'3.25p' +.ds ALD3.5 \v'3.5p' +.ds ALD3.75 \v'3.75p' +.ds ALD4 \v'4p' +.ds ALD4.25 \v'4.25p' +.ds ALD4.5 \v'4.5p' +.ds ALD4.75 \v'4.75p' +.ds ALD5 \v'5p' +.ds ALD5.25 \v'5.25p' +.ds ALD5.5 \v'5.5p' +.ds ALD5.75 \v'5.75p' +.ds ALD6 \v'6p' +.ds ALD6.25 \v'6.25p' +.ds ALD6.5 \v'6.5p' +.ds ALD6.75 \v'6.75p' +.ds ALD7 \v'7p' +.ds ALD7.25 \v'7.25p' +.ds ALD7.5 \v'7.5p' +.ds ALD7.75 \v'7.75p' +.ds ALD8 \v'8p' +.ds ALD8.25 \v'8.25p' +.ds ALD8.5 \v'8.5p' +.ds ALD8.75 \v'8.75p' +.ds ALD9 \v'9p' +.ds ALD9.25 \v'9.25p' +.ds ALD9.5 \v'9.5p' +.ds ALD9.75 \v'9.75p' +.ds ALD10 \v'10p' +.ds ALD10.25 \v'10.25p' +.ds ALD10.5 \v'10.5p' +.ds ALD10.75 \v'10.75p' +.ds ALD11 \v'11p' +.ds ALD11.25 \v'11.25p' +.ds ALD11.5 \v'11.5p' +.ds ALD11.75 \v'11.75p' +.ds ALD12 \v'12p' +.ds ALD12.25 \v'12.5p' +.ds ALD12.5 \v'12.5p' +.ds ALD12.75 \v'12.75p' +\# +.ds RLD.25 \v'-.25p' +.ds RLD.5 \v'-.5p' +.ds RLD.75 \v'-.75p' +.ds RLD1 \v'-1p' +.ds RLD1.25 \v'-1.25p' +.ds RLD1.5 \v'-1.5p' +.ds RLD1.75 \v'-1.75p' +.ds RLD2 \v'-2p' +.ds RLD2.25 \v'-2.25p' +.ds RLD2.5 \v'-2.5p' +.ds RLD2.75 \v'-2.75p' +.ds RLD3 \v'-3p' +.ds RLD3.25 \v'-3.25p' +.ds RLD3.5 \v'-3.5p' +.ds RLD3.75 \v'-3.75p' +.ds RLD4 \v'-4p' +.ds RLD4.25 \v'-4.25p' +.ds RLD4.5 \v'-4.5p' +.ds RLD4.75 \v'-4.75p' +.ds RLD5 \v'-5p' +.ds RLD5.25 \v'-5.25p' +.ds RLD5.5 \v'-5.5p' +.ds RLD5.75 \v'-5.75p' +.ds RLD6 \v'-6p' +.ds RLD6.25 \v'-6.25p' +.ds RLD6.5 \v'-6.5p' +.ds RLD6.75 \v'-6.75p' +.ds RLD7 \v'-7p' +.ds RLD7.25 \v'-7.25p' +.ds RLD7.5 \v'-7.5p' +.ds RLD7.75 \v'-7.75p' +.ds RLD8 \v'-8p' +.ds RLD8.25 \v'-8.25p' +.ds RLD8.5 \v'-8.5p' +.ds RLD8.75 \v'-8.75p' +.ds RLD9 \v'-9p' +.ds RLD9.25 \v'-9.25p' +.ds RLD9.5 \v'-9.5p' +.ds RLD9.75 \v'-9.75p' +.ds RLD10 \v'-10p' +.ds RLD10.25 \v'-10.25p' +.ds RLD10.5 \v'-10.5p' +.ds RLD10.75 \v'-10.75p' +.ds RLD11 \v'-11p' +.ds RLD11.25 \v'-11.25p' +.ds RLD11.5 \v'-11.5p' +.ds RLD11.75 \v'-11.75p' +.ds RLD12 \v'-12p' +.ds RLD12.25 \v'-12.5p' +.ds RLD12.5 \v'-12.5p' +.ds RLD12.75 \v'-12.75p' +\# +\# ===================================================================== +\# +\# +++REFINEMENTS+++ +\# +\# AUTOMATIC LIGATURES +\# ------------------- +\# *Arguments: +\# | +\# *Function: +\# Turns automatic ligature generation on or off. +\# *Notes: +\# Ligatures may be supplied manually with \(fi, \(fl, etc. +\# +.MAC LIGATURES END +. ie '\\$1'' \{\ +. lg +. nr #LIGATURES 1 +. \} +. el \{\ +. lg 0 +. nr #LIGATURES 0 +. \} +.END +\# +\# +\# SMARTQUOTES +\# ----------- +\# *Arguments: +\# | +\# *Function: +\# Turns smartquotes on or off. +\# *Notes: +\# The " character is read outside the macro when mom is +\# processed. The strings for open/close ($QUOTE#) are then +\# defined in the macro. \N'34' is the ASCII code for ". If +\# incompatibilities arise, find the code for " that applies +\# to your system and plug in that code instead. +\# +.char " \\*[$QUOTE\\n[#OPEN_CLOSE]]\R'#OPEN_CLOSE (1-\\n[#OPEN_CLOSE])' +\# +.MAC SMARTQUOTES END +. ie '\\$1'' \{\ +. nr #OPEN_CLOSE 0 +. ds $QUOTE0 `` +. ds $QUOTE1 '' +. nr #SMART_QUOTES 1 +. \} +. el \{\ +. ds $QUOTE0 \\N'34' +. ds $QUOTE1 \\N'34' +. nr #SMART_QUOTES 0 +. \} +.END +\# +.ds FOOT \(fm +.ds INCH \(fm\(fm +\# +\# ===================================================================== +\# +\# +++LINE BREAKS+++ +\# +\# NO-SPACE BREAK +\# -------------- +\# *Argument: +\# +\# *Function: +\# Breaks a line without advancing. +\# *Notes: +\# EL is the mnemonic used on older, dedicated typesetting machines +\# to indicate "process the line, then return to the left margin +\# without advancing the galley medium." It stands for End Line. +\# +\# Sadly, EL is only a fake. It will work in all instances EXCEPT +\# when the line to be EL'd is the last line before a footer trap. +\# Use TRAP OFF/TRAP to circumvent this. +\# +.MAC EL END +. br +. sp -1v +.END +\# +\# ===================================================================== +\# +\# +++FILLING/QUADDING/JUSTIFYING+++ +\# +\# JUSTIFY +\# ------- +\# *Argument: +\# +\# *Function: +\# Turns fill on and sets .ad to b. +\# *Notes: +\# Justifies text left and right. +\# +.MAC JUSTIFY END +. if \\n[#TAB_ACTIVE]=0 \{\ +. nr #QUAD 1 +. ds $RESTORE_QUAD_VALUE \\*[$QUAD_VALUE] +. \} +' ce 0 +. QUAD J +. if \\n[#PRINT_STYLE]=1 \{ .QUAD L \} +. nr #FILL 0 +.END +\# +\# +\# QUAD +\# ---- +\# *Arguments: +\# L | LEFT | R | RIGHT | C | CENTER/CENTRE +\# *Function: +\# Turns fill on and sets .ad to l, r, or c. +\# *Notes: +\# Terminology is a problem here. Some people call quad left +\# left justified, flush left, or flush left/rag right (and the +\# reverse for quad right). Quad center is sometimes called rag +\# both. For our purposes, all "quad" modes mean that groff fill +\# mode is enabled. +\# +.MAC QUAD END +. ds $QUAD_VALUE \\$1 +. if \\n[#TAB_ACTIVE]=0 \{\ +. nr #QUAD 1 +. ds $RESTORE_QUAD_VALUE \\*[$QUAD_VALUE] +. \} +' ce 0 +' fi +. if '\\*[$QUAD_VALUE]'L' \{ .ad l \} +. if '\\*[$QUAD_VALUE]'LEFT' \{ .ad l \} +. if '\\*[$QUAD_VALUE]'R' \{ .ad r \} +. if '\\*[$QUAD_VALUE]'RIGHT' \{ .ad r \} +. if '\\*[$QUAD_VALUE]'C' \{ .ad c \} +. if '\\*[$QUAD_VALUE]'CENTER' \{ .ad c \} +. if '\\*[$QUAD_VALUE]'CENTRE' \{ .ad c \} +. if '\\*[$QUAD_VALUE]'J' \{ .ad b \} +. if '\\*[$QUAD_VALUE]'JUSTIFY' \{ .ad b \} +. nr #FILL 0 +.END +\# +\# +\# LEFT, RIGHT, AND CENTER +\# ----------------------- +\# The purpose of these macros is to allow the user to enter lines +\# of text that will be quadded LRC *without* the user having to +\# enter .BR or .br between lines. For the sake of consistency, +\# all three appear to behave similarly (from the point of view of the user), +\# although the underlying primitives don't. For this reason, LEFT, +\# RIGHT, and CENTER must be followed by .QUAD [L R C J] or .JUSTIFY +\# to restore text to groff fill mode. +\# +\# LEFT +\# ---- +\# *Argument: +\# +\# *Function: +\# Turns fill mode off. Allows user to quad lines left without +\# requiring the .BR or .br macro. +\# *Notes: +\# LEFT simply turns fill off. Lines that exceed the current LL will +\# not be broken, simply continued (indefinitely) until a return is +\# encountered. Note that this behaviour differs from the RIGHT and +\# CENTER macros. +\# +.MAC LEFT END +. if \\n[#TAB_ACTIVE]=0 \{\ +. rr #QUAD +. ds $RESTORE_QUAD_VALUE LEFT +. \} +. ce 0 +. nf +. nr #FILL 1 +.END +\# +\# +\# RIGHT +\# ----- +\# *Argument: +\# +\# *Function: +\# Turns fill on. Allows user to quad lines right without +\# requiring the .BR or .br macro. +\# *Notes: +\# Lines that exceed the current LL will be broken, with the excess +\# text quadded right. +\# +.MAC RIGHT END +. if \\n[#TAB_ACTIVE]=0 \{\ +. rr #QUAD +. ds $RESTORE_QUAD_VALUE RIGHT +. \} +. fi +. rj 100000 +. nr #FILL 1 +.END +\# +\# +\# CENTER +\# ------ +\# *Argument: +\# +\# *Function: +\# Turns fill on. Allows user to center lines without +\# requiring the .BR or .br macro. +\# *Notes: +\# Lines that exceed the current LL will be broken, with the excess +\# text centered. +\# +.MAC CENTER END +. if \\n[#TAB_ACTIVE]=0 \{\ +. ds $RESTORE_QUAD_VALUE CENTER +. \} +. fi +. ce 100000 +. nr #FILL 1 +.END +\# +\# ===================================================================== +\# +\# +++TABS+++ +\# +\# There are two different kinds of tabs available: typesetting tabs +\# and string tabs. +\# +\# Typesetting tabs are set with TAB_SET, which requires a tab number, +\# an indent (offset) from the left margin and a length (optionally +\# with a quad direction and an instruction to fill lines). After tabs +\# are set with TS, they are called with .TAB <#>, where <#> +\# corresponds to the number passed to TAB_SET as a valid tab number. +\# +\# String tabs allow the user to mark off tab positions inline. Tab +\# indents and lengths are calculated from the beginning and end +\# positions of the marks. Up to 19 string tabs may be created, +\# numbered 1-19. Once created, they are called with .TAB <#>, +\# just like typesetting tabs. +\# +\# Setting up string tabs is a two-step procedure. First, the user +\# enters an input line in which s/he wants to mark off string tabs. +\# The beginning of a tab is marked with \*[ST<#>], where <#> is +\# the desired number of the tab. The end of the the tab is marked +\# with \*[ST<#>X]. All ST's must have a matching STX. String tabs +\# may be nested. +\# +\# Next, the user invokes .ST <#> for every string tab defined, and +\# optionally passes quad information to it. That done, string tabs +\# can be called just like typesetting tabs. +\# +\# String tabs don't preview properly with gxditview. Use gv instead. +\# +\# Strings for string tab inlines +\# ------------------------------ +\# +.ds ST1 \Ek[#ST1_OFFSET] +.ds ST2 \Ek[#ST2_OFFSET] +.ds ST3 \Ek[#ST3_OFFSET] +.ds ST4 \Ek[#ST4_OFFSET] +.ds ST5 \Ek[#ST5_OFFSET] +.ds ST6 \Ek[#ST6_OFFSET] +.ds ST7 \Ek[#ST7_OFFSET] +.ds ST8 \Ek[#ST8_OFFSET] +.ds ST9 \Ek[#ST9_OFFSET] +.ds ST10 \Ek[#ST10_OFFSET] +.ds ST11 \Ek[#ST11_OFFSET] +.ds ST12 \Ek[#ST12_OFFSET] +.ds ST13 \Ek[#ST13_OFFSET] +.ds ST14 \Ek[#ST14_OFFSET] +.ds ST15 \Ek[#ST15_OFFSET] +.ds ST16 \Ek[#ST16_OFFSET] +.ds ST17 \Ek[#ST17_OFFSET] +.ds ST18 \Ek[#ST18_OFFSET] +.ds ST19 \Ek[#ST19_OFFSET] +.ds ST1X \Ek[#ST1_MARK] +.ds ST2X \Ek[#ST2_MARK] +.ds ST3X \Ek[#ST3_MARK] +.ds ST4X \Ek[#ST4_MARK] +.ds ST5X \Ek[#ST5_MARK] +.ds ST6X \Ek[#ST6_MARK] +.ds ST7X \Ek[#ST7_MARK] +.ds ST8X \Ek[#ST8_MARK] +.ds ST9X \Ek[#ST9_MARK] +.ds ST10X \Ek[#ST10_MARK] +.ds ST11X \Ek[#ST11_MARK] +.ds ST12X \Ek[#ST12_MARK] +.ds ST13X \Ek[#ST13_MARK] +.ds ST14X \Ek[#ST14_MARK] +.ds ST15X \Ek[#ST15_MARK] +.ds ST16X \Ek[#ST16_MARK] +.ds ST17X \Ek[#ST17_MARK] +.ds ST18X \Ek[#ST18_MARK] +.ds ST19X \Ek[#ST19_MARK] +\# +\# +\# QUAD AND SET STRING TABS +\# ------------------------ +\# *Arguments: +\# L | R | C | J [QUAD] +\# *Function: +\# Creates strings $ST<#>_QUAD_DIR and $ST<#>_FILL, then sets up a +\# tab based on the collected information. +\# *Notes: +\# Like TS, ST invoked without a quad direction will default to LEFT. +\# If lines should be filled and quadded, use the optional argument QUAD. +\# N.B. -- indents *must* be turned off before setting string tabs +\# inside .PAD +\# +.MAC ST END +. ds $ST\\$1_QUAD_DIR \\$2 +. if \\n[#NUM_ARGS]=3 \{\ +. ds $ST\\$1_FILL QUAD +. \} +. nr #ST\\$1_LENGTH \\n[#ST\\$1_MARK]-\\n[#ST\\$1_OFFSET] +. ie \\n[#IN_TAB] \{\ +. TAB_SET \\$1 \\n[#ST\\$1_OFFSET]u+\\n[#ST_OFFSET]u \\n[#ST\\$1_LENGTH]u \\*[$ST\\$1_QUAD_DIR] \\*[$ST\\$1_FILL] +. \} +. el \{\ +. TAB_SET \\$1 \\n[#ST\\$1_OFFSET]u \\n[#ST\\$1_LENGTH]u \\*[$ST\\$1_QUAD_DIR] \\*[$ST\\$1_FILL] +. \} +.END +\# +\# +\# TAB SET +\# ------- +\# *Arguments: +\# <#> ident(ipPcm) length(ipPcm) [L | R | C | J [QUAD]] +\# *Function: +\# Creates macros TAB<#> and TAB <#>, where # is any arbitrary number. +\# TAB# is a typesetting tab (i.e. a tab defined as an indent +\# from the page left offset plus a line length.) +\# *Notes: +\# <#> = arbitrary digit to identify the tab +\# indent = indent from left margin; unit of measure required +\# length = length of tab (unit of measure required; can be +\# \w''u--if more than one word in string, surround +\# with double quotes "\w''" +\# LRCJ = quad for tab (left, right, center, justified) +\# If option QUAD afterwards is not given, quad is line for line +\# (no fill mode), meaning that there's no need for .BR or .br +\# between lines. +\# QUAD = fill tab (so it behaves as if .QUAD LRC or .JUSTIFY +\# had been given). +\# +\# N.B. -- indents *must* be turned off before setting tabs +\# +\# Examples: +\# +\# .TAB_SET 1 2P+6p 12P C +\# +\# means "create a tab numbered 1 that starts 2 picas and 6 points from +\# the left margin, is 12 picas long, and centre each input line." +\# +\# .TAB_SET 1 2P+6P 12P C QUAD +\# +\# means exactly the same thing, except that input lines are joined and +\# the area delimted by the tab filled with centered text. +\# +\# TAB <#> can be called at any time after being set. +\# +\# Tabs are NOT columnar in behaviour. If the text inside a +\# tab runs to several lines, when you call the next tab a break +\# occurs, meaning that the new tab starts one line below the last +\# line in the previous tab. For columnar behaviour, you must +\# use the multi-column macros in addition to tabs. +\# +\# If you want tabs to line up bottom-line to bottom-line (most likely +\# single line tabs), use .TN (provided the tabs are numbered sequentially). +\# Otherwise, you must use .EL then .TAB # if you want them to align. +\# +\# If you want to reset tabs, you must use .TQ before .TAB_SET. +\# +\# Note that indents are turned off automatically whenever a new +\# tab is called with TAB #. +\# +\# Tabs themselves are user-invoked using the TAB macro with a numeric +\# argument, e.g. TAB 1. +\# +\# Generally, in order not to get confused, it's a good idea +\# to make sure all indents are off before setting tabs. +\# +.MAC TAB_SET END +. br +. nr #TAB_NUMBER \\$1 +. ds $CURRENT_TAB \\n[#TAB_NUMBER] +. nr #TAB_OFFSET (\\$2) +. nr #TAB_LENGTH (\\$3) +. MAC TAB\\n[#TAB_NUMBER] DONE \"Define TAB macro +. br +. in 0 +. nr #TAB_ACTIVE 1 +. nr #CURRENT_TAB \\n[#TAB_NUMBER] +. po \\n[#L_MARGIN]u+\\n[#TAB_OFFSET]u +. nr #ST_OFFSET \\n[#TAB_OFFSET] +. nr #TAB_OFFSET\\*[$CURRENT_TAB] \\n[#TAB_OFFSET] +. ll \\n[#TAB_LENGTH]u +. ta \En(.lu +. ie '\\$5'QUAD' \{\ +. if '\\$4'L' \{ .QUAD L \} +. if '\\$4'R' \{ .QUAD R \} +. if '\\$4'C' \{ .QUAD C \} +. if '\\$4'J' \{ .JUSTIFY \} +. \} +. el \{\ +. if '\\$4'' \{ .LEFT \} +. if '\\$4'L' \{ .LEFT \} +. if '\\$4'R' \{ .RIGHT \} +. if '\\$4'C' \{ .CENTER \} +. if '\\$4'J' \{ .JUSTIFY \} +. \} +.DONE +. rr #TAB_ACTIVE +.END +\# +\# +\# TAB +\# --- +\# *Arguments: +\# +\# *Function: +\# Moves to tab number passed as an argument. +\# +.MAC TAB END +. ds $TAB_NUMBER \\$1 +. TAB\\*[$TAB_NUMBER] +. nr #IN_TAB 1 +. po \\n[#L_MARGIN]u+\\n[#TAB_OFFSET\\*[$TAB_NUMBER]]u +.END +\# +\# +\# TAB NEXT +\# -------- +\# *Argument: +\# +\# *Function: +\# Automagically moves to TAB#+1 on the same line as the last +\# line of the previous tab. +\# *Notes: +\# If the tabs being aligned fall too close to the footer +\# trap, the line entered after .TN will appear on the next page. +\# +.MAC TN END +. br +. nr #NEXT_TAB \\n[#CURRENT_TAB]+1 +. TAB\\n[#NEXT_TAB] +. sp -1v +.END +\# +\# +\# TAB QUIT +\# -------- +\# *Argument: +\# +\# *Function: +\# Sets #TAB_ACTIVE to "0" (off). +\# Resets left margin to value in effect prior to tabs. +\# Resets line length to value in effect prior to tabs. +\# Checks #QUAD to see if we were in flush or quad mode +\# prior to tabs (0=off, 1=on). +\# Resets QUAD [ L|R|C ], LEFT, RIGHT, CENTER, or JUSTIFY +\# in effect prior to tabs. +\# *Notes: +\# TQ *must* come before setting any new tabs if you want the +\# tabs' indents measured from page left. Otherwise, the tabs' +\# indents are measured from the left margin of the tab you're +\# currently in. +\# +.MAC TQ END +. br +. rr #TAB_ACTIVE +. rr #IN_TAB +. po \\n[#L_MARGIN]u +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +. ie \\n[#QUAD] \{\ +. ie '\\*[$RESTORE_QUAD_VALUE]'J' \{ .JUSTIFY \} +. el \{ .QUAD \\*[$RESTORE_QUAD_VALUE] \} +. \} +. el \{\ +. if '\\*[$RESTORE_QUAD_VALUE]'LEFT' \{ .LEFT \} +. if '\\*[$RESTORE_QUAD_VALUE]'RIGHT' \{ .RIGHT \} +. if '\\*[$RESTORE_QUAD_VALUE]'CENTER' \{ .CENTER \} +. \} +.END +\# +\# ===================================================================== +\# +\# +++MISCELLANEOUS USEFUL MACROS AND STRINGS+++ +\# +\# UNDERLINE +\# --------- +\# *Arguments: +\# | +\# *Function: +\# When on, underlines all letters, words, and digits in a passage, +\# ignoring punctuation and spaces. +\# *Notes: +\# Only for use when the font family is COURIER, to simulate +\# typewriter-style underlining of italic passages. +\# +.MAC UNDERLINE END +. ie '\\$1'' \{\ +. nr #UNDERLINE_ON 1 +. char A _A +. char B _B +. char C _C +. char D _D +. char E _E +. char F _F +. char G _G +. char H _H +. char I _I +. char J _J +. char K _K +. char L _L +. char M _M +. char N _N +. char O _O +. char P _P +. char Q _Q +. char R _R +. char S _S +. char T _T +. char U _U +. char V _V +. char W _W +. char X _X +. char Y _Y +. char Z _Z +. char \[`A] _\[`A] +. char \[^A] _\[^A] +. char \['A] _\['A] +. char \[:A] _\[:A] +. char \[oA] _\[oA] +. char \[~A] _\[~A] +. char \[AE] _\[AE] +. char \[`E] _\[`E] +. char \[^E] _\[^E] +. char \['E] _\['E] +. char \[:E] _\[:E] +. char \[`I] _\[`I] +. char \[^I] _\[^I] +. char \['I] _\['I] +. char \[:I] _\[:I] +. char \[`O] _\[`O] +. char \[^O] _\[^O] +. char \['O] _\['O] +. char \[:O] _\[:O] +. char \[~O] _\[~O] +. char \[/O] _\[/O] +. char \[`U] _\[`U] +. char \[^U] _\[^U] +. char \['U] _\['U] +. char \[:U] _\[:U] +. char \[,C] _\[,C] +. char \[-D] _\[-D] +. char \[~N] _\[~N] +. char \[TP] _\[TP] +. char \['Y] _\['Y] +. char \[:Y] _\[:Y] +. char a _a +. char b _b +. char c _c +. char d _d +. char e _e +. char f _f +. char g _g +. char h _h +. char i _i +. char j _j +. char k _k +. char l _l +. char m _m +. char n _n +. char o _o +. char p _p +. char q _q +. char r _r +. char s _s +. char t _t +. char u _u +. char v _v +. char w _w +. char x _x +. char y _y +. char z _z +. char \[`a] _\[`a] +. char \[^a] _\[^a] +. char \['a] _\['a] +. char \[:a] _\[:a] +. char \[oa] _\[oa] +. char \[~a] _\[~a] +. char \[ae] _\[ae] +. char \[`e] _\[`e] +. char \[^e] _\[^e] +. char \['e] _\['e] +. char \[:e] _\[:e] +. char \[`i] _\[`i] +. char \[^i] _\[^i] +. char \['i] _\['i] +. char \[:i] _\[:i] +. char \[`o] _\[`o] +. char \[^o] _\[^o] +. char \['o] _\['o] +. char \[:o] _\[:o] +. char \[~o] _\[~o] +. char \[/o] _\[/o] +. char \[`u] _\[`u] +. char \[^u] _\[^u] +. char \['u] _\['u] +. char \[:u] _\[:u] +. char \[,c] _\[,c] +. char \[Sd] _\[Sd] +. char \[~n] _\[~n] +. char \[Tp] _\[Tp] +. char \['y] _\['y] +. char \[:y] _\[:y] +. char \[ss] _\[ss] +. char ' _' +. char 1 _1 +. char 2 _2 +. char 3 _3 +. char 4 _4 +. char 5 _5 +. char 6 _6 +. char 7 _7 +. char 8 _8 +. char 9 _9 +. char 0 _0 +. \} +. el \{\ +. nr #UNDERLINE_ON 0 +. rchar A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \ + a b c d e f g h i j k l m n o p q r s t u v w x y z \ + \[`A] \[^A] \['A] \[:A] \[oA] \[~A] \[AE] \[`E] \[^E] \['E] \[:E] \ + \[`I] \[^I] \['I] \[:I] \[`O] \[^O] \['O] \[:O] \[~O] \[/O] \[`U] \ + \[^U] \['U] \[:U] \[,C] \[-D] \[~N] \[TP] \['Y] \[:Y] \ + \[`a] \[^a] \['a] \[:a] \[oa] \[~a] \[ae] \[`e] \[^e] \['e] \[:e] \[`i] \ + \[^i] \['i] \[:i] \[`o] \[^o] \['o] \[:o] \[~o] \[/o] \[`u] \[^u] \['u] \ + \[:u] \[,c] \[Sd] \[~n] \[Tp] \['y] \[:y] \[ss] \ + 1 2 3 4 5 6 7 8 9 0 +. \} +.END +\# +\# +\# UL/ULX +\# ------ +\# *Arguments: +\# +\# *Function: +\# Underscores all letters, words, and digits in a passage, +\# ignoring punctuation and spaces. +\# *Notes: +\# Intended to be called with inline escapes \*[UL] (underline +\# on) and \*[ULX] (underline off). Only works when the font family +\# is COURIER, to simulate typewriter-style underlining of italic +\# passages. +\# +.MAC UL END +\c\R'#UNDERLINE_ON 1' +. char A _A +. char B _B +. char C _C +. char D _D +. char E _E +. char F _F +. char G _G +. char H _H +. char I _I +. char J _J +. char K _K +. char L _L +. char M _M +. char N _N +. char O _O +. char P _P +. char Q _Q +. char R _R +. char S _S +. char T _T +. char U _U +. char V _V +. char W _W +. char X _X +. char Y _Y +. char Z _Z +. char \[`A] _\[`A] +. char \[^A] _\[^A] +. char \['A] _\['A] +. char \[:A] _\[:A] +. char \[oA] _\[oA] +. char \[~A] _\[~A] +. char \[AE] _\[AE] +. char \[`E] _\[`E] +. char \[^E] _\[^E] +. char \['E] _\['E] +. char \[:E] _\[:E] +. char \[`I] _\[`I] +. char \[^I] _\[^I] +. char \['I] _\['I] +. char \[:I] _\[:I] +. char \[`O] _\[`O] +. char \[^O] _\[^O] +. char \['O] _\['O] +. char \[:O] _\[:O] +. char \[~O] _\[~O] +. char \[/O] _\[/O] +. char \[`U] _\[`U] +. char \[^U] _\[^U] +. char \['U] _\['U] +. char \[:U] _\[:U] +. char \[,C] _\[,C] +. char \[-D] _\[-D] +. char \[~N] _\[~N] +. char \[TP] _\[TP] +. char \['Y] _\['Y] +. char \[:Y] _\[:Y] +. char a _a +. char b _b +. char c _c +. char d _d +. char e _e +. char f _f +. char g _g +. char h _h +. char i _i +. char j _j +. char k _k +. char l _l +. char m _m +. char n _n +. char o _o +. char p _p +. char q _q +. char r _r +. char s _s +. char t _t +. char u _u +. char v _v +. char w _w +. char x _x +. char y _y +. char z _z +. char \[`a] _\[`a] +. char \[^a] _\[^a] +. char \['a] _\['a] +. char \[:a] _\[:a] +. char \[oa] _\[oa] +. char \[~a] _\[~a] +. char \[ae] _\[ae] +. char \[`e] _\[`e] +. char \[^e] _\[^e] +. char \['e] _\['e] +. char \[:e] _\[:e] +. char \[`i] _\[`i] +. char \[^i] _\[^i] +. char \['i] _\['i] +. char \[:i] _\[:i] +. char \[`o] _\[`o] +. char \[^o] _\[^o] +. char \['o] _\['o] +. char \[:o] _\[:o] +. char \[~o] _\[~o] +. char \[/o] _\[/o] +. char \[`u] _\[`u] +. char \[^u] _\[^u] +. char \['u] _\['u] +. char \[:u] _\[:u] +. char \[,c] _\[,c] +. char \[Sd] _\[Sd] +. char \[~n] _\[~n] +. char \[Tp] _\[Tp] +. char \['y] _\['y] +. char \[:y] _\[:y] +. char \[ss] _\[ss] +. char ' _' +. char 1 _1 +. char 2 _2 +. char 3 _3 +. char 4 _4 +. char 5 _5 +. char 6 _6 +. char 7 _7 +. char 8 _8 +. char 9 _9 +. char 0 _0 +.END +\# +\# +.MAC ULX END +\c\R'#UNDERLINE_ON 0' +. rchar A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \ + a b c d e f g h i j k l m n o p q r s t u v w x y z \ + \[`A] \[^A] \['A] \[:A] \[oA] \[~A] \[AE] \[`E] \[^E] \['E] \[:E] \ + \[`I] \[^I] \['I] \[:I] \[`O] \[^O] \['O] \[:O] \[~O] \[/O] \[`U] \ + \[^U] \['U] \[:U] \[,C] \[-D] \[~N] \[TP] \['Y] \[:Y] \ + \[`a] \[^a] \['a] \[:a] \[oa] \[~a] \[ae] \[`e] \[^e] \['e] \[:e] \[`i] \ + \[^i] \['i] \[:i] \[`o] \[^o] \['o] \[:o] \[~o] \[/o] \[`u] \[^u] \['u] \ + \[:u] \[,c] \[Sd] \[~n] \[Tp] \['y] \[:y] \[ss] \ + 1 2 3 4 5 6 7 8 9 0 +.END +\# +\# +\# UNDERSCORE +\# ---------- +\# *Arguments: +\# [points below baseline] "text" +\# *Function: +\# Places an underscore 2 points under the string if no lead given, +\# otherwise places underscore under string by user specified amount. +\# *Notes: +\# When using this macro, the string to be underscored must begin +\# with double-quotes ("), regardless of whether it's the sole +\# argument or the second. +\# E.g.: +\# .UNDERSCORE "Text to be underscored +\# or +\# .UNDERSCORE 2p "Text to be underscored +\# +\# All text is underscored (including punctuation and spaces). +\# This is the primary difference between UNDERLINE and UNDERSCORE, +\# aside from the fact the UNDERLINE only works with Courier. +\# +\# UNDERSCORE does not work across line breaks. Each line of +\# text must be entered separately with UNDERSCORE. If the +\# UNDERSCORE begins in the middle of a line and crosses over a +\# break, the portion before the break must be entered in its own +\# UNDERSCORE, as must the portion that comes after the break. +\# +.MAC UNDERSCORE END +. nr #RESTORE_PT_SIZE \\n[#PT_SIZE] +. ie \\n[#NUM_ARGS]=1 \{ \\$1\\s(12\\v'+2p'\\l'|0'\\v'-2p'\\s[\\n[#RESTORE_PT_SIZE]u] \} +. el \{ \\$2\\s(12\\v'+(\\$1)'\\l'|0'\\v'-(\\$1)'\\s[\\n[#RESTORE_PT_SIZE]u] \} +. rr #RESTORE_PT_SIZE +.END +\# +\# +\# DOUBLE UNDERSCORE +\# ----------------- +\# *Arguments: +\# [points below baseline] [points distance between rules] "text" +\# *Function: +\# Same as UNDERSCORE, except it produces a double underscore. The default +\# distance between the rules is 2 points. +\# *Notes: +\# The same double-quote requirement as UNDERSCORE. +\# +.MAC UNDERSCORE2 END +. nr #RESTORE_PT_SIZE \\n[#PT_SIZE] +. if \\n[#NUM_ARGS]=1 \{\ +. PRINT \\$1\\s(12\\v'+2p'\\l'|0'\\v'+2p'\\l'|0'\\v'-4p'\\s[\\n[#RESTORE_PT_SIZE]u] +. \} +. if \\n[#NUM_ARGS]=2 \{\ +. PRINT \\$2\\s(12\\v'+\\$1'\\l'|0'\\v'+2p'\\l'|0'\\v'-(2p+\\$1)'\\s[\\n[#RESTORE_PT_SIZE]u] +. \} +. if \\n[#NUM_ARGS]=3 \{\ +. PRINT \\$3\\s(12\\v'+\\$1'\\l'|0'\\v'+\\$2'\\l'|0'\\v'-(\\$2+\\$1)'\\s[\\n[#RESTORE_PT_SIZE]u] +. \} +. rr #RESTORE_PT_SIZE +.END +\# +\# +\# SUPERSCRIPT INLINES +\# ------------------- +\# *Function: +\# Prints everything after invocation as superscript. +\# *Notes: +\# \*[SUP] and \*[SUPX] turn superscript on and off respectively. +\# If running type is pseudo-condensed/expanded, invoke the superscript +\# strings as \*[CONDSUP] or \*[EXTSUP] and turn off with \*[CONDSUPX] +\# and \*[EXTSUPX] respectively. +\# +.ds SUP \ +\R'#PT_SIZE_IN_UNITS \En[.ps]'\ +\R'#SUP_PT_SIZE \En[#PT_SIZE_IN_UNITS]u*6u/10u'\ +\s[\En[#PT_SIZE_IN_UNITS]u]\v'-.3m'\s[\En[#SUP_PT_SIZE]u] +\# +.ds SUPX \s[\En[#PT_SIZE_IN_UNITS]u]\v'.3m' +\# +.ds CONDSUP \ +\R'#PT_SIZE_IN_UNITS \En[.ps]'\ +\R'#SUP_PT_SIZE \En[#PT_SIZE_IN_UNITS]u*6u/10u'\ +\s[\En[#PT_SIZE_IN_UNITS]u]\v'-.3m'\s[\En[#SUP_PT_SIZE]u]\E*[COND_FOR_SUP] +\# +.ds CONDSUPX \s[\En[#PT_SIZE_IN_UNITS]u]\v'.3m'\E*[COND] +\# +.ds EXTSUP \ +\R'#PT_SIZE_IN_UNITS \En[.ps]'\ +\R'#SUP_PT_SIZE \En[#PT_SIZE_IN_UNITS]u*6u/10u'\ +\s[\En[#PT_SIZE_IN_UNITS]u]\v'-.3m'\s[\En[#SUP_PT_SIZE]u]\E*[EXT_FOR_SUP] +\# +.ds EXTSUPX \s[\En[#PT_SIZE_IN_UNITS]u]\v'.3m'\E*[EXT] +\# +\# +\# SLANT +\# ----- +\# +\# SETSLANT +\# -------- +\# *Arguments: +\# | RESET +\# *Function: +\# Modifies register #DEGREES for use with \*[SLANT], or resets +\# it to the default. Defines string \*[SLANTX] +\# *Notes: +\# \*[SLANT] permits pseudo-italicizing of a font in cases where +\# no italic font exists in a particular family. +\# +\# Default # of degrees is 15. +\# +\# Do not use unit of measure with arg to SETSLANT. +\# +\# It may be necessary to adjust the spacing on either side of +\# [SLANT] and [SLANTX]. +\# +\# In docs, SLANT carries over from para to para. +\# +.nr #DEGREES 15 +.ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]' +.ds SLANTX \ER'#SLANT_ON 0'\ES'0' +\# +.MAC SETSLANT END +. ie '\\$1'RESET' \{\ +. nr #DEGREES 15 +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#UNDERLINE_SLANT] \{ .return \} +. \} +. ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]' +. \} +. el \{\ +. nr #DEGREES \\$1 +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#UNDERLINE_SLANT] \{ .return \} +. \} +. ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]' +. \} +. ds SLANTX \ER'#SLANT_ON 0'\ES'0' +.END +\# +\# +\# BOLDER +\# ------ +\# +\# SETBOLDER +\# --------- +\# *Arguments: +\# | RESET +\# *Function: +\# Modifies register #BOLDER_UNITS for use with \*[BOLDER], or resets +\# it to the default 700 units. +\# *Notes: +\# \*[BOLDER] allows pseudo-emboldening of a font where no bold +\# font exists in a particular family. +\# +\# Default for SETBOLDER is 700 units. Do not use unit of measure +\# with arg to SETBOLDER. +\# +.nr #BOLDER_UNITS 700 +\# +.MAC SETBOLDER END +. if \\n[#IGNORE]=1 \{ .return \} +. ie '\\$1'RESET' \{ .nr #BOLDER_UNITS 700 \} +. el \{ .nr #BOLDER_UNITS \\$1 \} +.END +\# +\# +.MAC BOLDER END +\c +.bd \\n(.f \\n[#BOLDER_UNITS] +.END +\# +\# +.MAC BOLDERX END +\c +.bd \\n(.f +.END +\# +\# +++CONDENSE/EXTEND+++ +\# +\# CONDENSE/EXTEND +\# --------------- +\# *Arguments: +\# +\# *Function: +\# Stores current point size in z's in #PT_SIZE_IN_UNITS, figures out +\# new point size (for character width) from arg, and defines string +\# COND or EXT, which set the type size to the new character width, +\# and sets the height of type to the value stored in CURRENT_PT_SIZE +\# *Notes: +\# CONDENSE_OR_EXTEND is invoked from the aliases +\# CONDENSE and EXTEND. CONDENSE implies <100, EXTEND +\# implies >100. Do not use a percent sign in the argument. +\# +\# There is no default setting for CONDENSE or EXTEND. +\# 80 is a good approximation of condensed type, 120 is okay +\# for extended. +\# +\# The value set by CONDENSE or EXTEND applies to all +\# subsequent \*[COND] or \*[EXT] escapes until a new value is set. +\# +\# \*[COND] or \*[EXT] must be turned off before all changes of point +\# size and reinvoked afterwards (if so desired). This refers to +\# changes of point size via control lines AND with via inlines. +\# +.MAC CONDENSE_OR_EXTEND END +. if '\\$0'CONDENSE' \{\ +. ds $COND_PERCENT \\$1 +. if \\n[#PRINT_STYLE]=1 \{\ +. rm $COND_PERCENT +. ds $COND_PERCENT 100 +. \} +. ds COND \ +\R'#PT_SIZE_IN_UNITS \En[.ps]'\ +\R'#CONDENSE 1'\ +\R'#COND_WIDTH (\En[#PT_SIZE_IN_UNITS]u*\E*[$COND_PERCENT]u)/100'\ +\Es[\En[#COND_WIDTH]u]\EH'\En[#PT_SIZE_IN_UNITS]u' +. ds COND_FOR_SUP \ +\R'#COND_WIDTH (\En[#SUP_PT_SIZE]u*\E*[$COND_PERCENT]u)/100'\ +\Es[\En[#COND_WIDTH]u]\H'\En[#SUP_PT_SIZE]u' +. \} +. if '\\$0'EXTEND' \{\ +. ds $EXT_PERCENT \\$1 +. if \\n[#PRINT_STYLE]=1 \{\ +. rm $EXT_PERCENT +. ds $EXT_PERCENT 100 +. \} +. ds EXT \ +\R'#PT_SIZE_IN_UNITS \En[.ps]'\ +\R'#EXTEND 1'\ +\R'#EXT_WIDTH (\En[#PT_SIZE_IN_UNITS]u*\E*[$EXT_PERCENT]u)/100'\ +\Es[\En[#EXT_WIDTH]u]\EH'\En[#PT_SIZE_IN_UNITS]u' +. ds EXT_FOR_SUP \ +\R'#EXT_WIDTH (\En[#SUP_PT_SIZE]u*\E*[$EXT_PERCENT]u)/100'\ +\Es[\En[#EXT_WIDTH]u]\H'\En[#EXT_PT_SIZE]u' +. \} +.END +\# +.ds CONDX \ER'#CONDENSE 0'\Es0\R'#PT_SIZE_IN_UNITS \En[.ps]'\H'\En[#PT_SIZE_IN_UNITS]u' +.ds EXTX \ER'#EXTEND 0'\Es0\R'#PT_SIZE_IN_UNITS \En[.ps]'\H'\En[#PT_SIZE_IN_UNITS]u' +\# +\# +\# +++PAD LINES+++ (insert space) +\# +\# PAD MARKER +\# ---------- +\# *Arguments: +\# +\# *Function: +\# Defines string $PAD_MARKER, used in PAD +\# *Notes: +\# $PAD_MARKER is normally # (the pound sign). +\# +.MAC PAD_MARKER END +. ds $PAD_MARKER \\$1 +.END +\# +\# +\# PAD +\# --- +\# *Argments: +\# "" +\# *Function: +\# Defines and redefines padding character (default=pound sign unless +\# padding character has been set with PAD_MARKER) several times +\# so that when the string is output at the end of the macro, every # +\# has been converted to an equal-sized amount of padding (blank space) +\# on a line. # is equivalent to CompuGraphic's old . +\# *Notes: +\# String tabs may be marked off during PAD. +\# +.MAC PAD END +. if \\n(.u=1 \{ .nr #FILL_MODE 1 \} +. nf +. if !d$PAD_MARKER \{ .ds $PAD_MARKER # \} +. char \\*[$PAD_MARKER] \R'#PAD_COUNT \En[#PAD_COUNT]+1' +. ds $FAMILY_FOR_PAD \\n[.fam] +. nr #FONT_FOR_PAD \\n(.f +. nr #SIZE_FOR_PAD \\n[.ps] +. ds $PAD_STRING \\$1 +. as $PAD_STRING \Ekp +. di PAD_STRING +. fam \\*[$FAMILY_FOR_PAD] +\\f\\n[#FONT_FOR_PAD]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING] +. br +. di +. char \\*[$PAD_MARKER] \R'#SPACE_TO_END \En(.l-\Enp'\R'#PAD_SPACE \En[#SPACE_TO_END]/\En[#PAD_COUNT]' +. di PAD_STRING +. fam \\*[$FAMILY_FOR_PAD] +\\f\\n[#FONT_FOR_PAD]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING] +. br +. di +. char \\*[$PAD_MARKER] \h'\En[#PAD_SPACE]u' +. ie \\n[#SILENT] \{\ +. SILENT +. fam \\*[$FAMILY_FOR_PAD] +\\f\\n[#FONT_FOR_PAD]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING] +. br +. SILENT OFF +. \} +. el \{\ +. fam \\*[$FAMILY_FOR_PAD] +\\f\\n[#FONT_FOR_PAD]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING] +. br +. \} +. if \\n[#FILL_MODE]=1 \{\ +. fi +. rr #FILL_MODE +. \} +. rr #PAD_COUNT +. rr #SPACE_TO_END +. rr #PAD_SPACE +. rm $PAD_STRING +. rm PAD_STRING +. rchar # +.END +\# +\# +\# +++LEADERS+++ +\# +\# The leader mechanism is primitive, but it works. Basically, +\# every macro in this set that includes a line length also sets +\# a single groff tab stop at the right hand end of the line. +\# That way, whenever Ctrl-A is invoked (always at the end of +\# an input line), leader of the correct length gets deposited. +\# Ctrl-A is accessed by the string LEADER (i.e. inline, as +\# \*[LEADER]). Leaders within tabs get their length from the +\# tab line length. +\# +\# SET LEADER CHARACTER +\# -------------------- +\# *Arguments: +\# +\# *Function: +\# Set leader character. +\# +.MAC LEADER_CHARACTER END +. lc \\$1 +.END +\# +.ds LEADER  +\# +\# +++DROP CAPS+++ +\# +\# DROP CAP FAMILY +\# --------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $DC_FAM. +\# +.MAC DROPCAP_FAMILY END +. ds $DC_FAM \\$1 +.END +\# +\# +\# DROP CAP FONT +\# ------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $DC_FT. +\# +.MAC DROPCAP_FONT END +. ds $DC_FT \\$1 +.END +\# +\# +\# DROP CAP GUTTER +\# --------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies register #DC_GUT. +\# *Notes: +\# Requires unit of measure. Default is 3p. +\# +.MAC DROPCAP_GUTTER END +. nr #DC_GUT (\\$1) +.END +\# +\# +\# DROP CAP ADJUST +\# --------------- +\# *Argument: +\# <+|- # of points to in/decrease point size of drop cap letter> +\# *Function: +\# Creates or modifies string $DC_ADJUST. +\# *Notes: +\# Despite its best efforts, DROPCAP doesn't always get the point +\# size of the drop cap critically perfect. DROPCAP_ADJUST lets +\# the user add or subtract points (or fractions of points) to +\# get the size right. +\# +\# Requires the + or - sign. +\# +.MAC DROPCAP_ADJUST END +. ds $DC_ADJUST \\$1 +.END +\# +\# +\# DROP CAP +\# -------- +\# *Arguments: +\# <# of lines> [COND <% to condense> | EXT <% to extend>] +\# *Function: +\# Calculates point size of dropcap based on # of lines passed as +\# arg 2. Sets indent for text based on dropcap width+gutter. +\# Advances and prints dropcap; reverses and prints indented text +\# to bottom of dropcap, then resets indent to left margin (plus +\# any indent that was in effect prior to invoking DROPCAP). +\# *Notes: +\# Drop caps put a strain on on resource-challenged systems. +\# +\# Drop caps when using the doc processing macro PP only work with +\# initial paragraphs (i.e. at doc start, or after heads), only when +\# DROPCAPS comes immediately after PP, and only when the PRINTSTYLE +\# is TYPESET. If these conditions aren't met, DROPCAPS is silently +\# ignored. +\# +\# The COND or EXT argument are processed separately from all +\# other COND or EXT inlines or macros, hence passing COND or +\# EXT has no effect on running type. +\# +.MAC DROPCAP END +. if #IGNORE \{ .return \} +. br +. if \\n[#DOCS] \{\ +. if \\n[#PRINT_STYLE]=1 \{ .return \} +. if \\n[#PRINT_STYLE]=2 \{\ +. if \\n[#PP_STYLE]=2 \{ .return \} +. if \\n[#PP]>1 \{ .return \} +. ti 0 +. \} +. \} +. ds $DROPCAP \\$1 +. nr #DC_LINES \\$2-1 +. ds $RESTORE_COND \\*[$COND_PERCENT] +. ds $RESTORE_EXT \\*[$EXT_PERCENT] +. if '\\$3'COND' \{ .CONDENSE \\$4 \} +. if '\\$3'EXT' \{ .EXTEND \\$4 \} +. if !r#DC_GUT \{ .nr #DC_GUT (3p) \} +. ds $RESTORE_FAM \\n[.fam] +. nr #RESTORE_FT \\n(.f +. nr #RESTORE_PT_SIZE \\n[#PT_SIZE] +. nr #RESTORE_INDENT \\n(.i +. SIZESPECS +. nr #DC_HEIGHT \\n[#DC_LINES]*\\n[#LEAD]+\\n[#CAP_HEIGHT] +. ie !d$DC_FAM \{ .FAM \\n[.fam] \} +. el \{ .FAM \\*[$DC_FAM] \} +. ie !d$DC_FT \{ .FT \\n(.f \} +. el \{ .FT \\*[$DC_FT] \} +. while \\n[#GET_DC_HEIGHT]<\\n[#DC_HEIGHT] \{\ +. ps \\n[#PT_SIZE]u+100u +. SIZESPECS +. nr #GET_DC_HEIGHT \\n[#CAP_HEIGHT] +. \} +. if d$DC_ADJUST \{ .ps \\*[$DC_ADJUST]p \} +. mk x +. sp \\n[#DC_LINES]v +. ie '\\$3'COND' \{ .PRINT \\*[COND]\\*[$DROPCAP]\\*[CONDX] \} +. el \{ .PRINT \\*[$DROPCAP] \} +. if '\\$3'COND' \{ \E*[COND] \} +. if '\\$3'EXT' \{ \E*[EXT] \} +. ie \\n(.i \{ .in +\w'\\*[$DROPCAP]'u+\\n[#DC_GUT]u \} +. el \{ .in \w'\\*[$DROPCAP]'u+\\n[#DC_GUT]u \} +. if '\\$3'COND' \{ \E*[CONDX]\c \} +. if '\\$3'EXT' \{ \E*[EXTX]\c \} +. rt \\nxu +. FAM \\*[$RESTORE_FAM] +. FT \\n[#RESTORE_FT] +. ps \\n[#RESTORE_PT_SIZE]u +. CONDENSE \\*[$RESTORE_COND] +. EXTEND \\*[$RESTORE_EXT] +. ie \\n(.u \{ .wh \\n(.du+\\n[#DC_HEIGHT]u-1v DROPCAP_OFF \} +. el \{ .wh \\n(.du+\\n[#DC_HEIGHT]u DROPCAP_OFF \} +. rm $DROPCAP +. rr #DC_LINES +. rm $RESTORE_COND +. rm $RESTORE_EXT +. rm $RESTORE_FAM +. rr #RESTORE_FT +. rr #RESTORE_PT_SIZE +. rr #RESTORE_INDENT +. rr #DC_HEIGHT +. rr #GET_DC_HEIGHT +. rr x +.END +\# +.MAC DROPCAP_OFF END +' in \\n[#RESTORE_INDENT]u +.END +\# +\# +\# ===================================================================== +\# +\# +++WORD AND SENTENCE SPACING+++ +\# +\# WORD SPACE CONTROL +\# ------------------ +\# *Argument: +\# <+|->wordspace | DEFAULT +\# *Function: +\# Increases or decreases interword space by user supplied amount. +\# If DEFAULT, value is set to 12 (groff default). +\# *Notes: +\# $WS_CONSTANT is the groff default word space. +\# $WS_VAR is the user supplied amount by which to in/decrease word space. +\# $WS is a concatenation of WS_CONSTANT and WS_VAR. +\# +\# Because the user supplied value requires a literal + or - sign, +\# the macro argument is stored in a string. +\# +\# \n[.sss] holds the current sentence space value. +\# +.MAC WS END +. ds $WS_CONSTANT 12 +. ds $WS_VAR \\$1 +. ie '\\$1'DEFAULT' \{ .ds $WS_VAR +0 \} +. el \{ .ds $WS (\\*[$WS_CONSTANT]\\*[$WS_VAR]) \} +. ie \\n[.sss]=12 \{ .ss \\*[$WS] 12 \} +. el \{\ +. ss \\*[$WS] (\\*[$WS]\\*[$SS_VAR]) +. SS \\*[$SS_VAR] +. \} +.END +\# +\# +\# SENTENCE SPACE CONTROL +\# ---------------------- +\# *Argument: +\# <+-sentencespace> | 0 | DEFAULT +\# *Function: +\# Increases or decreases sentence space by user supplied amount. +\# If 0, sentence spaces are ignored. If DEFAULT, value is +\# set to 12 (groff default). +\# *Notes: +\# Because the user supplied value requires a literal + or - sign, +\# the macro argument is stored in a string. +\# +\# Sentence space applies only to input where sentences are separated +\# by two spaces (and/or, in fill mode [FLUSH L|R|C or JUSTIFY], an EOL). +\# Changing .SS when sentences are separated by only one space has +\# no effect on the space between sentences. +\# +\# \n[.ss] holds the current wordspace value. +\# \n[.sss] holds the current sentence space value. +\# +.MAC SS END +. ie '\\$1'0' \{ .ss \\n[.ss] (\\n[.ss]-\\n[.ss]) \} +. el \{\ +. ie '\\$1'DEFAULT' \{ .ss \\n[.ss] \} +. el \{\ +. ds $SS_VAR \\$1 +. ss \\n[.ss] (0\\*[$SS_VAR]) +. \} +. \} +.END +\# +\# +\# ===================================================================== +\# +\# +++INDENTS+++ +\# +\# There are five styles of indents: left, right, both, temporary, +\# and hanging. Each is set/invoked with a different macro. +\# Indent macros begin with the letter "I", hence .IL means "indent left," +\# .IR means "indent right," and so on. +\# +\# The first time any of the indent macros is used, it requires an +\# argument--the size of the indent in ipPcm. The size may also +\# be entered using the \w'#' function--very useful for numbered +\# lists using HI). The unit of measure is required. Subsequent +\# invocations don't require the argument; the indent measure remains the +\# same until it's changed by invoking the macro with an argument again. +\# +\# If no indents are in effect, the arguments passed to indent macros are +\# measured from the left and right margins of the page. If a left indent +\# or a right indent is already in effect, the arguments passed to +\# the indent macros are calculated from the current values; in other words, +\# the arguments are additive. If you quit an indent and later return +\# to it, its value will be the value last in effect, unless you pass +\# it an argument. If you do pass an argument, it is added to the last +\# value in effect, unless you cleared the indent with one of +\# .IX macros. +\# +\# Example +\# ------- +\# +\# .IL 2P +\# ...some text... +\# .IL 2P +\# ...some text... +\# .IQ +\# ...some text... +\# .IL +\# ...some text... +\# +\# The first .IL 2P indents text 2P from the left margin. The second +\# .IL 2P indents text by an additional 2P, i.e. 4P from the left margin. +\# .IQ turns the indent off. The last .IL (which has no argument) +\# takes its value from the total of all arguments passed to .IL (in +\# this case, 2P and 2P), therefore it indents 2P+2P from the left +\# margin, i.e. 4P. If you wanted the last .IL to indent just 2P, +\# you'd either have to reset the .IL prior to .IQ (.IL -2P), or pass +\# the last .IL the argument 2P. +\# +\# To reverse the sense of an indent added to an indent, you may use +\# negative values. +\# +\# Indents can be turned off individually with ILX, IRX, and IBX. +\# LEFT and RIGHT indents may be combined and manipulated +\# separately, (e.g. you can have an IL of 2P and an IR of 4P +\# operative at the same time, and then change, say, the IL to +\# 4P--thereby left indenting 6P--while the IR remains at 4P. +\# +\# IB automatically turns off IL and IR. They have to be reinvoked +\# again when needed. IL and IR automatically turn IB off; it, too, +\# has to be reinvoked with needed. +\# +\# All indents can be turned off at once with IQ. The ILX, IRX, IBX, +\# and IQ macros simply turn the indents off; the values stored in +\# the respective indent macros (IL, IR, IB) remain in effect. If +\# the user wishes to clear the values, the IX macros should be +\# invoked with the single argument CLEAR. IQ CLEAR clears out +\# the values stored for all indent styles. +\# +\# Indents *must* be turned off before settting string tabs +\# inside PAD. Generally, in order not to get confused, it's a +\# good idea to turn all indents off before setting any tabs. +\# +\# TI and HI are special cases. There's no need to turn them off, +\# since they affect only one line--the first after their +\# invocation. Like the other indent styles, the first time +\# they're invoked, they require a value in iPpcm; each subsequent +\# invocation without an argument will use the same value. To +\# change the value, simply pass a new value. Values for TI and HI +\# are *not* additive. +\# +\# HI presupposes that you already have a left or both indent +\# on. HI will never hang a line outside the left margin of a +\# document. In other words, you must have IL or IB on before you +\# can use HI. +\# +\# INDENT LEFT +\# ----------- +\# +.MAC IL END +. if \\n[#INDENT_STYLE_BOTH] \{ .IBX \} +. nr #INDENT_STYLE_LEFT 1 +. nr #INDENT_ACTIVE 1 +. nr #INDENT_LEFT_ACTIVE 1 +. ie '\\$1'' \{\ +. br +. in \\n[#L_INDENT]u +. ta \\n(.lu-\\n[#L_INDENT]u +. \} +. el \{\ +. br +. nr #L_INDENT +(\\$1) +. in \\n[#L_INDENT]u +. ta \\n(.lu-\\n[#L_INDENT]u +. \} +.END +\# +\# +\# +++INDENT RIGHT+++ +\# +.MAC IR END +. if \\n[#INDENT_STYLE_BOTH] \{ .IBX \} +. nr #INDENT_STYLE_RIGHT 1 +. nr #INDENT_ACTIVE 1 +. nr #INDENT_RIGHT_ACTIVE 1 +. ie '\\$1'' \{\ +. br +. ie \\n[#TAB_ACTIVE] \{\ +. ll \\n(.lu-\\n[#R_INDENT]u +. ta \\n(.lu-\\n[#L_INDENT]u +. \} +. el \{\ +. ll \\n[#L_LENGTH]u-\\n[#R_INDENT]u +. ta \\n(.lu-\\n[#L_INDENT]u +. \} +. \} +. el \{\ +. br +. nr #R_INDENT +(\\$1) +. ie \\n[#TAB_ACTIVE] \{\ +. ll \\n(.lu-\\n[#R_INDENT]u +. ta \\n(.lu-\\n[#L_INDENT]u +. \} +. el \{\ +. ll \\n[#L_LENGTH]u-\\n[#R_INDENT]u +. ta \\n(.lu-\\n[#L_INDENT]u +. \} +. \} +.END +\# +\# +\# +++INDENT BOTH+++ +\# +.MAC IB END +. if \\n[#INDENT_STYLE_LEFT] \{ .ILX \} +. if \\n[#INDENT_STYLE_RIGHT] \{ .IRX \} +. nr #INDENT_STYLE_BOTH 1 +. nr #INDENT_ACTIVE 1 +. nr #INDENT_BOTH_ACTIVE 1 +. ie '\\$1'' \{\ +. br +. in \\n[#BL_INDENT]u +. ie \\n[#TAB_ACTIVE] \{\ +. ll \\n(.lu-\\n[#BR_INDENT]u +. ta \\n(.lu-\\n[#BR_INDENT]u +. \} +. el \{\ +. ll \\n[#L_LENGTH]u-\\n[#BR_INDENT]u +. ta \\n(.lu-\\n[#BR_INDENT]u +. \} +. \} +. el \{\ +. br +. nr #BL_INDENT (\\n[#INDENT]+\\$1) +. ie \\n[#NUM_ARGS]=2 \{ .nr #BR_INDENT +(\\$2) \} +. el \{ .nr #BR_INDENT \\n[#BL_INDENT] \} +. ie \\n[#TAB_ACTIVE] \{\ +. in \\n[#BL_INDENT]u +. ll \\n(.lu-\\n[#BR_INDENT]u +. ta \\n(.lu-\\n[#BL_INDENT]u +. \} +. el \{\ +. in \\n[#BL_INDENT]u +. ll \\n[#L_LENGTH]u-\\n[#BR_INDENT]u +. ta \\n(.lu-\\n[#BR_INDENT]u +. \} +. \} +.END +\# +\# +\# +++TEMPORARY INDENT+++ +\# +.MAC TI END +. br +. ie '\\$1'' \{\ +. ti \\n[#T_INDENT]u +. if \\n[#INDENT_LEFT_ACTIVE] \{\ +. ti \\n[#T_INDENT]u+\\n[#L_INDENT]u +. \} +. if \\n[#INDENT_BOTH_ACTIVE] \{\ +. ti \\n[#T_INDENT]u+\\n[#BL_INDENT]u +. \} +. \} +. el \{\ +. nr #T_INDENT (\\$1) +. ti \\n[#T_INDENT]u +. \} +.END +\# +\# +\# +++HANGING INDENT+++ +\# +.MAC HI END +. ie '\\$1'' \{ .ti -\\n[#HL_INDENT]u \} +. el \{\ +. nr #HL_INDENT (\\$1) +. ti -\\n[#HL_INDENT]u +. \} +.END +\# +\# +\# +++INDENTS OFF+++ +\# +.MAC ILX END +. br +. in 0 +. rr #INDENT_LEFT_ACTIVE +. if '\\$1'CLEAR' \{\ +. rr #L_INDENT +. rr #INDENT_STYLE_LEFT +. \} +.END +\# +\# +.MAC IRX END +. br +. rr #INDENT_RIGHT_ACTIVE +. ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \} +. el \{\ +. ie \\n[#COLUMNS] \{\ +. ll \\n[#COL_L_LENGTH]u +. ta \\n(.lu +. \} +. el \{\ +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +. \} +. \} +. if '\\$1'CLEAR' \{\ +. rr #R_INDENT +. rr #INDENT_STYLE_RIGHT +. \} +.END +\# +\# +.MAC IBX END +. br +. in 0 +. rr #INDENT_BOTH_ACTIVE +. ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \} +. el \{\ +. ie \\n[#COLUMNS] \{\ +. ll \\n[#COL_L_LENGTH]u +. ta \\n(.lu +. \} +. el \{\ +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +. \} +. \} +. if '\\$1'CLEAR' \{\ +. rr #BL_INDENT +. rr #BR_INDENT +. rr #INDENT_STYLE_BOTH +. \} +.END +\# +\# +.MAC IX END +. if '\\$0'IX' \{\ +. if !\\n[#IX_WARN] \{\ +. tm1 "[mom]: Use of .IX is now deprecated. Use .IQ instead. +. tm1 " .IX will continue to behave as before, but to +. tm1 " avoid this message, please update your document. +. nr #IX_WARN 1 +. \} +. \} +. br +. in 0 +. rr #INDENT_LEFT_ACTIVE +. rr #INDENT_RIGHT_ACTIVE +. rr #INDENT_BOTH_ACTIVE +. if \\n[#INDENT_STYLE_RIGHT] \{\ +. ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \} +. el \{\ +. ie \\n[#COLUMNS] \{\ +. ll \\n[#COL_L_LENGTH]u +. ta \\n(.lu +. \} +. el \{\ +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +. \} +. \} +. \} +. if \\n[#INDENT_STYLE_BOTH] \{\ +. ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \} +. el \{\ +. ie \\n[#COLUMNS] \{\ +. ll \\n[#COL_L_LENGTH]u +. ta \\n(.lu +. \} +. el \{\ +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +. \} +. \} +. \} +. if '\\$1'CLEAR' \{\ +. if \\n[#INDENT_STYLE_RIGHT] \{\ +. ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \} +. el \{\ +. ie \\n[#COLUMNS] \{\ +. ll \\n[#COL_L_LENGTH]u +. ta \\n(.lu +. \} +. el \{\ +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +. \} +. \} +. \} +. if \\n[#INDENT_STYLE_BOTH] \{\ +. ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \} +. el \{\ +. ie \\n[#COLUMNS] \{\ +. ll \\n[#COL_L_LENGTH]u +. ta \\n(.lu +. \} +. el \{\ +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +. \} +. \} +. \} +. rr #L_INDENT +. rr #R_INDENT +. rr #BL_INDENT +. rr #BR_INDENT +. rr #T_INDENT +. rr #H_INDENT +. rr #INDENT_STYLE_LEFT +. rr #INDENT_STYLE_RIGHT +. rr #INDENT_STYLE_BOTH +. \} +. rr #INDENT_ACTIVE +.END +\# +\# ===================================================================== +\# +\# +++MULTIPLE COLUMNS+++ +\# +\# MULTIPLE COLUMNS ON +\# ------------------- +\# *Arguments: +\# +\# *Function: +\# Marks the top of a column set +\# +.MAC MCO END +.mk c +.END +\# +\# MULTIPLE COLUMN RETURN +\# ---------------------- +\# *Arguments: +\# +\# *Function: +\# Returns to the top of a column set +\# +.MAC MCR END +. sp |\\ncu +.END +\# +\# MULTIPLE COLUMNS OFF +\# -------------------- +\# *Arguments: +\# | +\# *Function: +\# Advances to the end of a column set +\# *Notes: +\# With no argument, advances to the next baseline (at the current +\# leading value) beneath the longest column. With an argument +\# (which requires a unit of measure), advances arg distance +\# beneath the baseline of the deepest column. If the argument +\# is zero, advances to the baseline of the deepest column. +\# +.MAC MCX END +. ie '\\$1'' \{\ +. TQ +. sp |\\n(.hu +. \} +. el \{\ +. nr #MCX_ALD (\\$1) +. TQ +. ie \\n[#MCX_ALD]=0 \{ .sp |\\n(.hu-1v \} +. el \{ .sp |\\n(.hu+\\n[#MCX_ALD]u \} +. rr #MCX_ALD (\\$1) +. \} +.END +\# +\# ===================================================================== +\# +\# +++TYPESETTING SUPPORT MACROS+++ +\# +\# TRAP +\# ---- +\# *Arguments: +\# toggle +\# *Function: +\# Enables/disables traps. +\# *Notes: +\# EL and TN don't function as advertised on the last line before a +\# trap (when they break the preceding line, they spring the trap, and +\# groff won't back up to the line preceding the trap). TRAP is a kludge +\# to get EL and TN work properly on last lines. The user simply enloses +\# the offending lines in TRAP OFF/TRAP. +\# +.MAC TRAP END +. ie '\\$1'' \{ .vpt 1 \} +. el \{ .vpt 0 \} +.END +\# +\# +\# SILENT +\# ------ +\# *Arguments: +\# | +\# *Function: +\# Diverts text so that it doesn't print, or turns to function off. +\# *Notes: +\# Useful for setting up autotabs where you don't want the line with +\# the tab marks to print. +\# +\# Also aliased as COMMENT, in case user wants to input a batch of +\# text that doesn't print. +\# +.MAC SILENT END +. nr #SILENT 1 +. if \\n[#QUAD] \{ .br \} +. ie '\\$1'' \{ .di NO_FLASH \} +. el \{\ +. br +. di +. rm NO_FLASH +. rr #SILENT +. \} +.END +\# +\# PRINT +\# ----- +\# *Arguments: +\# +\# *Function: +\# Prints anything. A macro that helps keep my code nicely indented. +\# +.MAC PRINT END +\\$* +.END +\# +\# +\# CAPS +\# ---- +\# *Arguments: +\# | +\# *Function: +\# Converts text to caps, or, if OFF, reverts to normal caps/lc. +\# +.MAC CAPS END +. ie '\\$1'' \{\ +. tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ +. tr à\[`A] +. tr â\[^A] +. tr á\['A] +. tr ä\[:A] +. tr å\[oA] +. tr ã\[~A] +. tr æ\[AE] +. tr è\[`E] +. tr ê\[^E] +. tr é\['E] +. tr ë\[:E] +. tr ì\[`I] +. tr î\[^I] +. tr í\['I] +. tr ï\[:I] +. tr ò\[`O] +. tr ô\[^O] +. tr ó\['O] +. tr ö\[:O] +. tr õ\[~O] +. tr ø\[/O] +. tr ù\[`U] +. tr û\[^U] +. tr ú\['U] +. tr ü\[:U] +. tr ç\[,C] +. tr ð\[-D] +. tr ñ\[~N] +. tr þ\[TP] +. tr ý\['Y] +. tr ÿ\[:Y] +. nr #CAPS_ON 1 +. \} +. el \{\ +. tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz +. tr à\[`a] +. tr â\[^a] +. tr á\['a] +. tr ä\[:a] +. tr å\[oa] +. tr ã\[~a] +. tr æ\[ae] +. tr è\[`e] +. tr ê\[^e] +. tr é\['e] +. tr ë\[:e] +. tr ì\[`i] +. tr î\[^i] +. tr í\['i] +. tr ï\[:i] +. tr ò\[`o] +. tr ô\[^o] +. tr ó\['o] +. tr ö\[:o] +. tr õ\[~o] +. tr ø\[/o] +. tr ù\[`u] +. tr û\[^u] +. tr ú\['u] +. tr ü\[:u] +. tr ç\[,c] +. tr ð\[Sd] +. tr ñ\[~n] +. tr þ\[Tp] +. tr ý\['y] +. tr ÿ\[:y] +. rr #CAPS_ON +. \} +.END +\# +\# SIZESPECS +\# --------- +\# Argument: +\# +\# Function: +\# Gets cap-height, x-height, and descender depth of the +\# current font at the current point size. +\# *Notes: +\# The routine is diverted so it remains invisible to output. +\# +.MAC SIZESPECS END +. di TYPESIZE +E\\R'#CAP_HEIGHT \\n[.cht]' +e\\R'#X_HEIGHT \\n[.cht]' +y\\R'#DESCENDER \\n[.cdp]' +. br +. di +.END +\# +\# ===================================================================== +\# +\# +++TYPESETTING ALIASES+++ +\# +.ALIAS CENTRE CENTER +.ALIAS COMMENT SILENT +.ALIAS CONDENSE CONDENSE_OR_EXTEND +.ALIAS EXTEND CONDENSE_OR_EXTEND +.ALIAS FAM FAMILY +.ALIAS HYPHENATE HY +.ALIAS HYPHENATION HY +.ALIAS HYSET HY_SET +.ALIAS LIG LIGATURES +.ALIAS IBQ IBX +.ALIAS ILQ ILX +.ALIAS IQ IX +.ALIAS IRQ IRX +.ALIAS PADMARKER PAD_MARKER +.ALIAS TABSET TAB_SET +.ALIAS TB TAB +.ALIAS UNDERSCORE_2 UNDERSCORE2 +\# +\# +\# ==================================================================== +\# +\# DOCUMENT PROCESSING MACROS, STRINGS AND ALIASES +\# =============================================== +\# +\# +++PAGE DIMENSIONS+++ +\# +\# PAPER SIZE +\# ---------- +\# *Arguments: +\# LETTER | LEGAL | STATEMENT | TABLOID | LEDGER | FOLIO | QUARTO | 10x14 | EXECUTIVE | A3 | A4 | A5 | B4 | B5 +\# *Function: +\# Sets up margins for different paper sizes. +\# +.MAC PAPER END +. ds $PAPER \\$1 +. if '\\*[$PAPER]'LETTER' \{\ +. PAGEWIDTH 8.5i +. PAGELENGTH 11i +. \} +. if '\\*[$PAPER]'LEGAL' \{\ +. PAGEWIDTH 8.5i +. PAGELENGTH 14i +. \} +. if '\\*[$PAPER]'STATEMENT' \{\ +. PAGEWIDTH 5.5i +. PAGELENGTH 8.5i +. \} +. if '\\*[$PAPER]'TABLOID' \{\ +. PAGEWIDTH 11i +. PAGELENGTH 17i +. \} +. if '\\*[$PAPER]'LEDGER' \{\ +. PAGEWIDTH 17i +. PAGELENGTH 11i +. \} +. if '\\*[$PAPER]'FOLIO' \{\ +. PAGEWIDTH 8.5i +. PAGELENGTH 13i +. \} +. if '\\*[$PAPER]'QUARTO' \{\ +. PAGEWIDTH 610p +. PAGELENGTH 780p +. \} +. if '\\*[$PAPER]'10x14' \{\ +. PAGEWIDTH 10i +. PAGELENGTH 14i +. \} +. if '\\*[$PAPER]'EXECUTIVE' \{\ +. PAGEWIDTH 7.25i +. PAGELENGTH 10.5i +. \} +. if '\\*[$PAPER]'A3' \{\ +. PAGEWIDTH 842p +. PAGELENGTH 1190p +. \} +. if '\\*[$PAPER]'A4' \{\ +. PAGEWIDTH 595p +. PAGELENGTH 842p +. \} +. if '\\*[$PAPER]'A5' \{\ +. PAGEWIDTH 421p +. PAGELENGTH 595p +. \} +. if '\\*[$PAPER]'B4' \{\ +. PAGEWIDTH 709p +. PAGELENGTH 1002p +. \} +. if '\\*[$PAPER]'B5' \{\ +. PAGEWIDTH 501p +. PAGELENGTH 709p +. \} +. if !r#L_MARGIN \{ .L_MARGIN \\n(.o \} +. if !r#R_MARGIN \{ .R_MARGIN 1i \} +.END +\# +\# +\# ==================================================================== +\# +\# +++PRINTSTYLE -- TYPEWRITE OR TYPESET+++ +\# +\# PRINTSTYLE +\# ---------- +\# *Arguments: +\# TYPESET | TYPEWRITE [SINGLESPACE] +\# *Function: +\# Sets type specs for typewriter-style or typeset output. +\# *Notes: +\# Number registers: TYPEWRITE=1, TYPESET=2. +\# +.MAC PRINTSTYLE END +. if !d$PAPER \{ .PAPER LETTER \} +. if '\\$1'TYPEWRITE' \{\ +. nr #PRINT_STYLE 1 +. if !\\n[#DOC_TYPE]=4 \{ .L_MARGIN 6P \} +. if !\\n[#DOC_TYPE]=4 \{ .R_MARGIN 6P \} +. fam C +. ft R +. ps 12 +. ie '\\$2'SINGLESPACE' \{\ +. nr #SINGLE_SPACE 1 +. vs 12 +. \} +. el \{ .vs 24 \} +. QUAD L +. HY OFF +. SMARTQUOTES OFF +. if !\\n[#PP_INDENT] \{\ +. in 3P \"Set indent +. nr #PP_INDENT \\n(.i \"Read into #PP_INDENT +. in 0 \"Remove indent +. \} +. HDRFTR_RIGHT_CAPS +. nr #BOLDER_UNITS 0 +. nr #CONDENSE 0 +. nr #EXTEND 0 +. rm IT +. rm BD +. rm BDI +. rm PREV +. UNDERLINE_SLANT +. UNDERLINE_ITALIC +. UNDERLINE_QUOTES +. nr #IGNORE_COLUMNS 1 +. \} +. if '\\$1'TYPESET' \{\ +. nr #PRINT_STYLE 2 +. if !\\n[#DOC_TYPE]=4 \{ .L_MARGIN 6P \} +. if !\\n[#DOC_TYPE]=4 \{ .R_MARGIN 6P \} +. FAMILY T +. FT R +. if !\\n[#DOC_TYPE]=4 \{ .PT_SIZE 12.5 \} +. if !\\n[#DOC_TYPE]=4 \{ .LS 16 \} +. JUSTIFY +. HY +. HY_SET 2 36p 1p +. KERN +. LIG +. SS 0 +. SMARTQUOTES +. if !\\n[#PP_INDENT] \{\ +. in 2m \"Set indent +. nr #PP_INDENT \\n(.i \"Read into #PP_INDENT +. in 0 \"Remove indent +. \} +. HDRFTR_RIGHT_CAPS +. rr #IGNORE_COLUMNS +. \} +.END +\# +\# +\# Macros to control behaviour of PRINTSTYLE TYPEWRITE +\# +\# ITALIC MEANS ITALIC +\# ------------------- +\# *Argument: +\# +\# *Function: +\# Instructs TYPEWRITE to treat italics as italics, whether +\# invoked via control lines or inline. +\# *Notes: +\# ITALIC_MEANS_ITALIC and UNDERLINE_ITALIC are mututally exclusive, +\# hence invoking the one automatically turns off the other. +\# +.MAC ITALIC_MEANS_ITALIC END +. if \\n[#PRINT_STYLE]=1 \{\ +. nr #ITALIC_MEANS_ITALIC 1 +. rr #UNDERLINE_ITALIC +. rm ROM +. rm IT +. rm PREV +. ds ROM \EfR +. ds IT \EfI +. ds PREV \EfR +. \} +.END +\# +\# +\# UNDERLINE ITALIC +\# ---------------- +\# *Argument: +\# +\# *Function: +\# Instructs TYPEWRITE to underline italics, whether invoked +\# via control lines or inline. +\# *Notes: +\# UNDERLINE_ITALIC and ITALIC_MEANS_ITALIC are mututally exclusive, +\# hence invoking the one automatically turns off the other. +\# +\# UNDERLINE_ITALIC is the default for TYPEWRITE. +\# +.MAC UNDERLINE_ITALIC END +. if \\n[#PRINT_STYLE]=1 \{\ +. nr #UNDERLINE_ITALIC 1 +. rr #ITALIC_MEANS_ITALIC +. rm ROM +. rm IT +. rm PREV +. ds ROM \E*[ULX] +. ds IT \E*[UL] +. ds PREV \E*[ULX] +. \} +.END +\# +\# +\# UNDERLINE SLANT +\# --------------- +\# *Arguments: +\# | +\# *Function: +\# Instructs TYPEWRITE to underline occurences of \*[SLANT], or +\# turns feature off. +\# *Notes: +\# Users may want \*[SLANT] to mean slant in TYPEWRITE, although +\# most of the time, \*[SLANT] most likely means the user wanted +\# italic but didn't have it, ergo the need to tell TYPEWRITE to +\# treat \*[SLANT] as italic (i.e. underlined). +\# +\# UNDERLINE_SLANT and SLANT_MEANS_SLANT are mututally exclusive, +\# hence invoking the one automatically turns off the other. +\# +\# UNDERLINE_SLANT is the default for TYPEWRITE. +\# +.MAC UNDERLINE_SLANT END +. if \\n[#PRINT_STYLE]=1 \{\ +. rr #SLANT_MEANS_SLANT +. nr #UNDERLINE_SLANT 1 +. rm SLANT +. rm SLANTX +. ds SLANT \ER'#SLANT_ON 1'\E*[UL] +. ds SLANTX \ER'#SLANT_ON 0'\E*[ULX] +. \} +.END +\# +\# +.MAC SLANT_MEANS_SLANT END +. if \\n[#PRINT_STYLE]=1 \{\ +. rr #UNDERLINE_SLANT +. nr #SLANT_MEANS_SLANT 1 +. rm SLANT +. rm SLANTX +. ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]' +. ds SLANTX \ER'#SLANT_ON 0'\ES'0' +. \} +.END +\# +\# +.MAC IGNORE_COLUMNS END +. if \\n[#PRINT_STYLE]=1 \{ .nr #NO_COLUMNS 1 \} +.END +\# +\# +\# ==================================================================== +\# +\# +++COPY STYLE -- DRAFT OR FINAL+++ +\# +\# COPY STYLE +\# ---------- +\# *Arguments: +\# DRAFT | FINAL +\# *Function: +\# Sets registers that are used to determine what to put +\# in the default header, and how to number pages. +\# *Notes: +\# DOCTYPE must come before COPYSTYLE. +\# +.MAC COPYSTYLE END +. ds $COPY_STYLE \\$1 +. if '\\*[$COPY_STYLE]'DRAFT' \{\ +. nr #COPY_STYLE 1 +. if !r#DRAFT \{ .DRAFT 1 \} +. \} +. if '\\*[$COPY_STYLE]'FINAL' \{ .nr #COPY_STYLE 2 \} +. if !d$CHAPTER_STRING \{ .CHAPTER_STRING "Chapter" \} +. if !d$DRAFT_STRING \{ .DRAFT_STRING "Draft" \} +. if !d$REVISION_STRING \{ .REVISION_STRING "Rev." \} +\# Default +. if \\n[#DOC_TYPE]=1 \{\ +. ie \\n[#COPY_STYLE]=1 \{\ +. ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \} +. el \{ .PAGENUM_STYLE roman \} +. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\ +. ie \\n[#DRAFT_WITH_PAGENUM] \{\ +. ds $HDRFTR_CENTER +. \} +. el \{\ +. ie !\\n[#REVISION] \{\ +. ds $HDRFTR_CENTER \ + \\*[$DRAFT_STRING] \\n[#DRAFT] +. \} +. el \{\ +. ds $HDRFTR_CENTER \ + \\*[$DRAFT_STRING] \\n[#DRAFT], \ + \\*[$REVISION_STRING] \\n[#REVISION] +. \} +. \} +. \} +. \} +. el \{\ +. ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \} +. el \{ .PAGENUM_STYLE DIGIT \} +. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{ .ds $HDRFTR_CENTER \} +. \} +. \} +\# Chapter +. if \\n[#DOC_TYPE]=2 \{\ +. ie \\n[#COPY_STYLE]=1 \{\ +. ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \} +. el \{ .PAGENUM_STYLE roman \} +. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\ +. ie \\n[#DRAFT_WITH_PAGENUM] \{\ +. ie '\\*[$CHAPTER]'' \{ .ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] \\*[$CHAPTER] \} +. el \{ .ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] \} +. \} +. el \{\ +. ie !\\n[#REVISION] \{\ +. ie '\\*[$CHAPTER]'' \{\ +. ds $HDRFTR_CENTER \ + \\*[$CHAPTER_STRING], \ + \\*[$DRAFT_STRING] \\n[#DRAFT] +. \} +. el \{\ +. ds $HDRFTR_CENTER \ + \\*[$CHAPTER_STRING] \\*[$CHAPTER], \ + \\*[$DRAFT_STRING] \\n[#DRAFT] +. \} +. \} +. el \{\ +. ie '\\*[$CHAPTER]'' \{\ +. el \{\ + \\*[$CHAPTER_STRING], \ + \\*[$DRAFT_STRING] \\n[#DRAFT], \ + \\*[$REVISION_STRING] \\n[#REVISION] +. \} +. ds $HDRFTR_CENTER \ + \\*[$CHAPTER_STRING] \\*[$CHAPTER], \ + \\*[$DRAFT_STRING] \\n[#DRAFT], \ + \\*[$REVISION_STRING] \\n[#REVISION] +. \} +. \} +. \} +. \} +. \} +. el \{\ +. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\ +. ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \} +. el \{ .PAGENUM_STYLE DIGIT \} +. ie '\\*[$CHAPTER]'' \{ .ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] \} +. el \{ .ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] \\*[$CHAPTER] \} +. \} +. \} +. \} +\# Named +. if \\n[#DOC_TYPE]=3 \{\ +. ie \\n[#COPY_STYLE]=1 \{\ +. ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \} +. el \{ .PAGENUM_STYLE roman \} +. ie \\n[#DRAFT_WITH_PAGENUM] \{\ +. ds $HDRFTR_CENTER \\*[$DOC_TYPE] +. \} +. el \{\ +. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\ +. ie !\\n[#REVISION] \{\ +. ds $HDRFTR_CENTER \ + \\*[$DOC_TYPE], \ + \\*[$DRAFT_STRING] \\n[#DRAFT] +. \} +. el \{\ +. ds $HDRFTR_CENTER \ + \\*[$DOC_TYPE], \ + \\*[$DRAFT_STRING] \\n[#DRAFT], \ + \\*[$REVISION_STRING] \\n[#REVISION] +. \} +. \} +. \} +. \} +. el \{\ +. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\ +. ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \} +. el \{ .PAGENUM_STYLE DIGIT \} +. ds $HDRFTR_CENTER \\*[$DOC_TYPE] +. \} +. \} +. \} +.END +\# +\# ==================================================================== +\# +\# +++COLLECT DOC INFO -- STRINGS AND NUMBER REGISTERS+++ +\# +\# *Arguments: +\# various string/register arguments +\# *Function: +\# Collect information about documents. +\# +.MAC TITLE END \"Document title +. ds $TITLE \\$1 +.END +\# +\# +.MAC SUBTITLE END \"Document sub-title +. ds $SUBTITLE \\$1 +.END +\# +\# +.MAC CHAPTER END \"If document is a chapter, the chapter number +. ds $CHAPTER \\$1 +.END +\# +\# +.MAC DRAFT END \"Draft number +. nr #DRAFT \\$1 +.END +\# +\# +.MAC REVISION END \"Revision number +. nr #REVISION \\$1 +.END +\# +\# +.MAC DRAFT_WITH_PAGENUMBER END \"Attach draft/revision strings to page number +. nr #DRAFT_WITH_PAGENUM 1 +.END +\# +\# +.MAC AUTHOR END \"Author. Use "..." with this macro. +. nr #AUTHOR_NUM -1 1 +. while \\n[#NUM_ARGS]>\\n[#AUTHOR_NUM] \{\ +. ds $AUTHOR_\\n+[#AUTHOR_NUM] \\$\\n[#AUTHOR_NUM] +. \} +. nr #NUM_AUTHORS \\n[#NUM_ARGS]%2 \"Use mod 2 to test if odd or even # of authors +. ie \\n[#NUM_AUTHORS]=1 \{ .nr #AUTHOR_LINES 0 \} +. el \{ .nr #AUTHOR_LINES 1 \} +.END +\# +\# +.MAC PAGENUMBER END \"Page # that appears on page one. +. nr #n%_AT_PAGENUM_SET \\n% +. nr #PAGE_NUM_ADJ \\$1-\\n[#n%_AT_PAGENUM_SET] +. rr #n%_AT_PAGENUM_SET +. nr #PAGE_NUM_SET 1 +.END +\# +\# ==================================================================== +\# +\# +++TYPE OF DOCUMENT+++ +\# +\# DOCUMENT TYPE +\# ------------- +\# *Argument: +\# DEFAULT | CHAPTER | NAMED " | LETTER +\# *Function: +\# Creates strings and sets registers for document types. +\# *Notes: +\# Number registers: DEFAULT=1, CHAPTER=2, NAMED=3, LETTER=4 +\# +.MAC DOCTYPE END +. if '\\$1'DEFAULT' \{\ +. nr #DOC_TYPE 1 +. \} +. if '\\$1'CHAPTER' \{\ +. nr #DOC_TYPE 2 +. \} +. if '\\$1'NAMED' \{\ +. ds $DOC_TYPE \\$2 +. nr #DOC_TYPE 3 +. \} +. if '\\$1'LETTER' \{\ +. nr #DOC_TYPE 4 +. L_MARGIN 1.125i +. R_MARGIN 1.125i +. PT_SIZE 12 +. LS 13.5 +. DOCHEADER OFF +. PARA_INDENT 3m +. INDENT_FIRST_PARAS +. PARA_SPACE +. ds $SUITE \En[#SUITE] +. HEADER_MARGIN 3P+6p +. HEADER_GAP 3P +. FOOTERS +. FOOTER_RULE OFF +. FOOTER_LEFT "" +. FOOTER_CENTER "" +. FOOTER_RIGHT_SIZE +0 +. FOOTER_RIGHT ".../\E*[$SUITE] +. FOOTER_ON_FIRST_PAGE +. em ALL_DONE +. \} +.END +\# +\# +++LETTER MACROS+++ +\# +\# DATE +\# ---- +\# *Arguments: +\# +\# *Function: +\# Stores date string in string $DATE. +\# +.MAC DATE END +. nr #DATE 1 +. di DATE +. RIGHT +.END +\# +\# +\# TO +\# -- +\# *Arguments: +\# +\# *Function: +\# Stores "to" info in diversion TO_ADDRESS. +\# +.MAC TO END +. if !'\\n(.z'' \{ .di \} +. nr #TO 1 +. di TO_ADDRESS +. LEFT +.END +\# +\# +\# FROM +\# ---- +\# *Arguments: +\# +\# *Function: +\# Stores "from" info in diversion FROM_ADDRESS. +\# +.MAC FROM END +. if !'\\n(.z'' \{ .di \} +. nr #FROM 1 +. di FROM_ADDRESS +. LEFT +.END +\# +\# +\# GREETING +\# -------- +\# *Arguments: +\# +\# *Function: +\# Stores greeting in string $GREETING. +\# +.MAC GREETING END +. if !'\\n(.z'' \{ .di \} +. nr #GREETING 1 +. di GREETING +. LEFT +.END +\# +\# +\# CLOSING +\# ------- +\# *Arguments: +\# +\# *Function: +\# Stores greeting in string $CLOSING. +\# +.MAC CLOSING END +. br +. nr #CLOSING 1 +. di CLOSING +.END +\# +\# +\# NO SUITE +\# -------- +\# *Arguments: +\# +\# *Function: +\# Redefines $SUITE to blank so that a suite number doesn't +\# appear at the bottom of letter pages. +\# +.MAC NO_SUITE END +. FOOTER_RIGHT "" +.END +\# +\# ==================================================================== +\# +\# +++DEFAULTS+++ +\# +\# DEFAULTS +\# -------- +\# *Arguments: +\# +\# *Function: +\# Sets up defaults if no values are entered prior to START. +\# *Notes: +\# The defaults for $CHAPTER_STRING, $DRAFT_STRING, and +\# $REVISION_STRING are in the COPYSTYLE macro. +\# +.MAC DEFAULTS END +. if !d$PAPER \{ .PAPER LETTER \} +. if !\\n[#DOC_TYPE] \{ .DOCTYPE DEFAULT \} +. if \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \} +. if !\\n[#COPY_STYLE] \{ .COPYSTYLE FINAL \} +. if \\n[#DRAFT_WITH_PAGENUM] \{ .COPYSTYLE \\*[$COPY_STYLE] \} +. if \\n[#DOC_TYPE]=4 \{\ +. if !\\n[#USER_SET_L_LENGTH] \{\ +. R_MARGIN \\n[#R_MARGIN]u +. rr #USER_SET_L_LENGTH +. \} +. if \\n[#PRINT_STYLE]=1 \{ .PRINTSTYLE TYPEWRITE SINGLESPACE \} +. \} +. if \\n[#COPY_STYLE]=1 \{\ +. COPYSTYLE DRAFT +. PAGENUMBER 1 +. \} +. if !r#DOC_HEADER \{ .DOCHEADER \} +. if !r#HEADERS_ON \{ .HEADERS \} +. if !r#PAGINATE \{ .PAGINATE \} +. if \\n[#FOOTERS_ON] \{\ +. HEADERS OFF +. if \\n[#PAGE_NUM_POS_SET]=0 \{ .PAGENUM_POS TOP CENTER \} +. \} +. if !r#HEADER_MARGIN \{ .HEADER_MARGIN 4P+6p \} +. if !r#HEADER_GAP \{ .HEADER_GAP 3P \} +. if \\n[#FOOTERS_ON] \{\ +. if \\n[#PAGINATE]=0 \{\ +. if !r#T_MARGIN \{ .T_MARGIN 6P \} +. \} +. \} +. if \\n[#HEADERS_ON]=0 \{\ +. if \\n[#FOOTERS_ON]=0 \{\ +. if !r#T_MARGIN \{ .T_MARGIN 6P \} +. \} +. \} +. if !r#T_MARGIN \{ .T_MARGIN \\n[#HEADER_MARGIN]+\\n[#HEADER_GAP] \} +. if !r#DOCHEADER_ADVANCE \{ .DOCHEADER_ADVANCE \\n[#T_MARGIN] \} +. if !r#FOOTER_MARGIN \{ .FOOTER_MARGIN 3P \} +. if !r#FOOTER_GAP \{ .FOOTER_GAP 3P \} +. if !r#B_MARGIN \{ .B_MARGIN \\n[#FOOTER_MARGIN]u+\\n[#FOOTER_GAP]u \} +. if !r#HDRFTR_RULE_GAP \{\ +. if \\n[#HEADERS_ON] \{ .HDRFTR_RULE_GAP 4p \} +. if \\n[#FOOTERS_ON] \{ .HDRFTR_RULE_GAP 4p \} +. \} +. if !r#HDRFTR_RULE \{ .HDRFTR_RULE \} +. if !r#PAGE_NUM_SET \{ .PAGENUMBER 1 \} +. ie r#ADJ_DOC_LEAD \{ . \} +. el \{ .DOC_LEAD_ADJUST \} +\# Read in number registers and strings for type parameters +. nr #DOC_L_MARGIN \\n[#L_MARGIN] +. nr #DOC_L_LENGTH \\n[#L_LENGTH] +. nr #DOC_R_MARGIN \\n[#PAGE_WIDTH]-(\\n[#DOC_L_MARGIN]+\\n[#L_LENGTH]) +. ds $DOC_FAM \\*[$FAMILY] +. nr #DOC_PT_SIZE \\n[#PT_SIZE] +. nr #DOC_LEAD \\n[#LEAD] +. ds $DOC_QUAD \\*[$QUAD_VALUE] +. ds $PP_FT \\*[$FONT] +\# Counters +. nr #PP 0 +. nr #FN_NUMBER 0 1 +. nr #EN_NUMBER 0 1 +. nr #FN_COUNT_FOR_COLS 0 1 +. RESET_HEAD_NUMBER +. RESET_SUBHEAD_NUMBER +. RESET_PARAHEAD_NUMBER +\# General style defaults for both PRINTSTYLEs +. nr #PP_STYLE 1 +. PARA_INDENT \\n[#PP_INDENT]u +. if !d$HDRFTR_FAM \{ .HDRFTR_FAMILY \\*[$DOC_FAM] \} +. if !d$HDRFTR_SIZE_CHANGE \{ .HDRFTR_SIZE +0 \} +. if !d$PAGE_NUM_FAM \{ .PAGENUM_FAMILY \\*[$DOC_FAM] \} +. if !d$PAGE_NUM_FT \{ .PAGENUM_FONT R \} +. if !d$PAGE_NUM_SIZE_CHANGE \{ .PAGENUM_SIZE +0 \} +. if !r#PAGE_NUM_POS_SET \{ .PAGENUM_POS BOTTOM CENTER \} +. ie \\n[#PAGE_NUM_HYPHENS_SET] \{\ +. if \\n[#PAGE_NUM_HYPHENS]=0 \{ .PAGENUM_HYPHENS OFF \} +. if \\n[#PAGE_NUM_HYPHENS]=1 \{ .PAGENUM_HYPHENS \} +. \} +. el \{ .PAGENUM_HYPHENS \} +. if !d$HEAD_QUAD \{ .HEAD_QUAD CENTER \} +. if !r#HEAD_CAPS \{ .HEAD_CAPS \} +. if !r#HEAD_UNDERLINE \{ .HEAD_UNDERLINE \} +. if !d$SH_QUAD \{ .SUBHEAD_QUAD LEFT \} +. if !r#HDRFTR_RIGHT_CAPS \{ .HDRFTR_RIGHT_CAPS \} +. if \\n[#HDRFTR_RIGHT_CAPS]=0 \{\ +. if !d$HDRFTR_RIGHT_SIZE_CHANGE \{ .HDRFTR_RIGHT_SIZE +0 \} +. \} +. if !d$FN_FAM \{ .FOOTNOTE_FAMILY \\*[$DOC_FAM] \} +. if !d$FN_FT \{ .FOOTNOTE_FONT R \} +. if !d$FN_QUAD \{ .FOOTNOTE_QUAD \\*[$DOC_QUAD] \} +. if !r#FN_RULE \{ .FOOTNOTE_RULE \} +. if !r#FN_MARKERS \{ .FOOTNOTE_MARKERS \} +. if !r#FN_MARKER_STYLE \{ .FOOTNOTE_MARKER_STYLE STAR \} +. if !d$EN_FAM \{ .ENDNOTE_FAMILY \\*[$DOC_FAM] \} +. if !d$EN_FN \{ .ENDNOTE_FONT R \} +. if !d$EN_QUAD \{ .ENDNOTE_QUAD \\*[$DOC_QUAD] \} +. if !d$EN_STRING \{ .ENDNOTE_STRING "ENDNOTES" \} +. if !d$EN_STRING_FAM \{ .ENDNOTE_STRING_FAMILY \\*[$DOC_FAM] \} +. if !d$EN_STRING_QUAD \{ .ENDNOTE_STRING_QUAD CENTER \} +. if !r#EN_STRING_UNDERSCORE \{ .ENDNOTE_STRING_UNDERSCORE 2 \} +. if !d$EN_TITLE \{\ +. ie \\n[#DOC_TYPE]=2 \{\ +. ie '\\*[$CHAPTER]'' \{ .ENDNOTE_TITLE "\\*[$CHAPTER_STRING]" \} +. el \{ .ENDNOTE_TITLE "\\*[$CHAPTER_STRING] \\*[$CHAPTER]" \} +. \} +. el \{ .ENDNOTE_TITLE "\\*[$TITLE]" \} +. \} +. if !d$EN_TITLE_FAM \{ .ENDNOTE_TITLE_FAM \\*[$DOC_FAM] \} +. if !d$EN_TITLE_QUAD \{ .ENDNOTE_TITLE_QUAD LEFT \} +. if !r#EN_TITLE_UNDERSCORE \{ .ENDNOTE_TITLE_UNDERSCORE \} +. if !d$EN_NUMBER_FAM \{ .ENDNOTE_NUMBER_FAMILY \\*[$DOC_FAM] \} +. if !r#EN_NUMBERS_ALIGN_LEFT \{\ +. if !r#EN_NUMBERS_ALIGN_RIGHT \{ .ENDNOTE_NUMBERS_ALIGN_RIGHT 2 \} +. \} +\# String defaults for both PRINTSTYLEs +. if !d$ATTRIBUTE_STRING \{ .ATTRIBUTE_STRING "by" \} +. if \\n[#USER_DEF_HDRFTR_LEFT]=0 \{ .ds $HDRFTR_LEFT \\*[$AUTHOR_1] \} +. rr #USER_DEF_HDRFTR_LEFT +. if \\n[#USER_DEF_HDRFTR_RIGHT]=0 \{ .ds $HDRFTR_RIGHT \\*[$TITLE] \} +. rr #USER_DEF_HDRFTR_RIGHT +. if !d$FINIS_STRING \{ .FINIS_STRING "END" \} +\# Defaults for printstyle TYPEWRITE +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#UNDERLINE_QUOTES]=1 \{ .UNDERLINE_QUOTES \} +. if \\n[#UNDERLINE_QUOTES]=0 \{ .UNDERLINE_QUOTES OFF \} +. if !r#Q_OFFSET_VALUE \{ .QUOTE_INDENT 2 \} +. if !r#EPI_OFFSET_VALUE \{ .EPIGRAPH_INDENT 2 \} +. if !d$LINEBREAK_CHAR \{ .LINEBREAK_CHAR * 3 2p \} +. if !d$FN_SIZE_CHANGE \{ .FOOTNOTE_SIZE +0 \} +. if !r#FN_RULE_LENGTH \{ .FOOTNOTE_RULE_LENGTH 2i \} +. if !r#FN_RULE_ADJ \{ .FOOTNOTE_RULE_ADJ 6p \} +. if !r#SLANT_MEANS_SLANT \{\ +. ie \\n[#UNDERLINE_SLANT]=1 \{ .UNDERLINE_SLANT \} +. el \{ .UNDERLINE_SLANT OFF \} +. \} +. if !r#PH_INDENT \{ .PARAHEAD_INDENT \\n[#PP_INDENT]u/2u \} +. if !r#EN_PP_INDENT \{ .ENDNOTE_PARA_INDENT \\n[#PP_INDENT] \} +. \} +\# Defaults for printstyle TYPESET +. if \\n[#PRINT_STYLE]=2 \{\ +. if !#DOCHEADER_LEAD \{ .DOCHEADER_LEAD +0 \} +. if !d$TITLE_FAM \{ .TITLE_FAMILY \\*[$DOC_FAM] \} +. if !d$TITLE_FT \{ .TITLE_FONT B \} +. if !d$TITLE_SIZE_CHANGE \{\ +. ie \\n[#DOC_TYPE]=2 \{ .TITLE_SIZE +4 \} +. el \{ .TITLE_SIZE +3.5 \} +. \} +. if !d$SUBTITLE_FAM \{ .SUBTITLE_FAMILY \\*[$DOC_FAM] \} +. if !d$SUBTITLE_FT \{ .SUBTITLE_FONT R \} +. if !d$SUBTITLE_SIZE_CHANGE \{ .SUBTITLE_SIZE +0 \} +. if !d$AUTHOR_FAM \{ .AUTHOR_FAMILY \\*[$DOC_FAM] \} +. if !d$AUTHOR_FT \{ .AUTHOR_FONT I \} +. if !d$AUTHOR_SIZE_CHANGE \{ .AUTHOR_SIZE +0 \} +. if !d$DOCTYPE_FAM \{ .DOCTYPE_FAMILY \\*[$DOC_FAM] \} +. if !d$DOCTYPE_FT \{ .DOCTYPE_FONT BI \} +. if !d$DOCTYPE_SIZE_CHANGE \{ .DOCTYPE_SIZE +3 \} +. if !d$HDRFTR_LEFT_FAM \{ .HDRFTR_LEFT_FAMILY \\*[$DOC_FAM] \} +. if !d$HDRFTR_LEFT_FT \{ .HDRFTR_LEFT_FONT R \} +. if \\n[#HDRFTR_LEFT_CAPS] \{\ +. if !d$HDRFTR_LEFT_SIZE_CHANGE \{ .HDRFTR_LEFT_SIZE -2 \} +. \} +. if !d$HDRFTR_LEFT_SIZE_CHANGE \{ .HDRFTR_LEFT_SIZE -.5 \} +. if !d$HDRFTR_CENTER_FAM \{ .HDRFTR_CENTER_FAMILY \\*[$DOC_FAM] \} +. if !d$HDRFTR_CENTER_FT \{ .HDRFTR_CENTER_FONT I \} +. if \\n[#HDRFTR_CENTER_CAPS] \{\ +. if !d$HDRFTR_CENTER_SIZE_CHANGE \{ .HDRFTR_CENTER_SIZE -2 \} +. \} +. if !d$HDRFTR_CENTER_SIZE_CHANGE \{ .HDRFTR_CENTER_SIZE -.5 \} +. if !d$HDRFTR_RIGHT_FAM \{ .HDRFTR_RIGHT_FAMILY \\*[$DOC_FAM] \} +. if !d$HDRFTR_RIGHT_FT \{ .HDRFTR_RIGHT_FONT R \} +. if \\n[#HDRFTR_RIGHT_CAPS] \{\ +. if !d$HDRFTR_RIGHT_SIZE_CHANGE \{ .HDRFTR_RIGHT_SIZE -2 \} +. \} +. if !d$HDRFTR_RIGHT_SIZE_CHANGE \{ .HDRFTR_RIGHT_SIZE -.5 \} +. if !d$HEAD_FAM \{ .HEAD_FAMILY \\*[$DOC_FAM] \} +. if !d$HEAD_FT \{ .HEAD_FONT B \} +. if !d$HEAD_SIZE_CHANGE \{ .HEAD_SIZE +1 \} +. if !r#HEAD_SPACE \{ .HEAD_SPACE \} +. if !d$SH_FAM \{ .SUBHEAD_FAMILY \\*[$DOC_FAM] \} +. if !d$SH_FT \{ .SUBHEAD_FONT B \} +. if !d$SH_SIZE_CHANGE \{ .SUBHEAD_SIZE +.5 \} +. if !d$PH_FAM \{ .PARAHEAD_FAMILY \\*[$DOC_FAM] \} +. if !d$PH_FT \{ .PARAHEAD_FONT BI \} +. if !d$PH_SIZE_CHANGE \{ .PARAHEAD_SIZE -.25 \} +. if !r#PH_INDENT \{ .PARAHEAD_INDENT \\n[#PP_INDENT]u/2u \} +. if !d$QUOTE_FAM \{ .QUOTE_FAMILY \\*[$DOC_FAM] \} +. if !d$QUOTE_FT \{ .QUOTE_FONT I \} +. if !d$QUOTE_SIZE_CHANGE \{ .QUOTE_SIZE +0 \} +. if !r#Q_OFFSET_VALUE \{ .QUOTE_INDENT 3 \} +. if !d$BQUOTE_FAM \{ .BLOCKQUOTE_FAMILY \\*[$DOC_FAM] \} +. if !d$BQUOTE_FT \{ .BLOCKQUOTE_FONT R \} +. if !d$BQUOTE_SIZE_CHANGE \{ .BLOCKQUOTE_SIZE -1 \} +. if !d$BQUOTE_QUAD \{ .BLOCKQUOTE_QUAD LEFT \} +. if !d$EPI_FAM \{ .EPIGRAPH_FAMILY \\*[$DOC_FAM] \} +. if !d$EPI_FT \{ .EPIGRAPH_FONT R \} +. if !d$EPI_SIZE_CHANGE \{ .EPIGRAPH_SIZE -1.5 \} +. if !r#EPI_AUTOLEAD \{ .EPIGRAPH_AUTOLEAD 2 \} +. if !d$EPI_QUAD \{ .EPIGRAPH_QUAD \\*[$DOC_QUAD] \} +. if !r#EPI_OFFSET_VALUE \{ .EPIGRAPH_INDENT 3 \} +. if !d$LINEBREAK_CHAR \{ .LINEBREAK_CHAR * 3 3p \} +. if !r#FN_RULE_LENGTH \{ .FOOTNOTE_RULE_LENGTH 4P \} +. if !r#FN_RULE_ADJ \{ .FOOTNOTE_RULE_ADJ 3p \} +. if !d$FN_SIZE_CHANGE \{ .FOOTNOTE_SIZE -2 \} +. if !r#FN_AUTOLEAD \{ .FOOTNOTE_AUTOLEAD 2 \} +. if !r#EN_PS \{ .ENDNOTE_PT_SIZE \\n[#DOC_PT_SIZE]u \} +. if !r#EN_LEAD \{ .ENDNOTE_LEAD 13.5p \} +. if !d$EN_STRING_FT \{ .ENDNOTE_STRING_FONT B \} +. if !d$EN_STRING_SIZE_CHANGE \{ .ENDNOTE_STRING_SIZE +1 \} +. if !d$EN_TITLE_FT \{ .ENDNOTE_TITLE_FONT B \} +. if !d$EN_TITLE_SIZE_CHANGE \{ .ENDNOTE_TITLE_SIZE 0 \} +. if !d$EN_NUMBER_FT \{ .ENDNOTE_NUMBER_FONT B \} +. if !$EN_NUMBER_SIZE_CHANGE \{ .ENDNOTE_NUMBER_SIZE 0 \} +. if !r#EN_PP_INDENT \{ .ENDNOTE_PARA_INDENT 1.5m \} +. \} +. TRAPS +. if \\n[#PRINT_STYLE]=1 \{ .nr #IGNORE 1 \} +.END +\# +\# ==================================================================== +\# +\# +++START THE DOCUMENT+++ +\# +\# THE START MACRO +\# --------------- +\# *Arguments: +\# +\# *Function: +\# Reads in default document style parameters and any parameter +\# the user has changed before issuing START. +\# Using the information gathered in the opening macros, +\# prints appropriate title (or chapter #), subtitle, author +\# and document type (if appropriate). +\# *Notes: +\# The .PRINT \& (zero-width character) is required to get the +\# subsequent .sp request to work as advertised. +\# +\# The overall document line length, family, and point-size +\# are stored in #DOC_L_LENGTH, $DOC_FAM, and #DOC_PT_SIZE for +\# use in the HEADER and FOOTER macros. +\# +.MAC START END +. if !\\n[#PRINT_STYLE] \{\ +. PRINTSTYLE TYPEWRITE +. PRINT \& +. po 6P +. ll 39P +. ta \\n(.lu +. sp |1i-1v +. CENTER +. PRINT "You neglected to enter a PRINTSTYLE" +. fl +. ab PRINTSTYLE missing +. \} +. nr #DOCS 1 +. DEFAULTS +. if \\n[#COLLATE] \{\ +. COPYSTYLE \\*[$COPY_STYLE] +. nr #HEADERS_ON \\n[#HEADER_STATE] +. if \\n[#PAGE_NUM_V_POS]=1 \{ .nr #PAGINATE \\n[#PAGINATION_STATE] \} +. sp |\\n[#HEADER_MARGIN]u +. PRINT \& +. \} +\# +. if \\n[#PRINT_PAGENUM_ON_PAGE_1] \{\ +. sp |\\n[#HEADER_MARGIN]u +. PRINT_PAGE_NUMBER +. \} +. rr #COLLATE +. rr #PAGINATION_STATE +\# +. ie \\n[#DOC_HEADER]=0 \{\ +. PRINT \& +. if \\n[#DOC_TYPE]=4 \{\ +. if !'\\n(.z'' \{ .di \} +. \} +. ie r#ADVANCE_FROM_TOP \{ .sp |\\n[#ADVANCE_FROM_TOP]u-1v \} +. el \{ .sp |\\n[#T_MARGIN]u-1v \} +. PP +. nr #PP 0 +. rr #DOC_HEADER +. if r#ADVANCE_FROM_TOP \{ .rr #ADVANCE_FROM_TOP \} +. \} +. el \{\ +. nr #DOCHEADER_LINES 0 1 +. if \\n[#PRINT_STYLE]=2 \{ .LS \\n[#DOC_LEAD]u+\\n[#DOCHEADER_LEAD_ADJ]u \} +. nr #DOCHEADER_LEAD \\n[#LEAD] +\# Default +. if \\n[#DOC_TYPE]=1 \{\ +. PRINT \& +. sp |\\n[#DOCHEADER_ADVANCE]u-1v +. ev TITLE +. CENTER +. L_MARGIN \\n[#DOC_L_MARGIN]u +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \} +. el \{ .vs \\n[#DOC_LEAD]u \} +. CAPS +. if !'\\*[$TITLE]'' \{ .UNDERSCORE "\\*[$TITLE]\} +. CAPS OFF +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$TITLE_FAM] +. FT \\*[$TITLE_FT] +. PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$TITLE_SIZE_CHANGE] +. LS \\n[#DOCHEADER_LEAD]u +. PRINT \\*[$TITLE] +. \\n+[#DOCHEADER_LINES] +. CAPS OFF +. \} +. ev +. ev SUBTITLE +. CENTER +. L_MARGIN \\n[#DOC_L_MARGIN]u +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if !'\\*[$SUBTITLE]'' \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \} +. el \{ .vs \\n[#DOC_LEAD]u \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$SUBTITLE_FAM] +. FT \\*[$SUBTITLE_FT] +. PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$SUBTITLE_SIZE_CHANGE] +. LS \\n[#DOCHEADER_LEAD]u +. \} +. PRINT \\*[$SUBTITLE] +. \\n+[#DOCHEADER_LINES] +. \} +. if '\\*[$SUBTITLE]'' \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. ALD \\n[#DOC_LEAD]u +. \} +. \} +. ev +. ev AUTHOR +. CENTER +. L_MARGIN \\n[#DOC_L_MARGIN]u +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if !'\\*[$AUTHOR_1]'' \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u \} +. el \{ .vs \\n[#DOC_LEAD]u/2u \} +. if !d$SUBTITLE \{\ +. ie \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \} +. el \{ .ALD \\n[#DOC_LEAD]u*2u \} +. \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$AUTHOR_FAM] +. FT \\*[$AUTHOR_FT] +. PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$AUTHOR_SIZE_CHANGE] +. LS \\n[#DOCHEADER_LEAD]u +. \} +. PRINT \\*[$ATTRIBUTE_STRING] +. \\n+[#DOCHEADER_LINES] +. nr #AUTHORS \\n[#AUTHOR_NUM] +. nr #NEXT_AUTHOR 0 1 +. while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\ +. PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]] +. \\n+[#DOCHEADER_LINES] +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#AUTHOR_LINES]=1 \{\ +. ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u \} +. el \{ .RLD \\n[#DOC_LEAD]u \} +. \} +. \} +. \} +. ev +. \} +\# Chapter +. if \\n[#DOC_TYPE]=2 \{\ +. PRINT \& +. sp |\\n[#DOCHEADER_ADVANCE]u-1v +. ev TITLE +. L_MARGIN \\n[#DOC_L_MARGIN]u +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. CENTER +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \} +. el \{ .vs \\n[#DOC_LEAD]u \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$TITLE_FAM] +. FT \\*[$TITLE_FT] +. PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$TITLE_SIZE_CHANGE] +. LS \\n[#DOC_LEAD]u +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. CAPS +. ie '\\*[$CHAPTER]'' \{ .PRINT \\*[$CHAPTER_STRING] \} +. el \{ .PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] \} +. CAPS OFF +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. ie '\\*[$CHAPTER]'' \{ .PRINT \\*[$CHAPTER_STRING] \} +. el \{ .PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] \} +. \} +. ev +. \} +\# Named +. if \\n[#DOC_TYPE]=3 \{\ +. PRINT \& +. sp |\\n[#DOCHEADER_ADVANCE]u-1v +. ev TITLE +. CENTER +. L_MARGIN \\n[#DOC_L_MARGIN]u +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \} +. el \{ .vs \\n[#DOC_LEAD]u \} +. CAPS +. if !'\\*[$TITLE]'' \{ .UNDERSCORE "\\*[$TITLE]\} +. CAPS OFF +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$TITLE_FAM] +. FT \\*[$TITLE_FT] +. PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$TITLE_SIZE_CHANGE] +. LS \\n[#DOCHEADER_LEAD]u +. PRINT \\*[$TITLE] +. \\n+[#DOCHEADER_LINES] +. CAPS OFF +. \} +. ev +. ev SUBTITLE +. CENTER +. L_MARGIN \\n[#DOC_L_MARGIN]u +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if !'\\*[$SUBTITLE]'' \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \} +. el \{ .vs \\n[#DOC_LEAD]u \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$SUBTITLE_FAM] +. FT \\*[$SUBTITLE_FT] +. PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$SUBTITLE_SIZE_CHANGE] +. LS \\n[#DOCHEADER_LEAD]u +. \} +. PRINT \\*[$SUBTITLE] +. \\n+[#DOCHEADER_LINES] +. \} +. if '\\*[$SUBTITLE]'' \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. ALD \\n[#DOC_LEAD]u +. \} +. \} +. ev +. ev AUTHOR +. CENTER +. L_MARGIN \\n[#DOC_L_MARGIN]u +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if !'\\*[$AUTHOR_1]'' \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u \} +. el \{ .vs \\n[#DOC_LEAD]u/2u \} +. if !d$SUBTITLE \{\ +. ie \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \} +. el \{ .ALD \\n[#DOC_LEAD]u*2u \} +. \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$AUTHOR_FAM] +. FT \\*[$AUTHOR_FT] +. PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$AUTHOR_SIZE_CHANGE] +. LS \\n[#DOCHEADER_LEAD]u +. \} +. PRINT \\*[$ATTRIBUTE_STRING] +. \\n+[#DOCHEADER_LINES] +. nr #AUTHORS \\n[#AUTHOR_NUM] +. nr #NEXT_AUTHOR 0 1 +. while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\ +. PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]] +. \\n+[#DOCHEADER_LINES] +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#AUTHOR_LINES]=1 \{\ +. ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u \} +. el \{ .RLD \\n[#DOC_LEAD]u \} +. \} +. \} +. \} +. ev +. ev DOCTYPE +. CENTER +. L_MARGIN \\n[#DOC_L_MARGIN]u +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. vs \\n[#DOC_LEAD]u +. if '\\*[$AUTHOR_1]'' \{\ +. ie !d$SUBTITLE \{\ +. ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u*2u \} +. el \{ .RLD \\n[#DOC_LEAD]u \} +. \} +. el \{\ +. ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u*2u \} +. el \{ .RLD \\n[#DOC_LEAD]u \} +. \} +. \} +. ie \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u*2u \} +. el \{ .ALD \\n[#DOC_LEAD]u \} +. UNDERSCORE2 "\\*[$DOC_TYPE] +. if \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$DOCTYPE_FAM] +. FT \\*[$DOCTYPE_FT] +. PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$DOCTYPE_SIZE_CHANGE] +. LS \\n[#DOCHEADER_LEAD]u +. ALD \\n[#DOCHEADER_LEAD]u +. \\n+[#DOCHEADER_LINES] +. UNDERSCORE "\\*[$DOC_TYPE] +. \\n+[#DOCHEADER_LINES] +. \} +. ev +. \} +. if !\\n[#DOC_TYPE]=4 \{\ +. if \\n[#PRINT_STYLE]=2 \{\ +. nr #DEPTH_1 \\n[#DOCHEADER_LINES]*\\n[#DOCHEADER_LEAD] +. nr #DEPTH_2 \\n[#DOCHEADER_LINES]*\\n[#DOC_LEAD] +. ie \\n[#DEPTH_1]<\\n[#DEPTH_2] \{\ +. nr #DOCHEADER_SPACE_ADJ \\n[#DEPTH_2]-\\n[#DEPTH_1] +. \} +. el \{\ +. nr #DOCHEADER_SPACE_ADJ \\n[#DEPTH_1]-\\n[#DEPTH_2] +. \} +. nr #DOCHEADER_EXTRA_SPACE \\n[#DOCHEADER_SPACE_ADJ] \\n[#DOC_LEAD] +. while \\n[#DOCHEADER_EXTRA_SPACE]>\\n[#DOC_LEAD] \{\ +. \\n-[#DOCHEADER_EXTRA_SPACE] +. \} +. if \\n[#DOCHEADER_EXTRA_SPACE]>0 \{\ +. ie \\n[#DOCHEADER_LEAD_ADJ]<0 \{\ +. ALD \\n[#DOCHEADER_EXTRA_SPACE]u +. \} +. el \{ .ALD \\n[#DOC_LEAD]u-\\n[#DOCHEADER_EXTRA_SPACE]u \} +. \} +. \} +. if \\n[#PRINT_STYLE]=1 \{ .ALD \\n[#DOC_LEAD]u \} +. if \\n[#PRINT_STYLE]=2 \{ .ALD \\n[#DOC_LEAD]u*2u \} +. if \\n[#COLUMNS] \{\ +. nr #COL_NUM 0 1 +. nr #L_LENGTH_FOR_EPI \\n[#L_LENGTH] +. po \\n[#COL_\\n+[#COL_NUM]_L_MARGIN]u +. LL \\n[#COL_L_LENGTH]u +. ta \\n(.lu +. mk dc +. \} +. \} +. \} +. rr #DOCHEADER_LEAD +. rr #DOCHEADER_LEAD_ADJ +. rr #DEPTH_1 +. rr #DEPTH_2 +. rr #DOCHEADER_ADVANCE +. rr #ADVANCE_FROM_TOP +. rr #DOCHEADER_SPACE_ADJ +. rr #DOCHEADER_LINES +. rr #DOCHEADER_EXTRA_SPACE +. rr #AUTHORS +. rr #NEXT_AUTHOR +. rr #AUTHOR_NUM +. rr #NUM_AUTHORS +. nr #START 1 +. nr #START_FOR_FOOTERS 1 +.END +\# +\# ==================================================================== +\# +\# +++MACROS TO CHANGE SOME DEFAULTS+++ +\# +\# DOCUMENT HEADER +\# --------------- +\# *Argument: +\# | [distance to advance from top of page] +\# *Function: +\# Turns printing of document header on or off. If a second argument +\# in units of measure is given, advances that distance from the +\# top of the page without printing the document header. +\# *Notes: +\# Default is on. If the 1st argument is (which turns +\# document headers off), the optional 2nd argument may be given +\# (with a unit of measure). +\# +.MAC DOCHEADER END +. ie '\\$1'' \{ .nr #DOC_HEADER 1 \} +. el \{\ +. if !'\\$2'' \{ .nr #ADVANCE_FROM_TOP (\\$2) \} +. nr #DOC_HEADER 0 +. \} +.END +\# +\# +\# DOCUMENT HEADER LEADING +\# ----------------------- +\# *Arguments: +\# <+|- amount by which to in/decrease leading of doc header> +\# *Function: +\# Stores user supplied lead in/decrease in register #DOCHEADER_LEAD_ADJ. +\# *Notes: +\# A unit of measure must be supplied. Decimal fractions OK. +\# Default is +0, i.e. same as DOC_LEAD. +\# +.MAC DOCHEADER_LEAD END +. nr #DOCHEADER_LEAD_ADJ (\\$1) +.END +\# +\# +\# DOCHEADER ADVANCE +\# ----------------- +\# *Arguments: +\# +\# *Function: +\# Creates register #DOCHEADER_ADVANCE, used in START. +\# *Notes: +\# Unit of measure required. +\# Default is same as T_MARGIN. +\# +.MAC DOCHEADER_ADVANCE END +. nr #DOCHEADER_ADVANCE (\\$1) +.END +\# +\# +\# TITLE FAMILY +\# ------------ +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $TITLE_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC TITLE_FAMILY END +. ds $TITLE_FAM \\$1 +.END +\# +\# +\# TITLE FONT +\# ---------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $TITLE_FT. +\# *Notes: +\# Default is bold. +\# +.MAC TITLE_FONT END +. ds $TITLE_FT \\$1 +.END +\# +\# +\# TITLE SIZE +\# ---------- +\# *Argument: +\# <+|- number of points by which to in/decrease title at start +\# of the document (relative to running text)> +\# *Function: +\# Creates string $TITLE_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign, with no space afterwards. +\# Fractional point sizes are allowed. +\# Default is +3.5 for printstyle TYPESET DEFAULT | STORY | NAMED; +\# 4 for TYPESET CHAPTER; +0 for TYPEWRITE. +\# +.MAC TITLE_SIZE END +. ds $TITLE_SIZE_CHANGE \\$1 +.END +\# +\# +\# SUBTITLE FAMILY +\# --------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $SUBTITLE_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC SUBTITLE_FAMILY END +. ds $SUBTITLE_FAM \\$1 +.END +\# +\# +\# SUBTITLE FONT +\# ------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $SUBTITLE_FT. +\# *Notes: +\# Default is same as running text. +\# +.MAC SUBTITLE_FONT END +. ds $SUBTITLE_FT \\$1 +.END +\# +\# +\# SUBTITLE SIZE +\# ------------- +\# *Argument: +\# <+|- number of points by which to in/decrease subtitle at start +\# of the document (relative to running text)> +\# *Function: +\# Creates or modifies string $SUBTITLE_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign with no space afterwards. +\# Fractional point sizes are allowed. +\# Default is +0. +\# +.MAC SUBTITLE_SIZE END +. ds $SUBTITLE_SIZE_CHANGE \\$1 +.END +\# +\# +\# AUTHOR FAMILY +\# ------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $AUTHOR_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC AUTHOR_FAMILY END +. ds $AUTHOR_FAM \\$1 +.END +\# +\# +\# AUTHOR FONT +\# ----------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $AUTHOR_FT. +\# *Notes: +\# Default is italic. +\# +.MAC AUTHOR_FONT END +. ds $AUTHOR_FT \\$1 +.END +\# +\# +\# AUTHOR SIZE +\# ----------- +\# *Argument: +\# <+|- number of points by which to in/decrease author at start +\# of the document> +\# *Function: +\# Creates or modifies string $AUTHOR_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign with no space afterwards. +\# Fractional point sizes are allowed. +\# Default is same as running text. +\# +.MAC AUTHOR_SIZE END +. ds $AUTHOR_SIZE_CHANGE \\$1 +.END +\# +\# +\# DOCTYPE FAMILY +\# -------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $DOCTYPE_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC DOCTYPE_FAMILY END +. ds $DOCTYPE_FAM \\$1 +.END +\# +\# +\# DOCTYPE FONT +\# ------------ +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $DOCTYPE_FT. +\# *Notes: +\# Default is bold italic. +\# +.MAC DOCTYPE_FONT END +. ds $DOCTYPE_FT \\$1 +.END +\# +\# +\# DOCTYPE SIZE +\# ------------- +\# *Argument: +\# <+|- number of points by which to in/decrease the document +\# type string (relative to running text)> +\# *Function: +\# Creates or modifies string $DOCTYPE_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign with no space afterwards. +\# Fractional point sizes are allowed. +\# Default is +3 for TYPESET; 0 for TYPEWRITE. +\# +.MAC DOCTYPE_SIZE END +. ds $DOCTYPE_SIZE_CHANGE \\$1 +.END +\# +\# +\# DOCUMENT LEFT MARGIN +\# -------------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies register #DOC_L_MARGIN. +\# *Notes: +\# Affects EVERYTHING on the page. +\# +.MAC DOC_LEFT_MARGIN END +. br +. nr #DOC_L_MARGIN (\\$1) +. L_MARGIN \\n[#DOC_L_MARGIN]u +.END +\# +\# +\# DOCUMENT RIGHT MARGIN +\# --------------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies register #DOC_R_MARGIN. +\# *Notes: +\# Affects EVERYTHING on the page. +\# +.MAC DOC_RIGHT_MARGIN END +. br +. nr #DOC_R_MARGIN (\\$1) +. R_MARGIN \\n[#DOC_R_MARGIN] +. nr #DOC_L_LENGTH \\n[#L_LENGTH] +.END +\# +\# +\# DOCUMENT LINE LENGTH +\# -------------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $DOC_L_LENGTH. +\# *Notes: +\# Affects EVERYTHING on the page. +\# +.MAC DOC_LINE_LENGTH END +. br +. nr #DOC_L_LENGTH (\\$1) +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +.END +\# +\# +\# DOCUMENT FAMILY +\# --------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $DOC_FAM. +\# *Notes: +\# Affects everything EXCEPT headers and footers. +\# +.MAC DOC_FAMILY END +. br +. ds $DOC_FAM \\$1 +. FAMILY \\*[$DOC_FAM] +. TITLE_FAMILY \\*[$DOC_FAM] +. SUBTITLE_FAMILY \\*[$DOC_FAM] +. AUTHOR_FAMILY \\*[$DOC_FAM] +. DOCTYPE_FAMILY \\*[$DOC_FAM] +. HEAD_FAMILY \\*[$DOC_FAM] +. SUBHEAD_FAMILY \\*[$DOC_FAM] +. QUOTE_FAMILY \\*[$DOC_FAM] +. BLOCKQUOTE_FAMILY \\*[$DOC_FAM] +. EPIGRAPH_FAMILY \\*[$DOC_FAM] +. HDRFTR_FAMILY \\*[$DOC_FAM] +. PAGENUM_FAMILY \\*[$DOC_FAM] +.END +\# +\# +\# DOCUMENT POINT SIZE +\# ------------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies register $DOC_PT_SIZE. +\# *Notes: +\# DOC_PT_SIZE is the basis for calculating all type sizes in +\# a document. +\# +.MAC DOC_PT_SIZE END +. if \\n[#IGNORE] \{ .return \} +. br +. PT_SIZE \\$1 +. nr #DOC_PT_SIZE \\n[#PT_SIZE] +.END +\# +\# +\# DOCUMENT LEAD +\# ------------- +\# *Argument: +\# [ADJUST] +\# *Function: +\# Creates or modifies register #DOC_LEAD. If the optional +\# ADJUST argument is given, adjusts leading so that the last +\# line of text falls exactly on #B_MARGIN. +\# *Notes: +\# DOC_LEAD is the basis for calculating all leading changes in +\# a document. Default for TYPESET is 16; 24 for TYPEWRITE. +\# +\# Because the visible bottom or footer margin of a page depends +\# on the overall document lead supplied by the register #DOC_LEAD, +\# DOC_LEAD, in the body of a document, should always be associated +\# with the start of a new page (in other words, just before or +\# just after a manual NEWPAGE). +\# +.MAC DOC_LEAD END +. if \\n[#IGNORE] \{ .return \} +. br +. vs \\$1 +. nr #DOC_LEAD \\n[#LEAD] +. if '\\$2'ADJUST' \{ .TRAPS \} +.END +\# +\# ADJUST DOCUMENT LEAD +\# -------------------- +\# *Arguments: +\# | +\# *Function: +\# Adjusts document lead so that the last line of text falls exactly +\# on #B_MARGIN. +\# +.MAC DOC_LEAD_ADJUST END +. ie '\\$1'' \{ .nr #ADJ_DOC_LEAD 1 \} +. el \{ .nr #ADJ_DOC_LEAD 0 \} +.END +\# +\# +\# DOCUMENT QUAD +\# ------------- +\# *Arguments: +\# L | LEFT | R | RIGHT | C | CENTER | CENTRE | J | JUSTIFY +\# *Function: +\# Creates or modifies string $DOC_QUAD. +\# *Notes: +\# While QUAD (from the typesetting macros) can be used before START +\# to change the default document quad, DOC_QUAD *must* be used after +\# the START macro has been invoked. +\# +\# Default is LEFT for printstyle TYPEWRITE, JUSTIFY for printstyle +\# TYPESET. +\# +.MAC DOC_QUAD END +. ds $DOC_QUAD \\$1 +. QUAD \\*[$DOC_QUAD] +.END +\# +\# ==================================================================== +\# +\# +++INTERNATIONALIZATION+++ +\# +\# ATTRIBUTE STRING +\# ---------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $ATTRIBUTE_STRING. +\# *Notes: +\# Default is "by". A blank string ("") may be used if no +\# attribution is desired. +\# +.MAC ATTRIBUTE_STRING END +. ds $ATTRIBUTE_STRING \\$1 +.END +\# +\# +\# CHAPTER STRING +\# -------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $CHAPTER_STRING. +\# *Notes: +\# Default is "chapter". +\# +.MAC CHAPTER_STRING END +. ds $CHAPTER_STRING \\$1 +.END +\# +\# +\# DRAFT STRING +\# ------------ +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $DRAFT_STRING. +\# *Notes: +\# Default is "draft". +\# +.MAC DRAFT_STRING END +. ds $DRAFT_STRING \\$1 +.END +\# +\# +\# REVISION STRING +\# --------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $REVISION_STRING. +\# *Notes: +\# Default is "revision". +\# +.MAC REVISION_STRING END +. ds $REVISION_STRING \\$1 +.END +\# +\# +\# FINIS STRING +\# ------------ +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $FINIS_STRING. +\# *Notes: +\# Default is "END". +\# +.MAC FINIS_STRING END +. nr #FINIS 1 +. CAPS +. ds $FINIS_STRING \\$1 +. CAPS OFF +.END +\# +\# ==================================================================== +\# +\# +++RECTO/VERSO+++ +\# +\# RECTO_VERSO +\# ----------- +\# *Arguments: +\# | +\# *Function: +\# Switches HDRFTR_LEFT and HDRFTR_RIGHT on alternate pages. Also +\# switches page numbers left and right if either is chosen rather +\# than the default centered page numbers. Switches left and right +\# margins if differing values have been entered. +\# *Notes: +\# Default is OFF. +\# +.MAC RECTO_VERSO END +. ie '\\$1'' \{ .nr #RECTO_VERSO 1 \} +. el \{ .nr #RECTO_VERSO 0 \} +.END +\# +\# ==================================================================== +\# +\# +++EPIGRAPHS+++ +\# +\# EPIGRAPH FAMILY +\# --------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $EPI_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC EPIGRAPH_FAMILY END +. ds $EPI_FAM \\$1 +.END +\# +\# +\# EPIGRAPH FONT +\# ------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $EPI_FT. +\# *Notes: +\# Default is same as running text. +\# +.MAC EPIGRAPH_FONT END +. ds $EPI_FT \\$1 +.END +\# +\# +\# EPIGRAPH SIZE +\# ------------- +\# *Argument: +\# <-|+ number of points by which to de/increase point size of epigraphs +\# (relative to running text)> +\# *Function: +\# Creates or modifies string $EPI_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a - or + sign with no space afterwards. +\# Fractional point sizes are allowed. Default -1.5 for printstyle +\# TYPESET; +0 for TYPEWRITE. +\# +.MAC EPIGRAPH_SIZE END +. ds $EPI_SIZE_CHANGE \\$1 +.END +\# +\# +\# EPIGRAPH QUAD +\# ------------- +\# *Arguments: +\# L | LEFT | J | JUSTIFY +\# *Function: +\# Creates or modifies string $EPI_QUAD. +\# *Notes: +\# Default is $DOC_QUAD when BLOCK argument is passed to EPIGRAPH. +\# +.MAC EPIGRAPH_QUAD END +. ds $EPI_QUAD \\$1 +.END +\# +\# +\# EPIGRAPH INDENT +\# --------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies register #EPI_OFFSET_VALUE. +\# *Notes: +\# Default is 2 for TYPEWRITE, 3 for TYPESET. +\# +.MAC EPIGRAPH_INDENT END +. nr #EPI_OFFSET_VALUE \\$1 +.END +\# +\# +\# EPIGRAPH AUTOLEAD +\# ----------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies register #EPI_AUTOLEAD. +\# *Notes: +\# Default is 2 (for TYPESET; TYPEWRITE doesn't require this). +\# +.MAC EPIGRAPH_AUTOLEAD END +. nr #EPI_AUTOLEAD \\$1 +.END +\# +\# +\# EPIGRAPH +\# -------- +\# *Arguments: +\# BLOCK | +\# *Function: +\# Places an epigraph before the document's text, after the +\# document header, or after a HEAD. +\# *Notes: +\# #EPIGRAPH 1 = centered; 2 = block +\# +\# By default, epigraphs are centered, allowing the user +\# to input them on a line per line basis. To change this +\# behaviour, the user can supply the argument BLOCK, which +\# will produce indented, filled text similar to BLOCKQUOTE. +\# +\# If a block epigraph contains more than one para, ALL paras of +\# the epigraph must be preceded by PP. Otherwise, PP is optional. +\# +.MAC EPIGRAPH END +. nr #PP_STYLE 2 +. nr #Q_PP 0 +. if \\n[#START] \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#AUTHOR_LINES]=1 \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. \} +. ie '\\$1'' \{\ +. nr #EPIGRAPH 1 +. ev EPIGRAPH +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +. CHECK_INDENT +. if \\n[#COLUMNS] \{\ +. ie \\n[#START] \{\ +. ll \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. \} +. el \{\ +. ll \\n[#COL_L_LENGTH]u +. ta \\n(.lu +. \} +. \} +. CENTER +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. if '\\*[$EPI_FT]'I' \{\ +. FT I +. \} +. ps 12 +. ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u \} +. el \{ .vs \\n[#DOC_LEAD]u/2u \} +. nr #EPI_LEAD \\n[#LEAD] +. nr #EPI_LEAD_DIFF \\n[#DOC_LEAD]-\\n[#EPI_LEAD] +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$EPI_FAM] +. FT \\*[$EPI_FT] +. PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$EPI_SIZE_CHANGE] +. AUTOLEAD \\n[#EPI_AUTOLEAD] +. nr #EPI_LEAD \\n[#LEAD] +. nr #EPI_LEAD_DIFF \\n[#DOC_LEAD]-\\n[#EPI_LEAD] +. \} +. di EPI_TEXT +. nr #EPI_ACTIVE 1 +. \} +. el \{\ +. ie '\\$1'BLOCK' \{\ +. nr #EPIGRAPH 2 +. ev EPIGRAPH +. ie \\n[#START] \{\ +. ie \\n[#COLUMNS] \{\ +. ll \\n[#L_LENGTH_FOR_EPI]u-(\\n[#PP_INDENT]u*(\\n[#EPI_OFFSET_VALUE]u*2u)) +. ta \\n(.lu +. \} +. el \{\ +. ll \\n[#L_LENGTH]u-(\\n[#PP_INDENT]u*(\\n[#EPI_OFFSET_VALUE]u*2u)) +. ta \\n(.lu +. \} +. \} +. el \{\ +. ll \\n[#L_LENGTH]u-(\\n[#PP_INDENT]u*(\\n[#EPI_OFFSET_VALUE]u*2u)) +. ta \\n(.lu +. if \\n[#COLUMNS] \{\ +. ll \\n[#COL_L_LENGTH]u-(\\n[#PP_INDENT]u*(\\n[#EPI_OFFSET_VALUE]u*2u)) +. ta \\n(.lu +. \} +. CHECK_INDENT +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. if '\\*[$EPI_FT]'I' \{\ +. FT I +. \} +. ps 12 +. ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u \} +. el \{ .vs \\n[#DOC_LEAD]u/2u \} +. QUAD LEFT +. HY OFF +. nr #EPI_LEAD \\n[#LEAD] +. nr #EPI_LEAD_DIFF \\n[#DOC_LEAD]-\\n[#EPI_LEAD] +. di EPI_TEXT +. nr #EPI_ACTIVE 1 +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$EPI_FAM] +. FT \\*[$EPI_FT] +. PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$EPI_SIZE_CHANGE] +. AUTOLEAD \\n[#EPI_AUTOLEAD] +. QUAD \\*[$EPI_QUAD] +. HY +. nr #EPI_LEAD \\n[#LEAD] +. nr #EPI_LEAD_DIFF \\n[#DOC_LEAD]-\\n[#EPI_LEAD] +. di EPI_TEXT +. nr #EPI_ACTIVE 1 +. \} +. \} +. el \{\ +. DO_EPIGRAPH +. \} +. \} +.END +\# +\# +\# DO EPIGRAPH +\# ----------- +\# *Arguments: +\# +\# *Function: +\# Ends diversion started in EPIGRAPH. Makes spacing +\# adjustments to compensate for the difference between epigraph +\# leading and overall document leading, so that the bottom of +\# the pages remain flush. +\# *Notes: +\# In addition to its usual place at the beginning of a +\# document, EPIGRAPH may also be used after HEAD. +\# +.MAC DO_EPIGRAPH END +. br +. di +. REMOVE_INDENT +. ev +. nr #EPI_DEPTH \\n[#DIVER_DEPTH]-\\n[#EPI_LEAD] +. nr #EPI_LINES \\n[#EPI_DEPTH]/\\n[#EPI_LEAD] +. ie \\n[#START] \{\ +. nr #EPI_WHITESPACE (\\n[#DOC_LEAD]*\\n[#EPI_LINES])-\\n[#EPI_DEPTH] +. while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{ .nr #EPI_WHITESPACE -\\n[#DOC_LEAD] \} +. RLD \\n[#DOC_LEAD]u +. ie \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#EPI_WHITESPACE]=\\n[#DOC_LEAD] \{ .ALD \\n[#EPI_WHITESPACE]u/2u \} +. \} +. el \{\ +. if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \{\ +. ALD \\n[#EPI_LEAD_DIFF]u+(\\n[#EPI_WHITESPACE]u/2u) +. \} +. if \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\ +. ALD \\n[#EPI_LEAD_DIFF]u+(\\n[#EPI_WHITESPACE]u/2u)-\\n[#DOC_LEAD]u +. \} +. \} +. \} +. el \{\ +. ie \\n[#EPI_DEPTH]<\\n[#TRAP_DISTANCE] \{\ +. nr #EPI_FITS 1 +. nr #EPI_WHITESPACE (\\n[#DOC_LEAD]*\\n[#EPI_LINES])-\\n[#EPI_DEPTH] +. while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{ .nr #EPI_WHITESPACE -\\n[#DOC_LEAD] \} +. ie \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#EPI_WHITESPACE]=\\n[#DOC_LEAD] \{ .ALD \\n[#EPI_WHITESPACE]u/2u \} +. \} +. el \{\ +. if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \{\ +. ALD \\n[#EPI_LEAD_DIFF]u+(\\n[#EPI_WHITESPACE]u/2u) +. \} +. if \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\ +. ALD \\n[#EPI_LEAD_DIFF]u+(\\n[#EPI_WHITESPACE]u/2u)-\\n[#DOC_LEAD]u +. \} +. \} +. \} +. el \{\ +. nr #EPI_LINES_TO_TRAP 0 1 +. while \\n[#EPI_LEAD]*\\n+[#EPI_LINES_TO_TRAP]<\\n[#TRAP_DISTANCE] \{ .nr #LOOP 1 \} +. nr #EPI_LINES_TO_TRAP -1 +. nr #EPI_WHITESPACE (\\n[#EPI_LINES_TO_TRAP]*\\n[#DOC_LEAD])-(\\n[#EPI_LINES_TO_TRAP]*\\n[#EPI_LEAD]) +. while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{ .nr #EPI_WHITESPACE -\\n[#DOC_LEAD] \} +. if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \{ .ALD \\n[#EPI_WHITESPACE]u \} +. if \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{ .ALD \\n[#EPI_WHITESPACE]u-\\n[#DOC_LEAD]u \} +. \} +. \} +. if \\n[#EPIGRAPH]=1 \{\ +. po \\n[#L_MARGIN]u +. if \\n[#COLUMNS] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \} +. \} +. if \\n[#EPIGRAPH]=2 \{\ +. nr #EPI_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE]) +. if \\n[#COLUMNS] \{\ +. nr #EPI_OFFSET \\n[#COL_\\n[#COL_NUM]_L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE]) +. \} +. po \\n[#EPI_OFFSET]u +. \} +. nf +. EPI_TEXT +. br +. ie \\n[#START] \{\ +. if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \{\ +. ALD \\n[#EPI_WHITESPACE]u/2u +. \} +. if \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\ +. ALD (\\n[#EPI_WHITESPACE]u/2u)-\\n[#DOC_LEAD]u +. \} +. \} +. el \{\ +. rr #EPI_ACTIVE +. ie \\n[#EPI_FITS] \{\ +. ie \\n[#FN_FOR_EPI] \{\ +. nr #EPI_LINES_TO_END 1 +. nr #EPI_WHITESPACE (\\n[#EPI_LINES_TO_END]*\\n[#DOC_LEAD])-(\\n[#EPI_LINES_TO_END]*\\n[#EPI_LEAD]) +. while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{ .nr #EPI_WHITESPACE -\\n[#DOC_LEAD] \} +. ALD \\n[#EPI_WHITESPACE]u-(\\n[#DOC_LEAD]u-\\n[#EPI_LEAD]u) +. \} +. el \{\ +. ie \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#EPI_WHITESPACE]=\\n[#DOC_LEAD] \{ .ALD \\n[#EPI_WHITESPACE]u \} +. \} +. el \{\ +. if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \{\ +. ALD \\n[#EPI_WHITESPACE]u/2u +. \} +. if \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\ +. ALD (\\n[#EPI_WHITESPACE]u/2u)-\\n[#DOC_LEAD]u +. \} +. \} +. \} +. \} +. el \{\ +. nr #EPI_LINES_TO_END \\n[#EPI_LINES]-\\n[#EPI_LINES_TO_TRAP] +. if \\n[#LOOP] \{. nr #EPI_LINES_TO_END +1 \} +. rr #LOOP +. nr #EPI_WHITESPACE (\\n[#EPI_LINES_TO_END]*\\n[#DOC_LEAD])-(\\n[#EPI_LINES_TO_END]*\\n[#EPI_LEAD]) +. while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{ .nr #EPI_WHITESPACE -\\n[#DOC_LEAD] \} +. ALD \\n[#EPI_WHITESPACE]u-(\\n[#DOC_LEAD]u-\\n[#EPI_LEAD]u) +. if \\n[#PRINT_STYLE]=1 \{\ +. if !\\n[#SINGLE_SPACE] \{\ +. nr #EPI_LINES_EVEN \\n[#EPI_LINES_TO_END]%2 +. ie \\n[#EPI_LINES_EVEN] \{ .ALD .5v \} +. el \{ .RLD .5v \} +. rr #EPI_LINES_EVEN +. \} +. \} +. \} +. \} +. nr #PP_STYLE 1 +. rr #EPI_FITS +. ALD \\n[#DOC_LEAD]u +. QUAD \\*[$DOC_QUAD] +. po \\n[#L_MARGIN]u +. if \\n[#COLUMNS] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \} +. if \\n[#START] \{\ +. if \\n[#COLUMNS] \{\ +. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u +. mk dc +. \} +. \} +.END +\# +\# ==================================================================== +\# +\# +++FINIS MACRO+++ +\# +\# FINIS +\# ----- +\# *Arguments: +\# +\# *Function: +\# Deposits --END-- at the end of a document. +\# +.MAC FINIS END +. if \\n[#TAB_ACTIVE] \{ .TQ \} +. if \\n[#INDENT_ACTIVE] \{ .IQ CLEAR \} +. FOOTERS OFF +. PAGINATION OFF +. nr #EM_ADJUST (1m/8) +. if \\n[#COLUMNS] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \} +. ALD \\n[#DOC_LEAD]u +. CENTER +. if \\n[#PRINT_STYLE]=1 \{ .PRINT "--\\*[$FINIS_STRING]--\} +. if \\n[#PRINT_STYLE]=2 \{\ +. PRINT "\v'-\\n[#EM_ADJUST]u'\(em\v'+\\n[#EM_ADJUST]u'\\*[$FINIS_STRING]\v'-\\n[#EM_ADJUST]u'\*[FU1]\(em +. \} +.END +\# +\# ==================================================================== +\# +\# +++HEADERS/FOOTERS+++ +\# +\# Define a string so that the current page number can be incorporated +\# into the strings for hdrftr left, right, and center. NOTE: This is +\# not the same thing as using the shortform # in hdrftr strings. +\# +.ds PAGE# \En[#PAGENUMBER] +\# +\# +\# HDRFTR FAMILY +\# ------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $HDRFTR_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC HDRFTR_FAMILY END +. ds $HDRFTR_FAM \\$1 +.END +\# +\# +\# HDRFTR SIZE +\# ----------- +\# *Argument: +\# <+|-number of points by which to in/decrease point size of +\# header/footers (relative to running text)> +\# *Function: +\# Creates or modifies string $HDRFTR_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign. No space afterwards. +\# Fractional point sizes are allowed. Default is +0. +\# +\# By default, header/footers print the author .5 points smaller +\# than the base point size of running text, center titles +\# (Chapter, Draft, Revision, etc.) .5 points smaller +\# than running text (in italics), and the document title 2 full +\# points smaller than running text (in caps). The HDRFTR_SIZE +\# macro changes the overall size for all three parts while +\# maintaining the internal size changes. +\# +\# In other words, if the user likes the header/footers but wants +\# them a bit bigger or a bit smaller, s/he should use HDRFTR_SIZE. +\# +.MAC HDRFTR_SIZE END +. ds $HDRFTR_SIZE_CHANGE \\$1 +.END +\# +\# +\# HDRFTR RULE GAP +\# --------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies register #HDRFTR_RULE_GAP to hold amount +\# of space between header/footer and header/footer rule. +\# *Notes: +\# Default is 4p. +\# +.MAC HDRFTR_RULE_GAP END +. nr #HDRFTR_RULE_GAP (\\$1) +.END +\# +\# +\# HDRFTR LEFT +\# ----------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $HDRFTR_LEFT. +\# Creates register #USER_DEF_HDRFTR_LEFT, which, if 1, +\# overrides the $HDRFTR_LEFT string created by default +\# in DEFAULTS. +\# *Notes: +\# Especially useful if doc has more than one author, and a list +\# of authors by last name is desired in header/footers. +\# Default is author. +\# +\# If the argument is the # character, simply prints the current +\# page number. +\# +\# If the user wants to *incorporate* the page number into the string, +\# \*[PAGE#] must be used. For example, if the user wants to put +\# an elipsis before the page number in the string, s/he should use +\# ...\*[PAGE#], not ...# +\# +.MAC HDRFTR_LEFT END +. nr #USER_DEF_HDRFTR_LEFT 1 +. ds $HDRFTR_LEFT \\$1 +.END +\# +\# +\# HDRFTR LEFT FAMILY +\# ------------------ +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $HDRFTR_LEFT_FAM. +\# +.MAC HDRFTR_LEFT_FAMILY END +. ds $HDRFTR_LEFT_FAM \\$1 +.END +\# +\# +\# HDRFTR LEFT FONT +\# ---------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $HDRFTR_LEFT_FT. +\# +.MAC HDRFTR_LEFT_FONT END +. ds $HDRFTR_LEFT_FT \\$1 +.END +\# +\# +\# HDRFTR LEFT SIZE +\# ---------------- +\# *Argument: +\# <+|- number of points to in/decrease size of left string in +\# header/footers (relative to running text)> +\# *Function: +\# Creates or modifies string HDRFTR_LEFT_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign. No space afterwards. +\# Fractional point sizes are allowed. +\# Default is -.5 for printstyle TYPESET; if all caps, -2 +\# Has no effect in TYPEWRITE. +\# +.MAC HDRFTR_LEFT_SIZE END +. ds $HDRFTR_LEFT_SIZE_CHANGE \\$1 +.END +\# +\# +\# HDRFTR LEFT CAPS +\# ---------------- +\# *Argument: +\# | +\# *Function: +\# Turns capitalisation of $HDRFTR_LEFT (typically, the author of +\# the document) on or off. +\# *Notes: +\# Default is on. +\# +.MAC HDRFTR_LEFT_CAPS END +. ie '\\$1'' \{\ +. nr #HDRFTR_LEFT_CAPS 1 +. \} +. el \{\ +. nr #HDRFTR_LEFT_CAPS 0 +. ds $HDRFTR_RIGHT_SIZE_CHANGE +0 +. \} +.END +\# +\# +\# HDRFTR CENTER +\# ------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $HDRFTR_CENTER. +\# Creates register #USER_DEF_HDRFTR_CENTER, which, if 1, +\# overrides the $HDRFTR_CENTER string created by default +\# in COPYSTYLE. +\# *Notes: +\# Default is document type if DOCTYPE NAMED, Chapter # if DOCTYPE +\# CHAPTER, draft and revision number if COPYSTYLE DRAFT. +\# +\# If the argument is the # character, simply prints the current +\# page number. +\# +\# If the user wants to *incorporate* the page number into the string, +\# \*[PAGE#] must be used. For example, if the user wants to put +\# an elipsis before the page number in the string, s/he should use +\# ...\*[PAGE#], not ...# +\# +.MAC HDRFTR_CENTER END +. nr #USER_DEF_HDRFTR_CENTER 1 +. ds $HDRFTR_CENTER \\$1 +.END +\# +\# +\# HDRFTR CENTER FAMILY +\# -------------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $HDRFTR_CENTER_FAM. +\# +.MAC HDRFTR_CENTER_FAMILY END +. ds $HDRFTR_CENTER_FAM \\$1 +.END +\# +\# +\# HDRFTR CENTER FONT +\# ------------------ +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $HDRFTR_CENTER_FT. +\# +.MAC HDRFTR_CENTER_FONT END +. ds $HDRFTR_CENTER_FT \\$1 +.END +\# +\# +\# HDRFTR CENTER SIZE +\# ------------------ +\# *Argument: +\# <+|- number of points to in/decrease size of centre string in +\# header/footers (relative to header/footer size)> +\# *Function: +\# Creates string HDRFTR_CENTER_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign. No space afterwards. +\# Fractional point sizes are allowed. +\# Default is -.5 for printstyle TYPESET; if all caps, -2 +\# Has no effect in TYPEWRITE. +\# +.MAC HDRFTR_CENTER_SIZE END +. ds $HDRFTR_CENTER_SIZE_CHANGE \\$1 +.END +\# +\# +\# HDRFTR CENTER CAPS +\# ------------------ +\# *Argument: +\# | +\# *Function: +\# Turns capitalisation of $HDRFTR_CENTER (typically, doctype of +\# the document) on or off. +\# *Notes: +\# Default is on. +\# +.MAC HDRFTR_CENTER_CAPS END +. ie '\\$1'' \{\ +. nr #HDRFTR_CENTER_CAPS 1 +. \} +. el \{\ +. nr #HDRFTR_CENTER_CAPS 0 +. ds $HDRFTR_CENTER_SIZE_CHANGE +0 +. \} +.END +\# +\# +\# HDRFTR RIGHT +\# ------------ +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $HDRFTR_RIGHT. +\# Creates register #USER_DEF_HDRFTR_RIGHT, which, if 1, +\# overrides the $HDRFTR_RIGHT string created by default +\# in DEFAULTS. +\# *Notes: +\# Default is document title. +\# +\# If the argument is the # character, simply prints the current +\# page number. +\# +\# If the user wants to *incorporate* the page number into the string, +\# \*[PAGE#] must be used. For example, if the user wants to put +\# an elipsis before the page number in the string, s/he should use +\# ...\*[PAGE#], not ...# +\# +.MAC HDRFTR_RIGHT END +. nr #USER_DEF_HDRFTR_RIGHT 1 +. ds $HDRFTR_RIGHT \\$1 +.END +\# +\# +\# HDRFTR RIGHT FAMILY +\# ------------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $HDRFTR_RIGHT_FAM. +\# +.MAC HDRFTR_RIGHT_FAMILY END +. ds $HDRFTR_RIGHT_FAM \\$1 +.END +\# +\# +\# HDRFTR RIGHT FONT +\# ----------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $HDRFTR_RIGHT_FT. +\# +.MAC HDRFTR_RIGHT_FONT END +. ds $HDRFTR_RIGHT_FT \\$1 +.END +\# +\# +\# HDRFTR RIGHT SIZE +\# ----------------- +\# *Argument: +\# <+|- number of points to in/decrease size of right string in +\# header/footers (relative to header/footer size)> +\# *Function: +\# Creates or modifies string HDRFTR_RIGHT_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign. No space afterwards. +\# Fractional point sizes are allowed. +\# Default is -2 for printstyle TYPESET if all caps; otherwise -.5 +\# Has no effect in TYPEWRITE. +\# +.MAC HDRFTR_RIGHT_SIZE END +. ds $HDRFTR_RIGHT_SIZE_CHANGE \\$1 +.END +\# +\# +\# HDRFTR RIGHT CAPS +\# ----------------- +\# *Argument: +\# | +\# *Function: +\# Turns capitalisation of $HDRFTR_RIGHT (typically, the title of +\# the document) on or off. +\# *Notes: +\# Default is on. +\# +.MAC HDRFTR_RIGHT_CAPS END +. ie '\\$1'' \{\ +. nr #HDRFTR_RIGHT_CAPS 1 +. \} +. el \{\ +. nr #HDRFTR_RIGHT_CAPS 0 +. ds $HDRFTR_RIGHT_SIZE_CHANGE +0 +. \} +.END +\# +\# HDRFTR RULE +\# ----------- +\# *Arguments: +\# | +\# *Function: +\# If invoked via the alias HDRFTR_RULE_INTERNAL in HDRFTR, prints a rule +\# under the header/footer. Otherwise, turns HDRFTR_RULE on or off. +\# +.MAC HDRFTR_RULE END \"To print rule under header/over footer. +. ie '\\$0'HDRFTR_RULE_INTERNAL' \{\ +. ie \\n[#USERDEF_HDRFTR] \{\ +. nr #CAP_HEIGHT_ADJUST \\n[#HDRFTR_HEIGHT] +. PT_SIZE 12 +. if \\n[#HEADERS_ON] \{ .ALD \\n[#HDRFTR_RULE_GAP]u \} +. if \\n[#FOOTERS_ON] \{\ +. RLD \\n[#HDRFTR_RULE_GAP]u+\\n[#CAP_HEIGHT_ADJUST]u+1p +. \} +. PRINT \\l'\\n[#DOC_L_LENGTH]u' +. br +. \} +. el \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. nr #CAP_HEIGHT_ADJUST \\n[#CAP_HEIGHT] +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. ie \\n[#LEFT_CAP_HEIGHT]>\\n[#CENTER_CAP_HEIGHT] \{\ +. nr #CAP_HEIGHT_ADJUST \\n[#LEFT_CAP_HEIGHT] +. \} +. el \{ .nr #CAP_HEIGHT_ADJUST \\n[#CENTER_CAP_HEIGHT] \} +. ie \\n[#CAP_HEIGHT_ADJUST]>\\n[#RIGHT_CAP_HEIGHT] \{\ +. nr #CAP_HEIGHT_ADJUST \\n[#CAP_HEIGHT_ADJUST] +. \} +. el \{ .nr #CAP_HEIGHT_ADJUST \\n[#RIGHT_CAP_HEIGHT] \} +. \} +. PT_SIZE 12 +. if \\n[#HEADERS_ON] \{ .ALD \\n[#HDRFTR_RULE_GAP]u \} +. if \\n[#FOOTERS_ON] \{\ +. RLD \\n[#LEAD]u*3u+\\n[#HDRFTR_RULE_GAP]u+\\n[#CAP_HEIGHT_ADJUST]u+1p +. \} +. PRINT \\l'\\n[#DOC_L_LENGTH]u' +. br +. \} +. \} +. el \{\ +. ie '\\$1'' \{ .nr #HDRFTR_RULE 1 \} +. el \{ .nr #HDRFTR_RULE 0 \} +. \} +.END +\# +\# +.ALIAS HDRFTR_RULE_INTERNAL HDRFTR_RULE +\# +\# +\# HDRFTR PLAIN +\# ------------ +\# *Arguments: +\# +\# *Function: +\# Sets the family, font, and point size of all strings in +\# header/footers to the same family and point size as running +\# text. Font for the header/footer becomes roman throughout. +\# +.MAC HDRFTR_PLAIN END +. HDRFTR_FAMILY \\*[$DOC_FAM] +. HDRFTR_PT_SIZE \\n[#DOC_PT_SIZE] +. HDRFTR_LEFT_FAMILY \\*[$DOC_FAM] +. HDRFTR_LEFT_FONT R +. HDRFTR_LEFT_SIZE +0 +. HDRFTR_LEFT_CAPS OFF +. HDRFTR_CENTER_FAMILY \\*[$DOC_FAM] +. HDRFTR_CENTER_FONT R +. HDRFTR_CENTER_SIZE +0 +. HDRFTR_CENTER_CAPS OFF +. HDRFTR_RIGHT_FAMILY \\*[$DOC_FAM] +. HDRFTR_RIGHT_FONT R +. HDRFTR_RIGHT_SIZE +0 +. HDRFTR_RIGHT_CAPS OFF +.END +\# +\# +\# SWITCH HDRFTR +\# ------------- +\# *Arguments: +\# | +\# *Function: +\# Creates or modifies register #SWITCH_HDRFTR, used to switch +\# default location of HDRFTR_LEFT and HDRFTR_RIGHT. +\# *Notes: +\# Typically, the author string appears at the left of header/footers, +\# and the title string appears at the right. This switches the +\# location of the two. Useful in conjuction with RECTO_VERSO to +\# tweak switches on alternate pages to come out as the user wishes. +\# The assumption of RECTO_VERSO is that the first page of the document +\# (recto) is odd, and even though it has no header/footer, if it did have one, +\# it would print as AUTHOR...CENTER...TITLE (or whatever strings +\# the user has supplied for HDRFTR_LEFT/RIGHT), meaning that the +\# next page, which does have a header/footer, will come out as +\# TITLE...CENTER...AUTHOR (or whatever strings the user has +\# supplied for HDRFTR_LEFT/RIGHT). SWITCH_HDRFTRS allows the user +\# to get the desired string in the desired place on the desired +\# recto/verso page. +\# +\# Default is OFF. +\# +.MAC SWITCH_HDRFTR END +. ie '\\$1'' \{ .nr #SWITCH_HDRFTR 1 \} +. el \{ .nr #SWITCH_HDRFTR 0 \} +.END +\# +\# +\# USER DEFINED HDRFTR RECTO +\# ------------------------- +\# *Arguments: +\# L | LEFT | C | CENTER | CENTER | R | RIGHT +\# *Function: +\# Toggles #USERDEF_HDRFTR on, stores quad as #USERDEF_HDRFTR_RECTO_QUAD, +\# stores string in $USERDEF_HDRFTR_RECTO. +\# *Notes: +\# For use when users don't want 3-part headers/footers, but rather +\# want to design their own headers/footers and need different +\# headers/footers on recto and verso pages. +\# +.MAC HDRFTR_RECTO END +. nr #USERDEF_HDRFTR 1 +. if '\\$1'L' \{ .nr #USERDEF_HDRFTR_RECTO_QUAD 1 \} +. if '\\$1'LEFT' \{ .nr #USERDEF_HDRFTR_RECTO_QUAD 1 \} +. if '\\$1'C' \{ .nr #USERDEF_HDRFTR_RECTO_QUAD 2 \} +. if '\\$1'CENTER' \{ .nr #USERDEF_HDRFTR_RECTO_QUAD 2 \} +. if '\\$1'CENTRE' \{ .nr #USERDEF_HDRFTR_RECTO_QUAD 2 \} +. if '\\$1'R' \{ .nr #USERDEF_HDRFTR_RECTO_QUAD 3 \} +. if '\\$1'RIGHT' \{ .nr #USERDEF_HDRFTR_RECTO_QUAD 3 \} +. ds $USERDEF_HDRFTR_RECTO \\$2 +.END +\# +\# +\# USER DEFINED HDRFTR VERSO +\# ------------------------- +\# *Arguments: +\# L | LEFT | C | CENTER | CENTER | R | RIGHT +\# *Function: +\# Toggles #USERDEF_HDRFTR on, stores quad as #USERDEF_HDRFTR_VERSO_QUAD, +\# stores string in $USERDEF_HDRFTR_VERSO. +\# *Notes: +\# For use when users don't want 3-part headers/footers, but rather +\# want to design their own headers/footers and need different +\# headers/footers on recto and verso pages. +\# +.MAC HDRFTR_VERSO END +. nr #USERDEF_HDRFTR 1 +. if '\\$1'L' \{ .nr #USERDEF_HDRFTR_VERSO_QUAD 1 \} +. if '\\$1'LEFT' \{ .nr #USERDEF_HDRFTR_VERSO_QUAD 1 \} +. if '\\$1'C' \{ .nr #USERDEF_HDRFTR_VERSO_QUAD 2 \} +. if '\\$1'CENTER' \{ .nr #USERDEF_HDRFTR_VERSO_QUAD 2 \} +. if '\\$1'CENTRE' \{ .nr #USERDEF_HDRFTR_VERSO_QUAD 2 \} +. if '\\$1'R' \{ .nr #USERDEF_HDRFTR_VERSO_QUAD 3 \} +. if '\\$1'RIGHT' \{ .nr #USERDEF_HDRFTR_VERSO_QUAD 3 \} +. ds $USERDEF_HDRFTR_VERSO \\$2 +.END +\# +\# +\# PRINT FOOTER ON FIRST PAGE +\# -------------------------- +\# *Arguments: +\# | +\# *Function: +\# Toggles register #PRINT_FOOTER_ON_PAGE_1 +\# *Notes: +\# Lets user choose whether to print footer on first +\# page of doc. +\# +.MAC FOOTER_ON_FIRST_PAGE END +. ie '\\$1'' \{ .nr #PRINT_FOOTER_ON_PAGE_1 1 \} +. el \{ .rr #PRINT_FOOTER_ON_PAGE_1 \} +.END +\# +\# +\# PRINT PAGE NUMBER ON FIRST PAGE +\# ------------------------------- +\# *Arguments: +\# | +\# *Function: +\# Toggles register #PRINT_PAGENUM_ON_PAGE_1 +\# *Notes: +\# Lets user choose whether to print page number on first +\# page of doc and after collate when footers are on or page numbering +\# has been user set at top of page. +\# +.MAC PAGENUM_ON_FIRST_PAGE END +. ie '\\$1'' \{ .nr #PRINT_PAGENUM_ON_PAGE_1 1 \} +. el \{ .rr #PRINT_PAGENUM_ON_PAGE_1 \} +.END +\# +\# +\# PRINT HEADER/FOOTER +\# ------------------- +\# *Arguments: +\# +\# *Function: +\# Based on defaults or values entered by user, prints a +\# three-part title at either the top or the bottom of the page. +\# *Notes: +\# Called from within either HEADER or FOOTER. +\# +.MAC PRINT_HDRFTR END +. if \\n[#DOC_TYPE]=4 \{\ +. nr #SUITE \En[.pn] +. \} +. if \\n[#FOOTERS_ON] \{\ +. if \\n[#START_FOR_FOOTERS] \{\ +. rr #START_FOR_FOOTERS +. if !\\n[#PRINT_FOOTER_ON_PAGE_1] \{ .return \} +. \} +. \} +. if \\n[#HEADERS_ON] \{ .vs 0 \} +. if \\n[#USERDEF_HDRFTR] \{\ +. PRINT_USERDEF_HDRFTR +. return +. \} +. if \\n[#SWITCH_HDRFTR] \{\ +. ds $HDRFTR_TMP_SWITCH \\*[$HDRFTR_LEFT] +. ds $HDRFTR_LEFT \\*[$HDRFTR_RIGHT] +. ds $HDRFTR_RIGHT \\*[$HDRFTR_TMP_SWITCH] +. ds $HDRFTR_TMP_SIZE_CHANGE_SWITCH \\*[$HDRFTR_LEFT_SIZE_CHANGE] +. ds $HDRFTR_LEFT_SIZE_CHANGE \\*[$HDRFTR_RIGHT_SIZE_CHANGE] +. ds $HDRFTR_RIGHT_SIZE_CHANGE \\*[$HDRFTR_TMP_SIZE_CHANGE_SWITCH] +. nr #HDRFTR_TMP_CAPS_SWITCH \\n[#HDRFTR_LEFT_CAPS] +. nr #HDRFTR_LEFT_CAPS \\n[#HDRFTR_RIGHT_CAPS] +. nr #HDRFTR_RIGHT_CAPS \\n[#HDRFTR_TMP_CAPS_SWITCH] +. rr #HDRFTR_TMP_CAPS_SWITCH +. rm $HDRFTR_TMP_SWITCH +. rm $HDRFTR_TMP_SIZE_CHANGE_SWITCH +. nr #SWITCH_HDRFTR 0 +. \} +. nr #PAGENUMBER \\n%+\\n[#PAGE_NUM_ADJ] +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#FOOTERS_ON] \{\ +. di NULL +. SIZESPECS +. nr #LEFT_CAP_HEIGHT \\n[#CAP_HEIGHT] +. di +. \} +. if o \{ .RIGHT \} +. if e \{ .LEFT \} +. if \\n[#RECTO_VERSO]=0 \{ .LEFT \} +. if \\n[#HDRFTR_LEFT_CAPS] \{ .CAPS \} +. ie '\\*[$HDRFTR_LEFT]'#' \{\ +. PRINT \\n[#PAGENUMBER] +. \} +. el \{\ +. ie !'\\*[$HDRFTR_LEFT]'' \{ . PRINT \\*[$HDRFTR_LEFT] \} +. el \{ .PRINT \& \} +. \} +. if \\n[#HDRFTR_LEFT_CAPS] \{ .CAPS OFF \} +. CENTER +. if \\n[#HDRFTR_CENTER_CAPS] \{ .CAPS \} +. ie '\\*[$HDRFTR_CENTER]'#' \{\ +. PRINT \\v'-(\\n[#LEAD]u*1u)'\\n[#PAGENUMBER] +. \} +. el \{\ +. ie !'\\*[$HDRFTR_CENTER]'' \{ .PRINT \\v'-(\\n[#LEAD]u*1u)'\\*[$HDRFTR_CENTER] \} +. el \{ .PRINT \& \} +. \} +. if \\n[#HDRFTR_CENTER_CAPS] \{ .CAPS OFF \} +. if o \{ .LEFT \} +. if e \{ .RIGHT \} +. if \\n[#RECTO_VERSO]=0 \{ .RIGHT \} +. if \\n[#HDRFTR_RIGHT_CAPS] \{ .CAPS \} +. ie '\\*[$HDRFTR_RIGHT]'#' \{\ +. PRINT \\v'-(\\n[#LEAD]u*2u)'\\n[#PAGENUMBER] +. \} +. el \{\ +. ie !'\\*[$HDRFTR_RIGHT]'' \{ .PRINT \v'-(\\n[#LEAD]u*2u)'\\*[$HDRFTR_RIGHT] \} +. el \{ .PRINT \& \} +. \} +. if \\n[#HDRFTR_RIGHT_CAPS] \{ .CAPS OFF \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$HDRFTR_LEFT_FAM] +. FT \\*[$HDRFTR_LEFT_FT] +. PT_SIZE \\n[#HDRFTR_PT_SIZE]u\\*[$HDRFTR_LEFT_SIZE_CHANGE] +. if \\n[#FOOTERS_ON] \{\ +. di NULL +. SIZESPECS +. nr #LEFT_CAP_HEIGHT \\n[#CAP_HEIGHT] +. di +. \} +. if o \{ .LEFT \} +. if e \{ .RIGHT \} +. if \\n[#RECTO_VERSO]=0 \{ .LEFT \} +. if \\n[#HDRFTR_LEFT_CAPS] \{ .CAPS \} +. ie '\\*[$HDRFTR_LEFT]'#' \{ .PRINT \\n[#PAGENUMBER] \} +. el \{\ +. ie !'\\*[$HDRFTR_LEFT]'' \{ . PRINT \\*[$HDRFTR_LEFT] \} +. el \{ .PRINT \& \} +. \} +. if \\n[#HDRFTR_LEFT_CAPS] \{ .CAPS OFF \} +. FAMILY \\*[$HDRFTR_CENTER_FAM] +. FT \\*[$HDRFTR_CENTER_FT] +. PT_SIZE \\n[#HDRFTR_PT_SIZE]u\\*[$HDRFTR_CENTER_SIZE_CHANGE] +. if \\n[#FOOTERS_ON] \{\ +. di NULL +. SIZESPECS +. nr #CENTER_CAP_HEIGHT \\n[#CAP_HEIGHT] +. di +. \} +. CENTER +. if \\n[#HDRFTR_CENTER_CAPS] \{ .CAPS \} +. ie '\\*[$HDRFTR_CENTER]'#' \{\ +. PRINT \\v'-(\\n[#LEAD]u*1u)'\\n[#PAGENUMBER] +. \} +. el \{\ +. ie !'\\*[$HDRFTR_CENTER]'' \{ .PRINT \\v'-(\\n[#LEAD]u*1u)'\\*[$HDRFTR_CENTER] \} +. el \{ .PRINT \& \} +. \} +. if \\n[#HDRFTR_CENTER_CAPS] \{ .CAPS OFF \} +. FAMILY \\*[$HDRFTR_RIGHT_FAM] +. FT \\*[$HDRFTR_RIGHT_FT] +. PT_SIZE \\n[#HDRFTR_PT_SIZE]u\\*[$HDRFTR_RIGHT_SIZE_CHANGE] +. if \\n[#FOOTERS_ON] \{\ +. di NULL +. SIZESPECS +. nr #RIGHT_CAP_HEIGHT \\n[#CAP_HEIGHT] +. di +. \} +. if o \{ .RIGHT \} +. if e \{ .LEFT \} +. if \\n[#RECTO_VERSO]=0 \{ .RIGHT \} +. if \\n[#HDRFTR_RIGHT_CAPS] \{ .CAPS \} +. ie '\\*[$HDRFTR_RIGHT]'#' \{\ +. PRINT \\v'-(\\n[#LEAD]u*2u)'\\n[#PAGENUMBER] +. \} +. el \{\ +. ie !'\\*[$HDRFTR_RIGHT]'' \{ .PRINT \v'-(\\n[#LEAD]u*2u)'\\*[$HDRFTR_RIGHT] \} +. el \{ .PRINT \& \} +. \} +. if \\n[#HDRFTR_RIGHT_CAPS] \{ .CAPS OFF \} +. \} +. if \\n[#HDRFTR_RULE] \{\ +. HDRFTR_RULE_INTERNAL +. \} +.END +\# +\# +\# PRINT USER DEFINED HEADER/FOOTER +\# -------------------------------- +\# *Arguments: +\# +\# *Function: +\# Based on defaults or values entered by user, prints a single part +\# (i.e. not 3-part) title at either the top or the bottom of the page. +\# *Notes: +\# Called from within PRINT_HDRFTR. +\# +.MAC PRINT_USERDEF_HDRFTR END +. nr #PAGENUMBER \\n%+\\n[#PAGE_NUM_ADJ] +. fc ^ # +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$HDRFTR_FAM] +. FT R +. PT_SIZE \\n[#HDRFTR_PT_SIZE]u +. \} +. ie \\n[#RECTO_VERSO] \{\ +. if o \{\ +. if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=1 \{ .LEFT \} +. if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=2 \{ .CENTER \} +. if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=3 \{ .RIGHT \} +. PRINT \\*[$USERDEF_HDRFTR_RECTO] +. EL +. if \\n[#FOOTERS_ON] \{\ +. di NULL +. SIZESPECS +. nr #HDRFTR_HEIGHT \\n[#CAP_HEIGHT] +. di +. \} +. \} +. if e \{\ +. ie !'\\*[$USERDEF_HDRFTR_VERSO]'' \{\ +. if \\n[#USERDEF_HDRFTR_VERSO_QUAD]=1 \{ .LEFT \} +. if \\n[#USERDEF_HDRFTR_VERSO_QUAD]=2 \{ .CENTER \} +. if \\n[#USERDEF_HDRFTR_VERSO_QUAD]=3 \{ .RIGHT \} +. \} +. PRINT \\*[$USERDEF_HDRFTR_VERSO] +. EL +. if \\n[#FOOTERS_ON] \{\ +. di NULL +. SIZESPECS +. nr #HDRFTR_HEIGHT \\n[#CAP_HEIGHT] +. di +. \} +. el \{\ +. if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=1 \{ .LEFT \} +. if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=2 \{ .CENTER \} +. if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=3 \{ .RIGHT \} +. PRINT \\*[$USERDEF_HDRFTR_RECTO] +. EL +. if \\n[#FOOTERS_ON] \{\ +. di NULL +. SIZESPECS +. nr #HDRFTR_HEIGHT \\n[#CAP_HEIGHT] +. di +. \} +. \} +. \} +. \} +. el \{\ +. if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=1 \{ .LEFT \} +. if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=2 \{ .CENTER \} +. if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=3 \{ .RIGHT \} +. PRINT \\*[$USERDEF_HDRFTR_RECTO] +. EL +. if \\n[#FOOTERS_ON] \{\ +. di NULL +. SIZESPECS +. nr #HDRFTR_HEIGHT \\n[#CAP_HEIGHT] +. di +. \} +. \} +. fc +. if \\n[#HDRFTR_RULE] \{\ +. HDRFTR_RULE_INTERNAL +. \} +.END +\# +\# +\# +++HEADERS+++ +\# +\# HEADERS (off or on) +\# ------------------- +\# *Arguments: +\# | +\# *Function: +\# Turns headers at the top of the page off or on. +\# *Notes: +\# Default is on. +\# +.MAC HEADERS END +. ie '\\$1'' \{ .nr #HEADERS_ON 1 \} +. el \{ .nr #HEADERS_ON 0 \} +.END +\# +\# +\# HEADER MARGIN +\# ------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies register #HEADER_MARGIN to hold amount +\# of space between top of page and header. +\# *Notes: +\# Requires unit of measure. Default is 4P+6p, measured top-of-page +\# to baseline. +\# +.MAC HEADER_MARGIN END +. nr #HEADER_MARGIN (\\$1) +.END +\# +\# +\# HEADER GAP +\# ---------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies register #HEADER_GAP to hold amount +\# of space between header and running text. +\# *Notes: +\# Default is 1P+6p. +\# +.MAC HEADER_GAP END +. nr #HEADER_GAP (\\$1) +.END +\# +\# +\# HEADER +\# ------ +\# *Arguments: +\# +\# *Function: +\# Prints header appropriate to DOC_TYPE, PRINTSTYLE, and COPYSTYLE. +\# *Notes: +\# In order to convert the title string to caps in the header (in the +\# event that the user enters .TITLE in caps/lc), I've used +\# quad left, quad centre, and quad right to arrange the three bits +\# of the header, rather than .tl. This allows the use of the CAPS macro. +\# The downside is that I have to add \\v'-(\\n[#LEAD]u*#) in order +\# for -Tlatin1 output to align the header/footer strings on the baseline. +\# The console output still isn't brilliant, but at least it's +\# comprehensible. +\# +.MAC HEADER END +. PROCESS_FN_LEFTOVER +. nr #FN_COUNT_FOR_COLS 0 1 +. if \\n[#RESET_FN_NUMBER] \{ .nr #FN_NUMBER 0 1 \} +. po \\n[#DOC_L_MARGIN]u +. if \\n[#RECTO_VERSO] \{\ +. nr #DOC_LR_MARGIN_TMP \\n[#DOC_L_MARGIN] +. DOC_LEFT_MARGIN \\n[#DOC_R_MARGIN]u +. DOC_RIGHT_MARGIN \\n[#DOC_LR_MARGIN_TMP]u +. \} +. ev HEADER +. if \\n[#PRINT_STYLE]=1 \{ .vs 0 \} +. if \\n[#PRINT_STYLE]=2 \{ .LS 0 \} +. sp |\\n[#HEADER_MARGIN]u-1v +. ll \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$HDRFTR_FAM] +. FT R +. PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$HDRFTR_SIZE_CHANGE] +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12\\*[$HDRFTR_SIZE_CHANGE] +. \} +. nr #HDRFTR_PT_SIZE \\n[#PT_SIZE] +. if \\n[#CAPS_ON] \{\ +. nr #CAPS_WAS_ON 1 +. CAPS OFF +. \} +. if \\n[#UNDERLINE_ON] \{\ +. nr #UNDERLINE_WAS_ON 1 +. UNDERLINE OFF +. \} +. ie \\n[#HEADERS_ON] \{\ +. PRINT_HDRFTR +. sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u +. \} +. el \{\ +. ie \\n[#PAGE_NUM_V_POS]=1 \{\ +. ie \\n[#PAGINATE] \{\ +. PRINT_PAGE_NUMBER +. sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u +. \} +. el \{ .sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u \} +. \} +. el \{ .sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u \} +. \} +. nr #PAGE_TOP \\n(nl +. ev +. po \\n[#L_MARGIN]u +. if \\n[#RECTO_VERSO] \{\ +. nr #L_MARGIN +\\n[#L_MARGIN_DIFF] +. \} +. if \\n[#CAPS_WAS_ON] \{\ +. CAPS +. rr #CAPS_WAS_ON +. \} +. if \\n[#UNDERLINE_WAS_ON] \{\ +. UNDERLINE +. rr #UNDERLINE_WAS_ON +. \} +. if \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \} +. if \\n[#QUOTE] \{\ +. ie \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \} +. el \{\ +. nr #Q_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE]) +. po \\n[#Q_OFFSET]u +. \} +. \} +. if \\n[#EPIGRAPH] \{\ +. ie \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \} +. el \{\ +. nr #EPI_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE]) +. po \\n[#EPI_OFFSET]u +. \} +. \} +. ie \\n[#EPIGRAPH] \{\ +. ie !\\n[#EPI_ACTIVE] \{\ +. ns +. rr #EPI_ACTIVE +. \} +. el \{\ +. ie \\n[#EPI_FITS] \{ .ns \} +. el \{ .ALD \\n[#DOC_LEAD]u-\\n[#EPI_LEAD]u \} +. \} +. \} +. el \{ .ns \} +. ns +. if \\n[#COLUMNS] \{\ +. if \\n[#RECTO_VERSO] \{ .COLUMNS \\n[#NUM_COLS] \\n[#GUTTER]u \} +. nr #COL_NUM 0 1 +. mk dc +. po \\n[#COL_\\n+[#COL_NUM]_L_MARGIN]u +. ll \\n[#COL_L_LENGTH]u +. ta \\n(.lu +. if \\n[#QUOTE] \{\ +. po +(\\n[#PP_INDENT]u*\\n[#Q_OFFSET_VALUE]u) +. \} +. if \\n[#EPIGRAPH] \{\ +. if \\n[#EPI_ACTIVE] \{\ +. ie \\n[#EPI_FITS] \{ . \} +. el \{ .nr dc -\\n[#EPI_LEAD_DIFF] \} +. \} +. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u+(\\n[#PP_INDENT]u*\\n[#EPI_OFFSET_VALUE]u) +. \} +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#SLANT_ON] \{\ +. if \\n[#UNDERLINE_SLANT] \{ .UNDERLINE \} +. \} +. \} +.END +\# +\# ==================================================================== +\# +\# +++FOOTERS+++ +\# +\# FOOTERS (off or on) +\# ------------------- +\# *Arguments: +\# | +\# *Function: +\# Turns footers at the bottom of the page off or on. +\# *Notes: +\# Default is off. If on, page numbers automatically go at +\# the top, centered, unless pagination has been turned off, +\# or the pagenumber position has been changed to left or right. +\# +.MAC FOOTERS END +. ie '\\$1'' \{\ +. nr #FOOTERS_ON 1 +. PAGE_NUM_POS TOP CENTER +. \} +. el \{ .nr #FOOTERS_ON 0 \} +.END +\# +\# +\# FOOTER MARGIN +\# ------------- +\# *Argument: +\#