diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1994-11-22 10:58:58 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1994-11-22 10:58:58 +0000 |
| commit | 140932d6d85b561ad06abe5006a5e973a7713c45 (patch) | |
| tree | be1d2469fd1ab2ab0df6164fbc91fb7bbbdd80f5 /gnu/usr.bin/groff/tmac | |
| parent | 324ec40db3d437d18da21aa07a7ae4d4ecd9c157 (diff) | |
Diffstat (limited to 'gnu/usr.bin/groff/tmac')
| -rw-r--r-- | gnu/usr.bin/groff/tmac/Makefile | 26 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/TODO | 38 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/eqnrc | 60 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/groff_ms.7 | 210 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/man.local | 0 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/tmac.X | 45 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/tmac.Xps | 44 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/tmac.an | 326 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/tmac.dvi | 132 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/tmac.latin1 | 101 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/tmac.pic | 10 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/tmac.ps | 52 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/tmac.psatk | 61 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/tmac.psfig | 87 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/tmac.psnew | 26 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/tmac.psold | 60 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/tmac.pspic | 41 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/tmac.s | 1803 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/tmac.tty | 48 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/tmac.tty-char | 196 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/troffrc | 24 |
21 files changed, 3390 insertions, 0 deletions
diff --git a/gnu/usr.bin/groff/tmac/Makefile b/gnu/usr.bin/groff/tmac/Makefile new file mode 100644 index 000000000000..3c54eea63226 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/Makefile @@ -0,0 +1,26 @@ +# Makefile for groff macros + +TMACOWN?= bin +TMACGRP?= bin +TMACMODE?= 444 +TMACDIR?= /usr/share/tmac + +MAN7= groff_ms.7 +MLINKS= groff_ms.7 ms.7 + +FILES= tmac.pic tmac.ps tmac.psnew tmac.psold tmac.pspic tmac.psatk\ + tmac.dvi tmac.tty tmac.tty-char tmac.X tmac.Xps tmac.latin1\ + man.local eqnrc troffrc + +afterinstall: + for f in ${FILES}; do \ + install -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ + ${.CURDIR}/$$f ${DESTDIR}${TMACDIR}; \ + done + install -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ + ${.CURDIR}/tmac.s ${DESTDIR}${TMACDIR}/tmac.groff_ms + install -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ + ${.CURDIR}/tmac.an ${DESTDIR}${TMACDIR}/tmac.groff_an + +.include "../Makefile.cfg" +.include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/tmac/TODO b/gnu/usr.bin/groff/tmac/TODO new file mode 100644 index 000000000000..5213fc274c08 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/TODO @@ -0,0 +1,38 @@ +Support multiple line-spacing. + +Improve the device independence of the character definitions. + +If we have footnotes in the abstract in RP format, then the footnote +will appear on the cover sheet, which it should, but also on the first +page, which it should not. + +Should we allow multi-page cover-sheets? + +Warn about automatically numbered footnotes in floating keeps. + +When we bring back the footnote overflow at the top of page, it would +be more efficient to avoid diverting it again. (Need to keep track of +footnote height.) + +Possibly have a place above which the footnote trap must not be +placed. + +Improved indexing, not using tm, controlled by string variable (eg +-dIDX=file.idx). + +When changing from multi-column to narrower columns, we could avoid +doing a @super-eject. (This might not be a good idea.) + +Think about cutmarks. Possibly implement CM. + +Implement thesis Mode (TM, CT). + +Implement more V10 features. + +Should this + +.LP +.rs +.sp \n(.tu + +print two pages? diff --git a/gnu/usr.bin/groff/tmac/eqnrc b/gnu/usr.bin/groff/tmac/eqnrc new file mode 100644 index 000000000000..eab720cf34da --- /dev/null +++ b/gnu/usr.bin/groff/tmac/eqnrc @@ -0,0 +1,60 @@ +.\" Startup file for eqn. +.EQ +sdefine << %{ < back 20 < }% +sdefine >> %{ > back 20 > }% + +sdefine dot %accent "\fR\(a.\fP"% +sdefine dotdot %accent "\fR\(ad\fP"% +sdefine vec %accent {up 52 "\s[\En[.s]/2u]\(->\s0"}% +sdefine dyad %accent {up 52 "\s[\En[.s]/2u]\(<>\s0"}% + +sdefine cdot %type "binary" \(md% + +ifdef X75 ! define X %1% ! +ifdef X100 ! define X %1% ! +ifdef X75-12 ! define X %1% ! +ifdef X100-12 ! define X %1% ! + +ifdef ps ! define ps|X %1% ! +ifdef X ! define ps|X %1% ! + +ifdef ps|X ! sdefine inf %"\s[\En[.s]*13u/10u]\v'12M'\(if\v'-12M'\s0"% ! + +ifdef dvi ! +sdefine int %{type "operator" vcenter \(is}% +sdefine sum %{type "operator" vcenter \[sum]}% +sdefine prod %{type "operator" vcenter \[product]}% +sdefine coprod %{type "operator" vcenter \[coproduct]}% +set num1 68 +set num2 39 +set denom1 69 +set denom2 34 +set sup1 41 +set sup2 36 +set sup3 29 +set sup_drop 39 +set sub_drop 5 +set axis_height 25 +set x_height 43 +set default_rule_thickness 4 +set big_op_spacing1 11 +set big_op_spacing2 16 +set big_op_spacing3 20 +set big_op_spacing4 60 +set big_op_spacing5 10 +! + +ifdef X ! set axis_height 32 ! + +ifdef ps|X ! set draw_lines 1 ! + +ifdef ascii ! define n %1% ! +ifdef latin1 ! define n %1% ! +ifdef n ! +set nroff 1 +! + +undef X +undef ps|X +undef n +.EN diff --git a/gnu/usr.bin/groff/tmac/groff_ms.7 b/gnu/usr.bin/groff/tmac/groff_ms.7 new file mode 100644 index 000000000000..a2aacb80e48c --- /dev/null +++ b/gnu/usr.bin/groff/tmac/groff_ms.7 @@ -0,0 +1,210 @@ +.\" -*- nroff -*- +.TH GROFF_MS 7 "6 August 1992" "Groff Version 1.08" +.SH NAME +groff_ms \- groff ms macros +.SH SYNOPSIS +.B groff +.B \-ms +[ +.IR options .\|.\|. +] +[ +.IR files .\|.\|. +] +.SH DESCRIPTION +This manual page describes the GNU version of the ms macros, +which is part of the groff document formatting system. +The groff ms macros are intended to be compatible with the 4.3 +.SM BSD +Unix ms macros subject to the following limitations: +.IP \(bu +the internals of groff ms are not similar to the internals of Unix ms +and so documents that depend upon implementation details of Unix ms +may well not work with groff ms; +.IP \(bu +there is no support for typewriter-like devices; +.IP \(bu +Berkeley localisms, in particular the +.B TM +and +.B CT +macros, are not implemented; +.IP \(bu +groff ms +does not provide cut marks; +.IP \(bu +multiple line spacing is not allowed +(use a larger vertical spacing instead); +.IP \(bu +groff ms does not work in compatibility mode (eg with the +.B \-C +option); +.IP \(bu +the error-handling policy of groff ms +is to detect and report errors, +rather than silently to ignore them. +.LP +The groff ms macros make use of many features of GNU troff +and therefore cannot be used with any other troff. +.LP +Bell Labs localisms are not implemented in either the +.SM BSD +ms macros or in the groff ms macros. +.LP +Some Unix ms documentation says that the +.B CW +and +.B GW +number registers can be used to control the column width and +gutter width respectively. +This is not the case. +These number registers are not used in groff ms. +.LP +Macros that cause a reset set the indent. +Macros that change the indent do not increment or decrement +the indent, but rather set it absolutely. +This can cause problems for documents that define +additional macros of their own. +The solution is to use not the +.B in +request but instead the +.B RS +and +.B RE +macros. +.LP +The number register +.B GS +is set to 1 by the groff ms macros, +but is not used by the Unix ms macros. +It is intended that documents that need to determine whether +they are being formatted with Unix ms or groff ms make use of this +number register. +.LP +Footnotes are implemented so that they can safely be used within +keeps and displays. +Automatically numbered footnotes within floating keeps are +not recommended. +It is safe to have another +.B \e** +between a +.B \e** +and the corresponding +.BR .FS ; +it is required only that each +.B .FS +occur after the corresponding +.B \e** +and that the occurrences of +.B .FS +are in the same order as the corresponding occurrences of +.BR \e** . +.LP +The strings +.B \e*{ +and +.B \e*} +can be used to begin and end a superscript. +.LP +Some Unix V10 ms features are implemented. +The +.BR B , +.BR I +and +.B BI +macros can have an optional third argument which will be printed +in the current font before the first argument. +There is a macro +.B CW +like +.B B +that changes to a constant-width font. +.LP +The following strings can be redefined to adapt the groff ms macros +to languages other than English: +.LP +.nf +.ta \w'REFERENCES'u+2n +String Default Value +.sp .3v +REFERENCES References +ABSTRACT ABSTRACT +TOC Table of Contents +MONTH1 January +MONTH2 February +MONTH3 March +MONTH4 April +MONTH5 May +MONTH6 June +MONTH7 July +MONTH8 August +MONTH9 September +MONTH10 October +MONTH11 November +MONTH12 December +.fi +.LP +The font family is reset from the string +.BR FAM ; +at initialization if this string is undefined it is set to the current +font family. +The point size, vertical spacing, and inter-paragraph spacing for footnotes +are taken from the number registers +.BR FPS , +.BR FVS , +and +.BR FPD ; +at initialization these are set to +.BR \en(PS-2 , +.BR \en[FPS]+2 , +and +.B \en(PD/2 +respectively; however, if any of these registers has been defined +before initialization, it will not be set. +.LP +Right-aligned displays are available with +.B ".DS R" +and +.BR .RD . +.LP +The following conventions are used for names of macros, strings and +number registers. +External names available to documents that use the groff ms +macros contain only uppercase letters and digits. +Internally the macros are divided into modules. +Names used only within one module are of the form +.IB module * name\fR. +Names used outside the module in which they are defined are of the form +.IB module @ name\fR. +Names associated with a particular environment are of the form +.IB environment : name; +these are used only within the +.B par +module, +and +.I name +does not have a module prefix. +Constructed names used to implement arrays are of the form +.IB array ! index\fR. +Thus the groff ms macros reserve the following names: +.IP \(bu +names containing +.BR * ; +.IP \(bu +names containing +.BR @ ; +.IP \(bu +names containing +.BR : ; +.IP \(bu +names containing only uppercase letters and digits. +.SH FILES +.B /usr/share/tmac/tmac.s +.SH "SEE ALSO" +.BR groff (1), +.BR troff (1), +.BR tbl (1), +.BR pic (1), +.BR eqn (1) +.br +.BR ms (7) diff --git a/gnu/usr.bin/groff/tmac/man.local b/gnu/usr.bin/groff/tmac/man.local new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/man.local diff --git a/gnu/usr.bin/groff/tmac/tmac.X b/gnu/usr.bin/groff/tmac/tmac.X new file mode 100644 index 000000000000..044113fe92e9 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/tmac.X @@ -0,0 +1,45 @@ +.nr _C \n(.C +.cp 0 +.ftr CW CR +.ftr C CR +.ftr CO CI +.ftr CX CBI +.ftr H HR +.ftr HO HI +.ftr HX HBI +.ftr NX NBI +.char \(ru \D'l .5m 0' +.char \(ul \v'.25m'\D'l .5m 0'\v'-.25m' +.char \(br \v'.25m'\D'l 0 -1m'\v'.75m' +.char ~ \v'-.55m'\\s[\\n(.s/2u]\v'.2m'\(ti\v'-.2m'\s0\v'.55m' +.char ^ \v'-.55m'\\s[\\n(.s/2u]\v'.3m'\(ha\v'-.3m'\s0\v'.55m' +.if !c\(va .char \(va \o'\(ua\(da' +.if !c\(em .char \(em -- +.if !c\(en .char \(en \- +.if !c\(fi .char \(fi fi +.if !c\(fl .char \(fl fl +.if !c\(ff .char \(ff ff +.if !c\(Fi .char \(Fi ffi +.if !c\(Fl .char \(Fl ffl +.if !c\(ci .char \(ci \v'-.25m'\h'.05m'\D'c .5m'\h'.05m'\v'.25m' +.if !c\(sq .char \(sq \h'.05m'\D'l .5m 0'\D'l 0 -.5m'\D'l -.5m 0'\D'l 0 .5m'\h'.55m' +.if !c\(ga .char \(ga \Z'\v'-.7m'\D'l .22m .18m''\h'.33m' +.if !c\(dg .char \(dg \Z'\h'.25m'\v'.15m'\D'l 0 -.8m'\v'.2m'\h'-.195m'\ +\D'l .39m 0''\h'.5m' +.if !c\(dd .char \(dd \Z'\h'.25m'\v'.15m'\D'l 0 -.8m'\v'.2m'\h'-.195m'\ +\D'l .39m 0'\v'.4m'\D'l -.39m 0''\h'.5m' +.if !c\(lq .char \(lq `` +.if !c\(rq .char \(rq '' +.if !c\(Bq .char \(bq ,, +.if !c\(OE .char \(OE O\h'-.25m'E +.if !c\(oe .char \(oe o\h'-.14m'e +.if !c\(ah .char \(ah \v'-.55m'\s[\En[.s]/2u]v\s0\v'.55m' +.if !c\(ao .char \(ao \v'-.55m'\s[\En[.s]*6u/10u]\D'c .25m'\s0\v'.55m' +.if !c\(ho .char \(ho \s[\En[.s]/2u]\v'.4m'c\v'-.4m'\s0 +.if !c\(lh .tr \(lh\(lA +.if !c\(rh .tr \(rh\(rA +.if !c\(bq .tr \(bq, +.if !c\(aq .tr \(aq' +.if '\*(.T'X100' .char \(rn \h'-\w'\(sr'u'\(rn\h'\w'\(sr'u' +.if !\n(_C .mso tmac.pspic +.cp \n(_C diff --git a/gnu/usr.bin/groff/tmac/tmac.Xps b/gnu/usr.bin/groff/tmac/tmac.Xps new file mode 100644 index 000000000000..92471abbc13d --- /dev/null +++ b/gnu/usr.bin/groff/tmac/tmac.Xps @@ -0,0 +1,44 @@ +.do mso tmac.ps +.nr _C \n(.C +.cp 0 +.de Xps-char +.char \\$1 \Z"\X'ps: invis'\\$2\X'ps: endinvis'"\\$1 +.. +.Xps-char \(bu \fS\(bu\fP +.Xps-char \(em "\v'-.25m'\h'.05m'\D'l .9m 0'\h'.05m'" +.Xps-char \(aq ' +.Xps-char \(bq , +.Xps-char \(Bq ,, +.Xps-char \(lq `` +.Xps-char \(rq '' +.Xps-char \(OE OE +.Xps-char \(oe oe +.Xps-char \(Fn \fS\(Fn\fP +.Xps-char \(vS \o'\(ahS' +.Xps-char \(vs \o'\(ahs' +.Xps-char \(vZ \o'\(ahZ' +.Xps-char \(vz \o'\(ahz' +.Xps-char \(/L \o'/L' +.Xps-char \(/l \o'/l' +.Xps-char \(:Y \o'\(adY' +.Xps-char \(a" \(sd +.Xps-char \(a. \v'-.6m'. +.Xps-char \(ga "\Z'\v'-.7m'\D'l .22m .18m''\h'.33m'" +.Xps-char \(ab \v'-.55m'\s'\\\\n(.s*6u/10u'u\s0 +.Xps-char \(ah \v'-.55m'\s[\En[.s]/2u]v\s0\v'.55m' +.Xps-char \(ao "\v'-.55m'\s[\En[.s]*6u/10u]\D'c .25m'\s0\v'.55m'" +.Xps-char \(ho \s[\En[.s]/2u]\v'.4m'c\v'-.4m'\s0 +.Xps-char \(.i i +.Xps-char \(fo < +.Xps-char \(fc > +.Xps-char \(OK \s'\\\\n(.s*6u/10u'\e\s0/ +.Xps-char \(tm \v'-.3m'\s'\\\\n(.s*6u/10u'TM\s0\v'.3m' +.Xps-char \(dd "\Z'\h'.25m'\v'.15m'\D'l 0 -.8m'\v'.2m'\h'-.195m'\ +\D'l .39m 0'\v'.4m'\D'l -.39m 0''\h'.5m'" +.Xps-char \(dg "\Z'\h'.25m'\v'.15m'\D'l 0 -.8m'\v'.2m'\h'-.195m'\ +\D'l .39m 0''\h'.5m'" +.Xps-char \(en \- +.Xps-char \(%0 %\s'\\\\n(.s*6u/10u'\fI0\fP\s0 +.Xps-char \(lh \(-> +.Xps-char \(rh \(<- +.cp \n(_C diff --git a/gnu/usr.bin/groff/tmac/tmac.an b/gnu/usr.bin/groff/tmac/tmac.an new file mode 100644 index 000000000000..017a6a8c0916 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/tmac.an @@ -0,0 +1,326 @@ +.\"Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +.\" Written by James Clark (jjc@jclark.com) +.\" +.\"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, 675 Mass Ave, Cambridge, MA 02139, USA. +.\" +.\" -rC1 => number pages continuously, rather than start each at 1 +.\" -rD1 => double-sided printing, ie different odd and even page footers +.\" -rPnnn => number first page nnn +.\" -rXnnn => number pages after nnn as nnna, nnnb, nnnc, ... +.\" +.\" The file man.local is loaded at the end. Put local additions there. +.\" If you need to add things to TH, use `.am TH'. +.\" +.if !\n(.g .ab These man macros work only with groff. +.nr _C \n(.C +.cp 0 +.if !rD .nr D 0 +.if !rC .nr C 0 +.if rP .pn 0\nP +.\" .TH title section extra1 extra2 extra3 +.de TH +.cp 0 +.de an-init \" We have to do it like this to get multiple man pages right. +.ds an-title "\\$1 +.ds an-section "\\$2 +.ds an-extra1 "\\$3 +.ie \\n[.$]>3 .ds an-extra2 "\\$4 +.el .ds an-extra2 \"Sun Release 4.0 +.ie \\n[.$]>4 .ds an-extra3 "\\$5 +.el .ds an-extra3 \"UNIX Programmer's Manual +.ds an-init +\\.. +.DT +.nr IN 7.2n +.nr LL 6.5i +.PD +.nr PS 10 \" normal point-size +.nr SN 3n \" the indentation of sub-sub-headings relative to sub-headings +.nr an-level 1 +.nr an-margin \\n[IN] +.nr an-prevailing-indent \\n[IN] +.nr an-tag-sep 1n +.nr an-no-space-flag 0 +.nr an-break-flag 0 +.nr an-div? 0 +.wh 0 an-header +.wh -1i an-footer +.wh -.5i an-p-footer +.if \\n[nl]>0 \{\ +. ie \\nC .bp \\n%+1 +. el .bp 1 +.\} +.. +.de DT +.ta T .5i \" This sets tabs every .5 inches +.. +.de PD +.ie \\n[.$] .nr PD (v;\\$1) +.el .nr PD .4v>?\n[.V] +.. +.de an-header +.an-init +.ev 1 +.sp .5i +.tl '\\*[an-title](\\*[an-section])'\\*[an-extra3]'\\*[an-title](\\*[an-section])' +.sp |1i +.ev +.ns +.. +.de an-footer +'bp +.. +.af an-page-letter a +.de an-p-footer +.ev 1 +.ds an-page-string \\n% +.if rX \{\ +. if \\n%>\\nX \{\ +. nr an-page-letter \\n%-\\nX +. ds an-page-string \\nX\\n[an-page-letter] +.\}\} +.ie \\nD \{\ +. if o .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]' +. if e .tl '\\*[an-page-string]'\\*[an-extra1]'\\*[an-extra2]' +.\} +.el .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]' +.ev +.. +.de SH +.sp \\n[PD]u +.nr an-level 1 +.nr an-margin \\n[IN] +.nr an-prevailing-indent \\n[IN] +.fi +.in \\n[IN]u +.ti 0 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.ps \\n[PS]-1 +.ft B +.ne 2v+1u +.if \\n[.$] \&\\$* +.. +.de SS +.sp \\n[PD]u +.nr an-level 1 +.nr an-margin \\n[IN] +.nr an-prevailing-indent \\n[IN] +.fi +.in \\n[IN]u +.ti \\n[SN]u +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.ps \\n[PS] +.ft B +.ne 2v+1u +.if \\n[.$] \&\\$* +.. +.de B +.it 1 an-trap +.ft B +.if \\n[.$] \&\\$* +.. +.de I +.it 1 an-trap +.ft I +.if \\n[.$] \&\\$* +.. +.de SM +.it 1 an-trap +.ps -1 +.if \\n[.$] \&\\$* +.. +.de SB +.it 1 an-trap +.ps -1 +.ft B +.if \\n[.$] \&\\$* +.. +.de TP +.sp \\n[PD]u +.if \\n[.$] .nr an-prevailing-indent (n;\\$1) +.it 1 an-trap +.if !\\n[an-div?] .di an-div +.in 0 +.nr an-div? 1 +.. +.de an-trap +.ft R +.ps \\n[PS] +.if \\n[an-break-flag] \{\ +. br +. nr an-break-flag 0 +.\} +.if \\n[an-no-space-flag] \{\ +. ns +. nr an-no-space-flag 0 +.\} +.if \\n[an-div?] .an-do-tag +.. +.de an-do-tag +.nr an-div? 0 +.br +.di +.in \\n[an-margin]u+\\n[an-prevailing-indent]u +.ti -\\n[an-prevailing-indent]u +.ie \\n[dl]+\\n[an-tag-sep]>\\n[an-prevailing-indent] \{\ +. ne 2v+1u +. an-div +. br +.\} +.el \{\ +. chop an-div +. ne 1v+1u +\\*[an-div]\\h'|\\n[an-prevailing-indent]u'\c +.\} +.. +.de LP +.br +.sp \\n[PD]u +.ps \\n[PS] +.ft R +.in \\n[an-margin]u +.nr an-prevailing-indent \\n[IN] +.. +.als PP LP +.als P LP +.de IP +.ie !\\n[.$] \{\ +. ps \\n[PS] +. ft R +. sp \\n[PD]u +. ne 1v+1u +. in \\n[an-margin]u+\\n[an-prevailing-indent]u +.\} +.el \{\ +. ie \\n[.$]-1 .TP "\\$2" +. el .TP +\&\\$1 +.\} +.. +.de HP +.ps \\n[PS] +.ft R +.sp \\n[PD]u +.ne 1v+1u +.if \\n[.$] .nr an-prevailing-indent (n;\\$1) +.in \\n[an-margin]u+\\n[an-prevailing-indent]u +.ti \\n[an-margin]u +.. +.de RI +.if \\n[.$] \{\ +. ds an-result \&\\$1 +. shift +. while \\n[.$]>=2 \{\ +. as an-result \,\fI\\$1\fR\/\\$2 +. shift 2 +. \} +. if \\n[.$] .as an-result \,\fI\\$1\fR +\\*[an-result] +.\} +.. +.de IR +.if \\n[.$] \{\ +. ds an-result \&\fI\\$1\fR +. shift +. while \\n[.$]>=2 \{\ +. as an-result \/\\$1\fI\,\\$2\fR +. shift 2 +. \} +. if \\n[.$] .as an-result \/\\$1 +\\*[an-result] +.\} +.. +.de IB +.if \\n[.$] \{\ +. ds an-result \&\fI\\$1 +. shift +. while \\n[.$]>=2 \{\ +. as an-result \/\\fB\\$1\fI\,\\$2 +. shift 2 +. \} +. if \\n[.$] .as an-result \/\\fB\\$1 +\\*[an-result] +. ft R +.\} +.. +.de BI +.if \\n[.$] \{\ +. ds an-result \&\fB\\$1 +. shift +. while \\n[.$]>=2 \{\ +. as an-result \,\fI\\$1\fB\/\\$2 +. shift 2 +. \} +. if \\n[.$] .as an-result \,\fI\\$1 +\\*[an-result] +. ft R +.\} +.. +.de RB +.ds an-result \& +.while \\n[.$]>=2 \{\ +. as an-result \fR\\$1\fB\\$2 +. shift 2 +.\} +.if \\n[.$] .as an-result \fR\\$1 +\\*[an-result] +.ft R +.. +.de BR +.ds an-result \& +.while \\n[.$]>=2 \{\ +. as an-result \fB\\$1\fR\\$2 +. shift 2 +.\} +.if \\n[.$] .as an-result \fB\\$1 +\\*[an-result] +.ft R +.. +.de RS +.br +.nr an-saved-margin\\n[an-level] \\n[an-margin] +.nr an-saved-prevailing-indent\\n[an-level] \\n[an-prevailing-indent] +.ie \\n[.$] .nr an-margin +(n;\\$1) +.el .nr an-margin +\\n[an-prevailing-indent] +.in \\n[an-margin]u +.nr an-prevailing-indent \\n[IN] +.nr an-level +1 +.. +.de RE +.br +.ie \\n[.$] .nr an-level (;\\$1)<?\\n[an-level] +.el .nr an-level -1 +.nr an-level 1>?\\n[an-level] +.nr an-margin \\n[an-saved-margin\\n[an-level]] +.nr an-prevailing-indent \\n[an-saved-prevailing-indent\\n[an-level]] +.in \\n[an-margin]u +.. +.ds S \s[\\n[PS]] +.ie c\[rg] .ds R \[rg] +.el .ds R (Reg.) +.ie c\[tm] .ds Tm \[tm] +.el .ds Tm (TM) +.ds lq \(lq +.ds rq \(rq +.hy 14 +.\" Load local modifications. +.mso man.local +.cp \n(_C diff --git a/gnu/usr.bin/groff/tmac/tmac.dvi b/gnu/usr.bin/groff/tmac/tmac.dvi new file mode 100644 index 000000000000..c64fc73ce739 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/tmac.dvi @@ -0,0 +1,132 @@ +.nr _C \n(.C +.cp 0 +.ftr CR CW +.ftr C CW +.ftr TT CW +.ftr HR H +.\" This uses the dvi-char_1 string in font CW, dvi-char_0 otherwise. +.char _ \R'dvi-char_ \\n(.f=\f(CW\\n(.f\fP'\\*[dvi-char_\\n[dvi-char_]] +.char \[ul] \R'dvi-char_ \w'M'=\w'i''\\*[dvi-char_\\n[dvi-char_]] +.\" Normally use a rule. +.ds dvi-char_0 \v'.23m'\D'R .5m .04m'\v'-.04m'\v'-.23m' +.\" In font CW use a real _ character. +.ds dvi-char_1 _ +.if !c\[rn] .char \[rn] \D'R .5m -.04m'\v'.04m' +.if !c\[br] .char \[br] \Z'\v'.25m'\D'R .04m -1m'' +.if !c\[ru] .char \[ru] \v'-.02m'\D'R .5m .04m'\v'-.04m'\v'.02m' +.if !c\[co] .char \[co] \z\(ci\h'\w'\(ci'u-\w'c'u/2u'c\h'\w'\(ci'u-\w'c'u/2u' +.if !c\[rg] .char \[rg] \z\(ci\h'\w'\(ci'u-\w'r'u/2u'r\h'\w'\(ci'u-\w'r'u/2u' +.if !c\[fm] .char \[fm] \v'-.35m'\s[\\n(.s*7u/10u]\[prime]\s0\v'.35m' +.if !c\[de] .char \[de] \h'.05m'\v'-.54m'\D'c .3m'\v'.54m'\h'.05m' +.if !c\[ct] .char \[ct] \o'c/' +.if !c\[sq] .char \[sq] \Z'\h'.05m'\D'R .4m -.04m'\v'.04m'\h'-.04m'\ +\D'R .04m -.4m'\v'.04m'\D'R -.4m -.04m'\D'R .04m .4m''\h'.5m' +.\"char \[sq] \h'.05m'\D'l .4m 0'\D'l 0 -.4m'\D'l -.4m 0'\D'l 0 .4m'\h'.45m' +.if !c\[!=] .char \[!=] \[slashnot]\(eq +.if !c\[tm] .char \[tm] \v'-.3m'\s[\\n(.s/2u]TM\s0\v'.3m' +.if !c\[aq] .char \[aq] ' +.if !c\[bq] .char \[bq] , +.if !c\[Bq] .char \[Bq] ,\h'\w'\(rq'u-(2u*\w"'"u)', +.if !c\[ho] .char \[ho] \s[\En[.s]/2u]\v'.4m'c\v'-.4m'\s0 +.if !c\[-D] .char \[-D] \Z'\v'-.1m'\h'.05m'-'D +.if !c\[Sd] .char \[Sd] \Z'\v'-.3m'\h'.35m'-'\(pd +.if !c\[TP] .char \[TP] I\h'-.25m'\v'-.33m'\s[\En[.s]*6u/10u]\v'.33m'D\ +\v'-.33m'\s0\v'.33m' +.if !c\[Tp] .char \[Tp] \zlp +.cflags 8 \(an +.if !c\[an] .char \[an] \h'-.167m'\(mi\h'-.167m' +.\" Define some fractions. +.de dvi-frac +.if !c\[\\$1\\$2] .char \[\\$1\\$2] \ +\v'-.25m'\s[\\\\n(.s*7u/10u]\\$1\s0\v'.25m'\h'-.2m'\ +/\h'-.2m'\v'.25m'\s[\\\\n(.s*7u/10u]\\$2\s0\v'-.25m' +.. +.dvi-frac 1 2 +.dvi-frac 3 4 +.dvi-frac 1 4 +.dvi-frac 1 8 +.dvi-frac 3 8 +.dvi-frac 5 8 +.dvi-frac 7 8 +.\" support for ISO Latin-1 +.if !c\[S1] .char \[S1] \v'-.2m'\s-31\s+3\v'+.2m' +.if !c\[S2] .char \[S2] \v'-.2m'\s-32\s+3\v'+.2m' +.if !c\[S3] .char \[S3] \v'-.2m'\s-33\s+3\v'+.2m' +.if !c\[Of] .char \[Of] \v'-.2m'\s'\En(.s*6u/10u'\o'_a'\s0\v'.2m' +.if !c\[Om] .char \[Om] \v'-.2m'\s'\En(.s*6u/10u'\o'_o'\s0\v'.2m' +.if !c\[Fo] .char \[Fo] << +.if !c\[Fc] .char \[Fc] >> +.if !c\[bb] .char \[bb] | +.if !c\[Ye] .char \[Ye] \o'-Y' +.if !c\[Cs] .char \[Cs] \o'\[mu]o' +.de dvi-achar +.\" Note that character definitions are always interpreted with +.\" compatibility mode off. +.if !c\\$1 \{\ +.char \\$1 \\$3\ +\k[acc]\ +\h'(u;-\w'\\$2'-\w'\\$3'/2+\\\\n[skw]+(\w'x'*0)-\\\\n[skw])'\ +\v'(u;\w'x'*0+\\\\n[rst]+(\w'\\$3'*0)-\\\\n[rst])'\ +\\$2\ +\v'(u;\w'x'*0-\\\\n[rst]+(\w'\\$3'*0)+\\\\n[rst])'\ +\h'|\\\\n[acc]u' +.\} +.hcode \\$1\\$4 +.. +.dvi-achar \(`A \` A a +.dvi-achar \('A \' A a +.dvi-achar \(^A ^ A a +.dvi-achar \(~A ~ A a +.dvi-achar \(:A \(ad A a +.dvi-achar \(oA \(ao A a +.dvi-achar \(`E \` E e +.dvi-achar \('E \' E e +.dvi-achar \(^E ^ E e +.dvi-achar \(:E \(ad E e +.dvi-achar \(`I \` I i +.dvi-achar \('I \' I i +.dvi-achar \(^I ^ I i +.dvi-achar \(:I \(ad I i +.dvi-achar \(~N ~ N n +.dvi-achar \(`O \` O o +.dvi-achar \('O \' O o +.dvi-achar \(^O ^ O o +.dvi-achar \(~O ~ O o +.dvi-achar \(:O \(ad O o +.dvi-achar \(`U \` U u +.dvi-achar \('U \' U u +.dvi-achar \(^U ^ U u +.dvi-achar \(:U \(ad U u +.dvi-achar \('Y \' Y y +.dvi-achar \(`a \` a a +.dvi-achar \('a \' a a +.dvi-achar \(^a ^ a a +.dvi-achar \(~a ~ a a +.dvi-achar \(:a \(ad a a +.dvi-achar \(oa \(ao a a +.dvi-achar \(`e \` e e +.dvi-achar \('e \' e e +.dvi-achar \(^e ^ e e +.dvi-achar \(:e \(ad e e +.dvi-achar \(`i \` \(.i i +.dvi-achar \('i \' \(.i i +.dvi-achar \(^i ^ \(.i i +.dvi-achar \(:i \(ad \(.i i +.dvi-achar \(~n ~ n n +.dvi-achar \(`o \` o o +.dvi-achar \('o \' o o +.dvi-achar \(^o ^ o o +.dvi-achar \(~o ~ o o +.dvi-achar \(:o \(ad o o +.dvi-achar \(`u \` u u +.dvi-achar \('u \' u u +.dvi-achar \(^u ^ u u +.dvi-achar \(:u \(ad u u +.dvi-achar \('y \' y y +.dvi-achar \(:y \(ad y y +.char \(,C \o'\(acc' +.hcode \(,Cc +.char \(,c \o'\(acc' +.hcode \(,cc +.cp \n(_C +.do mso tmac.latin1 diff --git a/gnu/usr.bin/groff/tmac/tmac.latin1 b/gnu/usr.bin/groff/tmac/tmac.latin1 new file mode 100644 index 000000000000..f33ea2164ddc --- /dev/null +++ b/gnu/usr.bin/groff/tmac/tmac.latin1 @@ -0,0 +1,101 @@ +.nr _C \n(.C +.cp 0 +.de latin1-tr +.if c\\$2 .if !c\\$1 .tr \\$1\\$2 +.. +.latin1-tr \[char161] \(r! +.latin1-tr \[char162] \(ct +.latin1-tr \[char163] \(Po +.latin1-tr \[char164] \(Cs +.latin1-tr \[char165] \(Ye +.latin1-tr \[char166] \(bb +.latin1-tr \[char167] \(sc +.latin1-tr \[char168] \(ad +.latin1-tr \[char169] \(co +.latin1-tr \[char170] \(Of +.latin1-tr \[char171] \(Fo +.latin1-tr \[char172] \(no +.latin1-tr \[char173] \(hy +.latin1-tr \[char174] \(rg +.latin1-tr \[char175] \(a- +.latin1-tr \[char176] \(de +.latin1-tr \[char177] \(+- +.latin1-tr \[char178] \(S2 +.latin1-tr \[char179] \(S3 +.latin1-tr \[char180] \(aa +.latin1-tr \[char181] \(*m +.latin1-tr \[char182] \(ps +.latin1-tr \[char183] \(md +.latin1-tr \[char184] \(ac +.latin1-tr \[char185] \(S1 +.latin1-tr \[char186] \(Om +.latin1-tr \[char187] \(Fc +.latin1-tr \[char188] \(14 +.latin1-tr \[char189] \(12 +.latin1-tr \[char190] \(34 +.latin1-tr \[char191] \(r? +.latin1-tr \[char192] \(`A +.latin1-tr \[char193] \('A +.latin1-tr \[char194] \(^A +.latin1-tr \[char195] \(~A +.latin1-tr \[char196] \(:A +.latin1-tr \[char197] \(oA +.latin1-tr \[char198] \(AE +.latin1-tr \[char199] \(,C +.latin1-tr \[char200] \(`E +.latin1-tr \[char201] \('E +.latin1-tr \[char202] \(^E +.latin1-tr \[char203] \(:E +.latin1-tr \[char204] \(`I +.latin1-tr \[char205] \('I +.latin1-tr \[char206] \(^I +.latin1-tr \[char207] \(:I +.latin1-tr \[char208] \(-D +.latin1-tr \[char209] \(~N +.latin1-tr \[char210] \(`O +.latin1-tr \[char211] \('O +.latin1-tr \[char212] \(^O +.latin1-tr \[char213] \(~O +.latin1-tr \[char214] \(:O +.latin1-tr \[char215] \(mu +.latin1-tr \[char216] \(/O +.latin1-tr \[char217] \(`U +.latin1-tr \[char218] \('U +.latin1-tr \[char219] \(^U +.latin1-tr \[char220] \(:U +.latin1-tr \[char221] \('Y +.latin1-tr \[char222] \(TP +.latin1-tr \[char223] \(ss +.latin1-tr \[char224] \(`a +.latin1-tr \[char225] \('a +.latin1-tr \[char226] \(^a +.latin1-tr \[char227] \(~a +.latin1-tr \[char228] \(:a +.latin1-tr \[char229] \(oa +.latin1-tr \[char230] \(ae +.latin1-tr \[char231] \(,c +.latin1-tr \[char232] \(`e +.latin1-tr \[char233] \('e +.latin1-tr \[char234] \(^e +.latin1-tr \[char235] \(:e +.latin1-tr \[char236] \(`i +.latin1-tr \[char237] \('i +.latin1-tr \[char238] \(^i +.latin1-tr \[char239] \(:i +.latin1-tr \[char240] \(Sd +.latin1-tr \[char241] \(~n +.latin1-tr \[char242] \(`o +.latin1-tr \[char243] \('o +.latin1-tr \[char244] \(^o +.latin1-tr \[char245] \(~o +.latin1-tr \[char246] \(:o +.latin1-tr \[char247] \(di +.latin1-tr \[char248] \(/o +.latin1-tr \[char249] \(`u +.latin1-tr \[char250] \('u +.latin1-tr \[char251] \(^u +.latin1-tr \[char252] \(:u +.latin1-tr \[char253] \('y +.latin1-tr \[char254] \(Tp +.latin1-tr \[char255] \(:y +.cp \n(_C diff --git a/gnu/usr.bin/groff/tmac/tmac.pic b/gnu/usr.bin/groff/tmac/tmac.pic new file mode 100644 index 000000000000..1177fc09d179 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/tmac.pic @@ -0,0 +1,10 @@ +.de PS +.br +.sp .3v +.ne 0\\$1+1v+\n(.Vu +.in \\n(.lu-\\n(.iu-0\\$2/2u>?0 +.. +.de PE +.in +.sp .3v+.5m +.. diff --git a/gnu/usr.bin/groff/tmac/tmac.ps b/gnu/usr.bin/groff/tmac/tmac.ps new file mode 100644 index 000000000000..d7d655dbad42 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/tmac.ps @@ -0,0 +1,52 @@ +.nr _C \n(.C +.cp 0 +.ftr AX ABI +.ftr KR BMR +.ftr KI BMI +.ftr KB BMB +.ftr KX BMBI +.ftr CW CR +.ftr CO CI +.ftr CX CBI +.ftr H HR +.ftr HO HI +.ftr HX HBI +.ftr Hr HNR +.ftr Hi HNI +.ftr Hb HNB +.ftr Hx HNBI +.ftr NX NBI +.ftr PA PR +.ftr PX PBI +.ftr ZI ZCMI +.ftr C CR +.cflags 8 \(an +.char \(rn \h'-\w'\(sr'u'\(rn\h'\w'\(sr'u' +.char \(mo \h'.08m'\(mo\h'-.08m' +.char \(nm \h'.08m'\(nm\h'-.08m' +.char \[parenlefttp] \[parenlefttp]\h'.016m' +.char \[parenleftbt] \[parenleftbt]\h'.016m' +.char \[parenleftex] \[parenleftex]\h'.016m' +.char \[parenrighttp] \[parenrighttp]\h'.016m' +.char \[parenrightbt] \[parenrightbt]\h'.016m' +.char \[parenrightex] \[parenrightex]\h'.016m' +.if !c\[va] .char \[va] \o'\[ua]\[da]' +.if !c\[ci] \ +.char \[ci] \v'-.25m'\h'.05m'\D'c .5m'\h'.05m'\v'.25m' +.if !c\[sq] \ +.char \[sq] \h'.05m'\D'l .5m 0'\D'l 0 -.5m'\D'l -.5m 0'\D'l 0 .5m'\h'.55m' +.if !c\[ru] .char \[ru] \D'l .5m 0' +.if !c\[ul] .char \[ul] \v'.25m'\D'l .5m 0'\v'-.25m' +.if !c\[br] .char \[br] \Z'\v'.25m'\D'l 0 -1m'' +.if !c\[or] .char \[or] \h'.1m'\Z'\D'l 0 -.675m''\h'.1m' +.if !c\[Fi] .char \[Fi] ffi +.if !c\[Fl] .char \[Fl] ffl +.if !c\[ff] .char \[ff] ff +.if !c\[ij] .char \[ij] ij +.if !c\[IJ] .char \[IJ] IJ +.if !c\[tm] .char \[tm] \s-3\v'-.3m'TM\v'+.3m'\s+3 +.\" pic tests this register to see whether it should use \X'ps:...' +.nr 0p 1 +.cp \n(_C +.if !\n(.C .mso tmac.pspic +.do mso tmac.psold diff --git a/gnu/usr.bin/groff/tmac/tmac.psatk b/gnu/usr.bin/groff/tmac/tmac.psatk new file mode 100644 index 000000000000..b59d23a24e7e --- /dev/null +++ b/gnu/usr.bin/groff/tmac/tmac.psatk @@ -0,0 +1,61 @@ +.\" Implementation of the ATK PB and PE macros for use with groff and grops. +.\" Load this after tmac.atk. +.nr zT 0 +.if '\*(.T'ps' .nr zT 1 +.nr psatk-unit 1p +.de psatk-defs +ps: mdef 5 +/PB { + /saved save def + currentpoint translate + \n[psatk-unit] u -\n[psatk-unit] u scale + userdict begin + /showpage {} def +} bind def +/PE { + end + saved restore +} bind def +/troffadjust { + pop 0 +} bind def +.. +.de PB +.ne \\$1p +.nr zT \\n(zT>0 +\\*[PB\\n(zT]\\ +.. +.de PE +\\*[PE\\n(zT]\\ +.. +.ds PB0 +.\" The last line before the "'PE" is "\}" rather than ".\}". This +.\" would cause a spurious space to be introduced before any picture +.\" that was the first thing on a line. So we have to catch that and +.\" remove it. +.de PB1 +.ev psatk +.fi +.di psatk-mac +\!ps: exec PB +.. +.de PE0 +\v'-.75m'\ +\D'l \\$1p 0'\D'l 0 \\$2p'\D'l -\\$1p 0'\D'l 0 -\\$2p'\ +\h'\\$1p'\v'.75m'\x'\\$2p-1m>?0'\c +.. +.ds psatk-init \Y[psatk-defs] +.de PE1 +\!PE +.di +.di null +.br +.di +.rm null +.ev +\v'-.75m'\ +\\*[psatk-init]\Y[psatk-mac]\ +\h'\\$1p'\v'.75m'\x'\\$2p-1m>?0'\c +.rm psatk-mac +.if \\n(.P .ds psatk-init +.. diff --git a/gnu/usr.bin/groff/tmac/tmac.psfig b/gnu/usr.bin/groff/tmac/tmac.psfig new file mode 100644 index 000000000000..5f4111ce6a16 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/tmac.psfig @@ -0,0 +1,87 @@ +.\" These are macros to make psfig work with groff. +.\" They require that psfig be patched as described in ../grops/psfig.diff. +.de psfig-defs +ps: mdef 100 + +% wid ht llx lly urx ury psfigstart - + +/psfigstart { + /level1 save def + /ury exch def + /urx exch def + /lly exch def + /llx exch def + /ht exch u def + /wid exch u def + currentpoint ht add translate + wid urx llx sub div ht ury lly sub div neg scale + llx neg lly neg translate + + % set the graphics state to default values + 0 setgray + 0 setlinecap + 1 setlinewidth + 0 setlinejoin + 10 setmiterlimit + [] 0 setdash + newpath + /showpage {} def +} bind def + +% psfigclip - + +/psfigclip { + currentpoint newpath + llx lly moveto + urx lly lineto + urx ury lineto + llx ury lineto + closepath clip + newpath moveto +} bind def + +% psfigend - + +/psfigend { + level1 restore +} bind def + +% globalstart - + +/globalstart { + % save the current space code on the stack + SC + level0 restore +} bind def + +% globalend - + +/globalend { + end + BP + /SC exch def + DEFS begin +} bind def +.. +.de psfig-init +.if \\n[.P] \{\ +\Y[psfig-defs] +. br +. sp -1 +. ds psfig-init\" empty +. rm psfig-defs +.\} +.. +.de F+ +.br +.psfig-init +.nr psfig-fill \\n[.u] +.nf +.sp -.5 +.if !\\n[.$] .ce 9999 +.. +.de F- +.br +.ce 0 +.if \\n[psfig-fill] .fi +.. diff --git a/gnu/usr.bin/groff/tmac/tmac.psnew b/gnu/usr.bin/groff/tmac/tmac.psnew new file mode 100644 index 000000000000..e13bdb88696c --- /dev/null +++ b/gnu/usr.bin/groff/tmac/tmac.psnew @@ -0,0 +1,26 @@ +.\" Undo the effect of tmac.psold. This gives access to the additional +.\" characters that are present in the text fonts of newer PostScript +.\" printers. It is a bad idea to use this if you are going to +.\" distribute the resulting PostScript output to others. +.nr _C \n(.C +.cp 0 +.rchar \('y\('Y\(12\(14\(34\(S1\(S2\(S3\(bb\(de\(Tp\(TP\(-D\(Sd +.tr \[char166]\[char166] +.tr \[char176]\[char176] +.tr \[char177]\[char177] +.tr \[char178]\[char178] +.tr \[char179]\[char179] +.tr \[char181]\[char181] +.tr \[char185]\[char185] +.tr \[char188]\[char188] +.tr \[char189]\[char189] +.tr \[char190]\[char190] +.tr \[char208]\[char208] +.tr \[char215]\[char215] +.tr \[char221]\[char221] +.tr \[char222]\[char222] +.tr \[char240]\[char240] +.tr \[char247]\[char247] +.tr \[char253]\[char253] +.tr \[char254]\[char254] +.cp \n(_C diff --git a/gnu/usr.bin/groff/tmac/tmac.psold b/gnu/usr.bin/groff/tmac/tmac.psold new file mode 100644 index 000000000000..04a5f6df49f0 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/tmac.psold @@ -0,0 +1,60 @@ +.\" In the newer PostScript printers, the text fonts contain all ISO Latin-1 +.\" characters. The font description files that comes with groff match +.\" these fonts. The text fonts in older PostScript printers are missing +.\" some of these characters. This file prevents those characters from +.\" being used. This will allow the PostScript output to be printed on both +.\" old and new printers. The effect of this file can be undone by +.\" tmac.psnew. +.nr _C \n(.C +.cp 0 +.\" Define an accented character. +.de ps-achar +.\" Note that character definitions are always interpreted with +.\" compatibility mode off. +.char \\$1 \\$3\ +\k[acc]\ +\h'(u;-\w'\\$2'-\w'\\$3'/2+\\\\n[skw]+(\w'x'*0)-\\\\n[skw])'\ +\v'(u;\w'x'*0+\\\\n[rst]+(\w'\\$3'*0)-\\\\n[rst])'\ +\\$2\ +\v'(u;\w'x'*0-\\\\n[rst]+(\w'\\$3'*0)+\\\\n[rst])'\ +\h'|\\\\n[acc]u' +.ie '\\$3'\(.i' .hcode \\$1i +.el .hcode \\$1\\$3 +.. +.ps-achar \['y] \(aa y +.ps-achar \['Y] \(aa Y +.char \[12] \v'-.7m\s[\\n(.s*6u/10u]+.7m'1\v'-.7m\s0+.7m'\ +\(f/\s[\\n(.s*6u/10u]2\s0 +.char \[14] \v'-.7m\s[\\n(.s*6u/10u]+.7m'1\v'-.7m\s0+.7m'\ +\(f/\s[\\n(.s*6u/10u]4\s0 +.char \[34] \v'-.7m\s[\\n(.s*6u/10u]+.7m'3\v'-.7m\s0+.7m'\ +\(f/\s[\\n(.s*6u/10u]4\s0 +.char \[S1] \v'-.2m'\s-31\s+3\v'+.2m' +.char \[S2] \v'-.2m'\s-32\s+3\v'+.2m' +.char \[S3] \v'-.2m'\s-33\s+3\v'+.2m' +.char \[bb] | +.char \[de] \fS\(de +.char \[-D] \Z'\v'-.1m'-'D +.char \[TP] \ +I\h'-.25m'\v'-.33m'\s'\En(.s*6u/10u'\v'.33m'D\v'-.33m'\s0\v'.33m' +.char \[Sd] \Z'\v'-.3m'\h'.2m'-'\(pd +.char \[Tp] \zlp +.tr \[char166]\[bb] +.tr \[char176]\[de] +.tr \[char177]\[+-] +.tr \[char178]\[S2] +.tr \[char179]\[S3] +.tr \[char181]\[*m] +.tr \[char185]\[S1] +.tr \[char188]\[14] +.tr \[char189]\[12] +.tr \[char190]\[34] +.tr \[char208]\[-D] +.tr \[char215]\[mu] +.tr \[char221]\['Y] +.tr \[char222]\[TP] +.tr \[char240]\[Sd] +.tr \[char247]\[di] +.tr \[char253]\['y] +.tr \[char254]\[Tp] +.cp \n(_C diff --git a/gnu/usr.bin/groff/tmac/tmac.pspic b/gnu/usr.bin/groff/tmac/tmac.pspic new file mode 100644 index 000000000000..9923907ff716 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/tmac.pspic @@ -0,0 +1,41 @@ +.\" Define the PSPIC macro. +.\" When used other than with -Tps, it will draw a box around where +.\" the picture would go. +.de ps-bb +.nr ps-nargs \\n[.$] +.if \\n[ps-nargs]=4 \{\ +. nr ps-llx 0\\$1 +. nr ps-lly 0\\$2 +. nr ps-urx 0\\$3 +. nr ps-ury 0\\$4 +.\} +.. +.de PSPIC +.br +.sy echo .ps-bb `psbb \\$1` >/tmp/psbb\\n[$$] +.so /tmp/psbb\\n[$$] +.if \\n[ps-nargs]=4 \{\ +. nr ps-wid (\\n[ps-urx]-\\n[ps-llx]) +. nr ps-ht (\\n[ps-ury]-\\n[ps-lly]) +. if \\n[ps-wid]<0 .nr ps-wid 0-\\n[ps-wid] +. if \\n[ps-ht]<0 .nr ps-ht 0-\\n[ps-ht] +. ie \\n[.$]>=2 .nr ps-deswid (i;\\$2) +. el .nr ps-deswid \\n[.l]-\\n[.i]<?\\n[ps-wid]p +. ie \\n[.$]>=3 .nr ps-desht (i;\\$3) +. el .nr ps-desht \\n[ps-deswid]*1000+(\\n[ps-wid]/2)/\\n[ps-wid]\ +*\\n[ps-ht]+500/1000 +. ne \\n[ps-desht]u+1v +. nr ps-offset \\n[.l]-\\n[.i]-\\n[ps-deswid]/2 +. ie \\n[.$]>=3 .ds ps-desht \\n[ps-desht] +. el .ds ps-desht \" empty +\h'\\n[ps-offset]u'\ +\X'ps: invis'\ +\Z'\D'p 0 \\n[ps-desht]u \\n[ps-deswid]u 0 0 -\\n[ps-desht]u''\ +\X'ps: endinvis'\ +\v'\\n[ps-desht]u'\X'ps: import \\$1 \ +\\n[ps-llx] \\n[ps-lly] \\n[ps-urx] \\n[ps-ury] \\n[ps-deswid] \\*[ps-desht]' +. br +. sp \\n[ps-desht]u +.\} +.sy rm /tmp/psbb\\n[$$] +.. diff --git a/gnu/usr.bin/groff/tmac/tmac.s b/gnu/usr.bin/groff/tmac/tmac.s new file mode 100644 index 000000000000..9afb7e6f0bfb --- /dev/null +++ b/gnu/usr.bin/groff/tmac/tmac.s @@ -0,0 +1,1803 @@ +.ig +Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. + Written by James Clark (jjc@jclark.com) + +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, 675 Mass Ave, Cambridge, MA 02139, USA. +.. +.if !\n(.g .ab These ms macros require groff. +.if \n(.C \ +. ab The groff ms macros do not work in compatibility mode. +.\" Enable warnings. You can delete this if you want. +.warn +.\" See if already loaded. +.if r GS .nx +.nr GS 1 +.de @error +.tm \\n(.F:\\n(.c: macro error: \\$* +.. +.de @warning +.tm \\n(.F:\\n(.c: macro warning: \\$* +.. +.de @fatal +.ab \\n(.F:\\n(.c: fatal macro error: \\$* +.. +.de @not-implemented +.@error sorry, \\$0 not implemented +.als \\$0 @nop +.. +.als TM @not-implemented +.als CT @not-implemented +.de @nop +.. +.de @init +.\" a non-empty environment +.ev ne +\c +.ev +.ev nf +'nf +.ev +.. +.ds REFERENCES References +.ds ABSTRACT ABSTRACT +.ds TOC Table of Contents +.ds MONTH1 January +.ds MONTH2 February +.ds MONTH3 March +.ds MONTH4 April +.ds MONTH5 May +.ds MONTH6 June +.ds MONTH7 July +.ds MONTH8 August +.ds MONTH9 September +.ds MONTH10 October +.ds MONTH11 November +.ds MONTH12 December +.ds MO \\*[MONTH\n[mo]] +.nr *year \n[yr]+1900 +.ds DY \n[dy] \*[MO] \n[*year] +.de ND +.if \\n[.$] .ds DY "\\$* +.. +.de DA +.if \\n[.$] .ds DY "\\$* +.ds CF \\*[DY] +.. +.\" indexing +.de IX +.tm \\$1\t\\$2\t\\$3\t\\$4 ... \\n[PN] +.. +.\" print an error message and then try to recover +.de @error-recover +.@error \\$@ (recovering) +.nr *pop-count 0 +.while !'\\n(.z'' \{\ +. \"@warning automatically terminating diversion \\n(.z +. ie d @div-end!\\n(.z .@div-end!\\n(.z +. el .*div-end-default +. nr *pop-count +1 +. \" ensure that we don't loop forever +. if \\n[*pop-count]>20 .@fatal recovery failed +.\} +.while !'\\n[.ev]'0' .ev +.par@reset-env +.par@reset +.. +.de *div-end-default +.ds *last-div \\n(.z +.br +.di +.ev nf +.\\*[*last-div] +.ev +.. +.\" **************************** +.\" ******** module cov ******** +.\" **************************** +.\" Cover sheet and first page. +.de cov*err-not-after-first-page +.@error \\$0 is not allowed after the first page has started +.. +.de cov*err-not-before-tl +.@error \\$0 is not allowed before TL +.. +.de cov*err-not-again +.@error \\$0 is not allowed more than once +.. +.de cov*err-not-after-ab +.@error \\$0 is not allowed after first AB, LP, PP, IP, SH or NH +.. +.als AU cov*err-not-before-tl +.als AI cov*err-not-before-tl +.als AB cov*err-not-before-tl +.de cov*first-page-init +.rm cov*first-page-init +.par@init +.als RP cov*err-not-after-first-page +.@init +.ie \\n[cov*rp-format] \{\ +. pg@cs-top +. als FS cov*FS +. als FE cov*FE +.\} +.el \{\ +. pg@top +. als FS @FS +. als FE @FE +.\} +.wh 0 pg@top +.. +.wh 0 cov*first-page-init +.\" This handles the case where FS occurs before TL or LP. +.de FS +.br +\\*[FS]\\ +.. +.nr cov*rp-format 0 +.nr cov*rp-no 0 +.\" released paper format +.de RP +.nr cov*rp-format 1 +.if \\n[.$] .if '\\$1'no' .nr cov*rp-no 1 +.pn 0 +.. +.de TL +.br +.als TL cov*err-not-again +.rn @AB AB +.rn @AU AU +.rn @AI AI +.di cov*tl-div +.par@reset +.ft B +.ps +2 +.vs +3p +.ll (u;\\n[LL]*5/6) +.nr cov*n-au 0 +.. +.de @AU +.par@reset +.if !'\\n(.z'' \{\ +. br +. di +.\} +.nr cov*n-au +1 +.di cov*au-div!\\n[cov*n-au] +.nf +.ft I +.ps \\n[PS] +.. +.de @AI +.par@reset +.if !'\\n(.z'' \{\ +. br +. di +.\} +.ie !\\n[cov*n-au] .@error AI before AU +.el \{\ +. di cov*ai-div!\\n[cov*n-au] +. nf +. ft R +. ps \\n[PS] +.\} +.. +.de LP +.if !'\\n[.z]'' \{\ +. br +. di +.\} +.br +.cov*ab-init +.cov*print +\\*[\\$0]\\ +.. +.als IP LP +.als PP LP +.als XP LP +.als NH LP +.als SH LP +.als MC LP +.als RT LP +.als XS LP +.de cov*ab-init +.als cov*ab-init @nop +.als LP @LP +.als IP @IP +.als PP @PP +.als XP @XP +.als RT @RT +.als XS @XS +.als SH @SH +.als NH @NH +.als QP @QP +.als RS @RS +.als RE @RE +.als QS @QS +.als QE @QE +.als MC @MC +.als EQ @EQ +.als EN @EN +.als AB cov*err-not-after-ab +.als AU par@AU +.als AI par@AI +.als TL par@TL +.. +.de @AB +.if !'\\n(.z'' \{\ +. br +. di +.\} +.cov*ab-init +.di cov*ab-div +.par@ab-indent +.par@reset +.if !'\\$1'no' \{\ +. ft I +. ce 1 +\\*[ABSTRACT] +. sp +. ft R +.\} +.ns +.@PP +.. +.de AE +.ie '\\n(.z'cov*ab-div' \{\ +. als AE cov*err-not-again +. br +. di +.\" nr cov*ab-height \\n[dn] +. par@reset-env +. par@reset +. cov*print +.\} +.el .@error AE without AB +.. +.de @div-end!cov*ab-div +.AE +.. +.de cov*print +.als cov*print @nop +.ie d cov*tl-div \{\ +. ie \\n[cov*rp-format] .cov*rp-print +. el .cov*draft-print +.\} +.el \{\ +. if \\n[cov*rp-format] \{\ +. @warning RP format but no TL +. bp 1 +. als FS @FS +. als FE @FE +. \} +. br +.\} +.. +.de cov*rp-print +.nr cov*page-length \\n[.p] +.pl 1000i +.cov*tl-au-print +.sp 3 +.if d cov*ab-div \{\ +. nf +. cov*ab-div +.\} +.sp 3 +.par@reset +\\*[DY] +.br +.if \\n[cov*fn-height] \{\ +. sp |(u;\\n[cov*page-length]-\\n[FM]\ +-\\n[cov*fn-height]-\\n[fn@sep-dist]>?\\n[nl]) +. fn@print-sep +. ev nf +. cov*fn-div +. ev +. ie \\n[cov*rp-no] .rm cov*fn-div +. el \{\ +. rn cov*fn-div fn@overflow-div +. nr fn@have-overflow 1 +. \} +.\} +.als FS @FS +.als FE @FE +.\" If anything was printed below where the footer line is normally printed, +.\" then that's an overflow. +.if -\\n[FM]/2+1v+\\n[cov*page-length]<\\n[nl] .@error cover sheet overflow +.pl \\n[cov*page-length]u +.bp 1 +.if !\\n[cov*rp-no] .cov*tl-au-print +.rs +.sp 1 +.. +.de cov*draft-print +.cov*tl-au-print +.if d cov*ab-div \{\ +. nf +. sp 2 +. cov*ab-div +.\} +.sp 1 +.. +.de cov*tl-au-print +.par@reset +.nf +.rs +.sp 3 +.ce 9999 +.cov*tl-div +.nr cov*i 1 +.nr cov*sp 1v +.while \\n[cov*i]<=\\n[cov*n-au] \{\ +. sp \\n[cov*sp]u +. cov*au-div!\\n[cov*i] +. ie d cov*ai-div!\\n[cov*i] \{\ +. sp .5v +. cov*ai-div!\\n[cov*i] +. nr cov*sp 1v +. \} +. el .nr cov*sp .5v +. nr cov*i +1 +.\} +.ce 0 +.. +.nr cov*fn-height 0 +.nr cov*in-fn 0 +.\" start of footnote on cover +.de cov*FS +.if \\n[cov*in-fn] \{\ +. @error nested FS +. FE +.\} +.nr cov*in-fn 1 +.ev fn +.par@reset-env +.da cov*fn-div +.if !\\n[cov*fn-height] .ns +.ie \\n[.$] .FP "\\$1" no +.el .@LP +.. +.de @div-end!cov*fn-div +.cov*FE +.. +.\" end of footnote on cover +.de cov*FE +.ie '\\n(.z'cov*fn-div' \{\ +. br +. ev +. di +. nr cov*in-fn 0 +. nr cov*fn-height +\\n[dn] +.\} +.el .@error FE without matching FS +.. +.\" *************************** +.\" ******** module pg ******** +.\" *************************** +.\" Page-level formatting. +.\" > 0 if we have a footnote on the current page +.nr pg@fn-flag 0 +.nr pg@colw 0 +.nr pg@fn-colw 0 +.nr HM 1i +.nr FM 1i +.nr PO 1i +.ds LF +.ds CF +.ds RF +.ds LH +.ds CH -\\n[PN]- +.ds RH +.ds pg*OH '\\*[LH]'\\*[CH]'\\*[RH]' +.ds pg*EH '\\*[LH]'\\*[CH]'\\*[RH]' +.ds pg*OF '\\*[LF]'\\*[CF]'\\*[RF]' +.ds pg*EF '\\*[LF]'\\*[CF]'\\*[RF]' +.de OH +.ds pg*\\$0 "\\$* +.. +.als EH OH +.als OF OH +.als EF OH +.de PT +.ie \\n%=1 .if \\n[pg*P1] .tl \\*[pg*OH] +.el \{\ +. ie o .tl \\*[pg*OH] +. el .tl \\*[pg*EH] +.\} +.. +.de BT +.ie o .tl \\*[pg*OF] +.el .tl \\*[pg*EF] +.. +.nr pg*P1 0 +.de P1 +.nr pg*P1 1 +.. +.wh -\n[FM]u pg@bottom +.wh -\n[FM]u/2u pg*footer +.nr MINGW 2n +.nr pg@ncols 1 +.de @MC +.if !'\\n(.z'' .error-recover MC while diversion open +.br +.ie \\n[pg@ncols]>1 .pg@super-eject +.el \{\ +. \" flush out any floating keeps +. while \\n[kp@tail]>\\n[kp@head] \{\ +. rs +. bp +. \} +.\} +.ie !\\n(.$ \{\ +. nr pg@colw \\n[LL]*7/15 +. nr pg*gutw \\n[LL]-(2*\\n[pg@colw]) +. nr pg@ncols 2 +.\} +.el \{\ +. nr pg@colw (n;\\$1)<?\\n[LL] +. ie \\n[.$]<2 .nr pg*gutw \\n[MINGW] +. el .nr pg*gutw (n;\\$2) +. nr pg@ncols \\n[LL]-\\n[pg@colw]/(\\n[pg@colw]+\\n[pg*gutw])+1 +. ie \\n[pg@ncols]>1 \ +. nr pg*gutw \\n[LL]-(\\n[pg@ncols]*\\n[pg@colw])/(\\n[pg@ncols]-1) +. el .nr pg*gutw 0 +.\} +.mk pg*col-top +.ns +.nr pg*col-num 0 +.nr pg@fn-colw \\n[pg@colw]*5/6 +.par@reset +.. +.de 2C +.MC +.. +.de 1C +.MC \\n[LL]u +.. +.\" top of page macro +.de pg@top +.ch pg*footer -\\n[FM]u/2u +.nr PN \\n% +.nr pg*col-num 0 +.nr pg@fn-bottom-margin 0 +.nr pg*saved-po \\n[PO] +.po \\n[PO]u +.ev h +.par@reset +.sp (u;\\n[HM]/2) +.PT +.sp |\\n[HM]u +.if d HD .HD +.mk pg@header-bottom +.ev +.mk pg*col-top +.pg*start-col +.. +.de pg*start-col +.\" Handle footnote overflow before floating keeps, because the keep +.\" might contain an embedded footnote. +.fn@top-hook +.kp@top-hook +.tbl@top-hook +.ns +.. +.de pg@cs-top +.sp \\n[HM]u +.\" move pg@bottom and pg*footer out of the way +.ch pg@bottom \\n[.p]u*2u +.ch pg*footer \\n[.p]u*2u +.ns +.. +.de pg@bottom +.tbl@bottom-hook +.if \\n[pg@fn-flag] .fn@bottom-hook +.nr pg*col-num +1 +.ie \\n[pg*col-num]<\\n[pg@ncols] .pg*end-col +.el .pg*end-page +.. +.de pg*end-col +'sp |\\n[pg*col-top]u +.po (u;\\n[pg*saved-po]+(\\n[pg@colw]+\\n[pg*gutw]*\\n[pg*col-num])) +.\"po +(u;\\n[pg@colw]+\\n[pg*gutw]) +.pg*start-col +.. +.de pg*end-page +.po \\n[pg*saved-po]u +.\" Make sure we don't exit if there are still floats or footnotes left-over. +.ie \\n[kp@head]<\\n[kp@tail]:\\n[fn@have-overflow] \{\ +. \" Switching environments ensures that we don't get an unnecessary +. \" blank line at the top of the page. +. ev ne +' bp +. ev +.\} +.el \{\ +. \" If the text has ended and there are no more footnotes or keeps, exit. +. if \\n[pg@text-ended] .ex +. if r pg*next-number \{\ +. pn \\n[pg*next-number] +. rr pg*next-number +. if d pg*next-format \{\ +. af PN \\*[pg*next-format] +. rm pg*next-format +. \} +. \} +' bp +.\} +.. +.\" pg@begin number format +.de pg@begin +.ie \\n[.$]>0 \{\ +. nr pg*next-number (;\\$1) +. ie \\n[.$]>1 .ds pg*next-format \\$2 +. el .rm pg*next-format +.\} +.el .rr pg*next-number +.pg@super-eject +.. +.\" print the footer line +.de pg*footer +.ev h +.par@reset +.BT +.ev +.. +.\" flush out any keeps or footnotes +.de pg@super-eject +.br +.if !'\\n(.z'' .@error-recover diversion open while ejecting page +.\" Make sure we stay in the end macro while there is still footnote overflow +.\" left, or floating keeps. +.while \\n[kp@tail]>\\n[kp@head]:\\n[pg@fn-flag] \{\ +. rs +. bp +.\} +.bp +.. +.nr pg@text-ended 0 +.de pg@end-text +.br +.nr pg@text-ended 1 +.pg@super-eject +.. +.em pg@end-text +.\" *************************** +.\" ******** module fn ******** +.\" *************************** +.\" Footnotes. +.nr fn@sep-dist 8p +.ev fn +.\" Round it vertically +.vs \n[fn@sep-dist]u +.nr fn@sep-dist \n[.v] +.ev +.nr fn*text-num 0 1 +.nr fn*note-num 0 1 +.ds * \\*[par@sup-start]\En+[fn*text-num]\\*[par@sup-end] +.nr fn*open 0 +.\" normal FS +.de @FS +.ie \\n[.$] .fn*do-FS "\\$1" no +.el \{\ +. ie \\n[fn*text-num]>\\n[fn*note-num] .fn*do-FS \\n+[fn*note-num] +. el .fn*do-FS +.\} +.. +.\" Second argument of `no' means don't embellish the first argument. +.de fn*do-FS +.if \\n[fn*open] .@error-recover nested FS +.nr fn*open 1 +.if \\n[.u] \{\ +. \" Ensure that the first line of the footnote is on the same page +. \" as the reference. I think this is minimal. +. ev fn +. nr fn*need 1v +. ev +. ie \\n[pg@fn-flag] .nr fn*need +\\n[fn:PD] +. el .nr fn*need +\\n[fn@sep-dist] +. ne \\n[fn*need]u+\\n[.V]u>?0 +.\} +.ev fn +.par@reset-env +.fn*start-div +.par@reset +.ie \\n[.$] .FP \\$@ +.el .@LP +.. +.de @FE +.ie !\\n[fn*open] .@error FE without FS +.el \{\ +. nr fn*open 0 +. br +. ev +. fn*end-div +.\} +.. +.nr fn@have-overflow 0 +.\" called at the top of each column +.de fn@top-hook +.nr fn*max-width 0 +.nr fn*page-bottom-pos 0-\\n[FM]-\\n[pg@fn-bottom-margin] +.ch pg@bottom \\n[fn*page-bottom-pos]u +.if \\n[fn@have-overflow] \{\ +. nr fn@have-overflow 0 +. fn*start-div +. ev nf +. fn@overflow-div +. ev +. fn*end-div +.\} +.. +.\" This is called at the bottom of the column if pg@fn-flag is set. +.de fn@bottom-hook +.nr pg@fn-flag 0 +.nr fn@have-overflow 0 +.nr fn@bottom-pos \\n[.p]-\\n[FM]-\\n[pg@fn-bottom-margin]+\\n[.v] +.ev fn +.nr fn@bottom-pos -\\n[.v] +.ev +.ie \\n[nl]+\\n[fn@sep-dist]+\n[.V]>\\n[fn@bottom-pos] \{\ +. rn fn@div fn@overflow-div +. nr fn@have-overflow 1 +.\} +.el \{\ +. if \\n[pg@ncols]>1 \ +. if \\n[fn*max-width]>\\n[pg@fn-colw] \ +. nr pg@fn-bottom-margin \\n[.p]-\\n[FM]-\\n[nl]+1v +. wh \\n[fn@bottom-pos]u fn*catch-overflow +. fn@print-sep +. ev nf +. fn@div +. rm fn@div +. ev +. if '\\n(.z'fn@overflow-div' \{\ +. di +. nr fn@have-overflow \\n[dn]>0 +. \} +. ch fn*catch-overflow +.\} +.. +.de fn*catch-overflow +.di fn@overflow-div +.. +.nr fn*embed-count 0 +.de @div-end!fn@div +.br +.if '\\n[.ev]'fn' .ev +.fn*end-div +.nr fn*open 0 +.. +.als @div-end!fn*embed-div @div-end!fn@div +.de fn*start-div +.ie '\\n(.z'' \{\ +. da fn@div +. if !\\n[pg@fn-flag] .ns +.\} +.el .di fn*embed-div +.. +.de fn*end-div +.ie '\\n(.z'fn@div' \{\ +. di +. nr fn*page-bottom-pos -\\n[dn] +. nr fn*max-width \\n[fn*max-width]>?\\n[dl] +. if !\\n[pg@fn-flag] .nr fn*page-bottom-pos -\\n[fn@sep-dist] +. nr pg@fn-flag 1 +. nr fn*page-bottom-pos \\n[nl]-\\n[.p]+\n[.V]>?\\n[fn*page-bottom-pos] +. ch pg@bottom \\n[fn*page-bottom-pos]u +.\} +.el \{\ +. ie '\\n(.z'fn*embed-div' \{\ +. di +. rn fn*embed-div fn*embed-div!\\n[fn*embed-count] +\!. fn*embed-start \\n[fn*embed-count] +. rs +' sp (u;\\n[dn]+\\n[fn@sep-dist]+\\n[.V]) +\!. fn*embed-end +. nr fn*embed-count +1 +. \} +. el \{\ +. ev fn +. @error-recover unclosed diversion within footnote +. \} +.\} +.. +.de fn*embed-start +.ie '\\n(.z'' \{\ +. fn*start-div +. ev nf +. fn*embed-div!\\$1 +. rm fn*embed-div!\\$1 +. ev +. fn*end-div +. di fn*null +.\} +.el \{\ +\!. fn*embed-start \\$1 +. rs +.\} +.. +.de fn*embed-end +.ie '\\n(.z'fn*null' \{\ +. di +. rm fn*null +.\} +.el \!.fn*embed-end +.. +.\" It's important that fn@print-sep use up exactly fn@sep-dist vertical space. +.de fn@print-sep +.ev fn +.in 0 +.vs \\n[fn@sep-dist]u +\D'l 1i 0' +.br +.ev +.. +.\" *************************** +.\" ******** module kp ******** +.\" *************************** +.\" Keeps. +.de KS +.br +.di kp*div +.. +.de KF +.if !'\\n(.z'' .@error-recover KF while open diversion +.di kp*fdiv +.ev k +.par@reset-env +.par@reset +.. +.de KE +.ie '\\n(.z'kp*div' .kp*end +.el \{\ +. ie '\\n(.z'kp*fdiv' .kp*fend +. el .@error KE without KS or KF +.\} +.. +.de @div-end!kp*div +.kp*end +.. +.de @div-end!kp*fdiv +.kp*fend +.. +.de kp*need +.ie '\\n(.z'' .ds@need \\$1 +.el \!.kp*need \\$1 +.. +.\" end non-floating keep +.de kp*end +.br +.di +.kp*need \\n[dn] +.ev nf +.kp*div +.ev +.rm kp*div +.. +.\" Floating keeps. +.nr kp@head 0 +.nr kp@tail 0 +.\" end floating keep +.de kp*fend +.br +.ev +.di +.ie \\n[.t]-(\\n[.k]>0*1v)>\\n[dn] \{\ +. br +. ev nf +. kp*fdiv +. rm kp*fdiv +. ev +.\} +.el \{\ +. rn kp*fdiv kp*div!\\n[kp@tail] +. nr kp*ht!\\n[kp@tail] 0\\n[dn] +. nr kp@tail +1 +.\} +.. +.\" top of page processing for KF +.nr kp*doing-top 0 +.de kp@top-hook +.if !\\n[kp*doing-top] \{\ +. nr kp*doing-top 1 +. kp*do-top +. nr kp*doing-top 0 +.\} +.. +.de kp*do-top +.\" If the first keep won't fit, only force it out if we haven't had a footnote +.\" and we're at the top of the page. +.nr kp*force \\n[pg@fn-flag]=0&(\\n[nl]<=\\n[pg@header-bottom]) +.nr kp*fits 1 +.while \\n[kp@tail]>\\n[kp@head]&\\n[kp*fits] \{\ +. ie \\n[.t]>\\n[kp*ht!\\n[kp@head]]:\\n[kp*force] \{\ +. nr kp*force 0 +. \" It's important to advance kp@head before bringing +. \" back the keep, so that if the last line of the +. \" last keep springs the bottom of page trap, a new +. \" page will not be started unnecessarily. +. rn kp*div!\\n[kp@head] kp*temp +. nr kp@head +1 +. ev nf +. kp*temp +. ev +. rm kp*temp +. \} +. el .nr kp*fits 0 +.\} +.. +.\" *************************** +.\" ******** module ds ******** +.\" *************************** +.\" Displays and non-floating keeps. +.de DE +.ds*end!\\n[\\n[.ev]:ds-type] +.nr \\n[.ev]:ds-type 0 +.. +.de ds@auto-end +.if \\n[\\n[.ev]:ds-type] \{\ +. @error automatically terminating display +. DE +.\} +.. +.de @div-end!ds*div +.ie \\n[\\n[.ev]:ds-type] .DE +.el .ds*end!2 +.. +.de ds*end!0 +.@error DE without DS, ID, CD, LD or BD +.. +.de LD +.br +.nr \\n[.ev]:ds-type 1 +.par@reset +.nf +.sp \\n[DD]u +.. +.de ID +.LD +.ie \\n[.$] .in +(n;\\$1) +.el .in +\\n[DI]u +.. +.de CD +.LD +.ce 9999 +.. +.de RD +.LD +.rj 9999 +.. +.de ds*common-end +.par@reset +.sp \\n[DD]u +.. +.als ds*end!1 ds*common-end +.de BD +.LD +.nr \\n[.ev]:ds-type 2 +.di ds*div +.. +.de ds*end!2 +.br +.ie '\\n(.z'ds*div' \{\ +. di +. nf +. in (u;\\n[.l]-\\n[dl]/2) +. ds*div +. rm ds*div +. ds*common-end +.\} +.el .@error-recover mismatched DE +.. +.de DS +.br +.di ds*div +.ie '\\$1'B' \{\ +. LD +. nr \\n[.ev]:ds-type 4 +.\} +.el \{\ +. ie '\\$1'L' .LD +. el \{\ +. ie '\\$1'C' .CD +. el \{\ +. ie '\\$1'R' .RD +. el \{\ +. ie '\\$1'I' .ID \\$2 +. el .ID \\$1 +. \} +. \} +. \} +. nr \\n[.ev]:ds-type 3 +.\} +.. +.de ds@need +.if '\\n(.z'' \{\ +. while \\n[.t]<=(\\$1)&(\\n[nl]>\\n[pg@header-bottom]) \{\ +. rs +' sp \\n[.t]u +. \} +.\} +.. +.de ds*end!3 +.br +.ie '\\n(.z'ds*div' \{\ +. di +. ds@need \\n[dn] +. ev nf +. ds*div +. ev +. rm ds*div +. ds*common-end +.\} +.el .@error-recover mismatched DE +.. +.de ds*end!4 +.ie '\\n(.z'ds*div' \{\ +. br +. di +. nf +. in (u;\\n[.l]-\\n[dl]/2) +. ds@need \\n[dn] +. ds*div +. rm ds*div +. ds*common-end +.\} +.el .@error-recover mismatched DE +.. +.\" **************************** +.\" ******** module par ******** +.\" **************************** +.\" Paragraph-level formatting. +.nr PS 10 +.nr LL 6i +.de par*vs +.\" If it's too big to be in points, treat it as units. +.ie (p;\\$1)>=40p .vs (u;\\$1) +.el .vs (p;\\$1) +.. +.de par@ab-indent +.nr 0:li (u;\\n[LL]/12) +.nr 0:ri \\n[0:li] +.. +.de par*env-init +.aln \\n[.ev]:PS PS +.aln \\n[.ev]:VS VS +.aln \\n[.ev]:LL LL +.aln \\n[.ev]:MCLL LL +.aln \\n[.ev]:LT LT +.aln \\n[.ev]:MCLT LT +.aln \\n[.ev]:PI PI +.aln \\n[.ev]:PD PD +.ad \\n[par*adj] +.par@reset-env +.. +.\" happens when the first page begins +.de par@init +.if !rLT .nr LT \\n[LL] +.if !rFL .nr FL \\n[LL]*5/6 +.if !rVS .nr VS \\n[PS]+2 +.ps \\n[PS] +.if !rDI .nr DI .5i +.if !rQI .nr QI 5n +.if !rPI .nr PI 5n +.par*vs \\n[VS] +.if !rPD .nr PD .3v>?\n(.V +.if !rDD .nr DD .5v>?\n(.V +.if !dFAM .ds FAM \\n[.fam] +.nr par*adj \\n[.j] +.par*env-init +.ev h +.par*env-init +.ev +.ev fn +.par*env-init +.ev +.ev k +.par*env-init +.ev +.aln 0:MCLL pg@colw +.aln 0:MCLT pg@colw +.aln k:MCLL pg@colw +.aln k:MCLT pg@colw +.if !rFPS .nr FPS \\n[PS]-2 +.if !rFVS .nr FVS \\n[FPS]+2 +.if !rFI .nr FI 2n +.if !rFPD .nr FPD \\n[PD]/2 +.aln fn:PS FPS +.aln fn:VS FVS +.aln fn:LL FL +.aln fn:LT FL +.aln fn:PI FI +.aln fn:PD FPD +.aln fn:MCLL pg@fn-colw +.aln fn:MCLT pg@fn-colw +.. +.de par@reset-env +.nr \\n[.ev]:il 0 +.nr \\n[.ev]:li 0 +.nr \\n[.ev]:ri 0 +.nr \\n[.ev]:ai \\n[\\n[.ev]:PI] +.nr \\n[.ev]:pli 0 +.nr \\n[.ev]:pri 0 +.nr \\n[.ev]:ds-type 0 +.. +.\" par@reset +.de par@reset +.br +.ce 0 +.rj 0 +.ul 0 +.fi +.ie \\n[pg@ncols]>1 \{\ +. ll (u;\\n[\\n[.ev]:MCLL]-\\n[\\n[.ev]:ri]-\\n[\\n[.ev]:pri]) +. lt \\n[\\n[.ev]:MCLT]u +.\} +.el \{\ +. ll (u;\\n[\\n[.ev]:LL]-\\n[\\n[.ev]:ri]-\\n[\\n[.ev]:pri]) +. lt \\n[\\n[.ev]:LT]u +.\} +.in (u;\\n[\\n[.ev]:li]+\\n[\\n[.ev]:pli]) +.ft 1 +.fam \\*[FAM] +.ps \\n[\\n[.ev]:PS] +.par*vs \\n[\\n[.ev]:VS] +.ls 1 +.TA +.hy 14 +.. +.als @RT par@reset +.\" This can be redefined by the user. +.de TA +.ta T 5n +.. +.de par*start +.ds@auto-end +.nr \\n[.ev]:pli \\$1 +.nr \\n[.ev]:pri \\$2 +.par@reset +.sp \\n[\\n[.ev]:PD]u +.ne 1v+\\n(.Vu +.. +.de par@finish +.nr \\n[.ev]:pli 0 +.nr \\n[.ev]:pri 0 +.par@reset +.. +.\" normal LP +.de @LP +.par*start 0 0 +.nr \\n[.ev]:ai \\n[\\n[.ev]:PI] +.. +.de @PP +.par*start 0 0 +.nr \\n[.ev]:ai \\n[\\n[.ev]:PI] +.ti +\\n[\\n[.ev]:ai]u +.. +.de @QP +.nr \\n[.ev]:ai \\n[\\n[.ev]:PI] +.par*start \\n[QI] \\n[QI] +.. +.de @XP +.par*start \\n[\\n[.ev]:PI] 0 +.ti -\\n[\\n[.ev]:PI]u +.. +.de @IP +.if \\n[.$]>1 .nr \\n[.ev]:ai (n;\\$2) +.par*start \\n[\\n[.ev]:ai] 0 +.if !'\\$1'' \{\ +. \" Divert the label so as to freeze any spaces. +. di par*label +. in 0 +. nf +\&\\$1 +. di +. in +. fi +. chop par*label +. ti -\\n[\\n[.ev]:ai]u +. ie \\n[dl]+1n<=\\n[\\n[.ev]:ai] \\*[par*label]\h'|\\n[\\n[.ev]:ai]u'\c +. el \{\ +\\*[par*label] +. br +. \} +. rm par*label +.\} +.. +.de @RS +.br +.nr \\n[.ev]:li!\\n[\\n[.ev]:il] \\n[\\n[.ev]:li] +.nr \\n[.ev]:ri!\\n[\\n[.ev]:il] \\n[\\n[.ev]:ri] +.nr \\n[.ev]:ai!\\n[\\n[.ev]:il] \\n[\\n[.ev]:ai] +.nr \\n[.ev]:pli!\\n[\\n[.ev]:il] \\n[\\n[.ev]:pli] +.nr \\n[.ev]:pri!\\n[\\n[.ev]:il] \\n[\\n[.ev]:pri] +.nr \\n[.ev]:il +1 +.nr \\n[.ev]:li +\\n[\\n[.ev]:ai] +.nr \\n[.ev]:ai \\n[\\n[.ev]:PI] +.par@reset +.. +.de @RE +.br +.ie \\n[\\n[.ev]:il] \{\ +. nr \\n[.ev]:il -1 +. nr \\n[.ev]:ai \\n[\\n[.ev]:ai!\\n[\\n[.ev]:il]] +. nr \\n[.ev]:li \\n[\\n[.ev]:li!\\n[\\n[.ev]:il]] +. nr \\n[.ev]:ri \\n[\\n[.ev]:ri!\\n[\\n[.ev]:il]] +. nr \\n[.ev]:pli \\n[\\n[.ev]:pli!\\n[\\n[.ev]:il]] +. nr \\n[.ev]:pri \\n[\\n[.ev]:pri!\\n[\\n[.ev]:il]] +.\} +.el .@error unbalanced \\$0 +.par@reset +.. +.de @QS +.br +.nr \\n[.ev]:li!\\n[\\n[.ev]:il] \\n[\\n[.ev]:li] +.nr \\n[.ev]:ri!\\n[\\n[.ev]:il] \\n[\\n[.ev]:ri] +.nr \\n[.ev]:ai!\\n[\\n[.ev]:il] \\n[\\n[.ev]:ai] +.nr \\n[.ev]:pli!\\n[\\n[.ev]:il] \\n[\\n[.ev]:pli] +.nr \\n[.ev]:pri!\\n[\\n[.ev]:il] \\n[\\n[.ev]:pri] +.nr \\n[.ev]:il +1 +.nr \\n[.ev]:li +\\n[QI] +.nr \\n[.ev]:ri +\\n[QI] +.nr \\n[.ev]:ai \\n[\\n[.ev]:PI] +.par@reset +.. +.als @QE @RE +.\" start boxed text +.de B1 +.br +.di par*box-div +.nr \\n[.ev]:li +1n +.nr \\n[.ev]:ri +1n +.par@reset +.. +.de @div-end!par*box-div +.B2 +.. +.\" end boxed text +.\" Postpone the drawing of the box until we're in the top-level diversion, +.\" in case there's a footnote inside the box. +.de B2 +.ie '\\n(.z'par*box-div' \{\ +. br +. di +. ds@need \\n[dn] +. par*box-mark-top +. ev nf +. par*box-div +. ev +. nr \\n[.ev]:ri -1n +. nr \\n[.ev]:li -1n +. par@finish +. par*box-draw \\n[.i]u \\n[.l]u +.\} +.el .@error B2 without B1 +.. +.de par*box-mark-top +.ie '\\n[.z]'' .mk par*box-top +.el \!.par*box-mark-top +.. +.de par*box-draw +.ie '\\n[.z]'' \{\ +. nr par*box-in \\n[.i] +. nr par*box-ll \\n[.l] +. nr par*box-vpt \\n[.vpt] +. vpt 0 +. in \\$1 +. ll \\$2 +\v'-1v+.25m'\ +\D'l (u;\\n[.l]-\\n[.i]) 0'\ +\D'l 0 |\\n[par*box-top]u'\ +\D'l -(u;\\n[.l]-\\n[.i]) 0'\ +\D'l 0 -|\\n[par*box-top]u' +. br +. sp -1 +. in \\n[par*box-in]u +. ll \\n[par*box-ll]u +. vpt \\n[par*box-vpt] +.\} +.el \!.par*box-draw \\$1 \\$2 +.. +.de @SH +.par@finish +.\" Keep together the heading and the first two lines of the next paragraph. +.ne 3v+\\n[\\n[.ev]:PD]u+\\n(.Vu +.sp 1 +.ft B +.. +.\" TL, AU, and AI are aliased to these in cov*ab-init. +.de par@TL +.par@finish +.sp 1 +.ft B +.ps +2 +.vs +3p +.ce 9999 +.. +.de par@AU +.par@finish +.sp 1 +.ft I +.ce 9999 +.. +.de par@AI +.par@finish +.sp .5 +.ce 9999 +.. +.\" In paragraph macros. +.de NL +.ps \\n[\\n[.ev]:PS] +.. +.de SM +.ps -2 +.. +.de LG +.ps +2 +.. +.de R +.ft R +.. +.\" par*define-font-macro macro font +.de par*define-font-macro +.de \\$1 +.ie \\\\n[.$] \{\ +. nr par*prev-font \\\\n[.f] +\&\\\\$3\f[\\$2]\\\\$1\f[\\\\n[par*prev-font]]\\\\$2 +.\} +.el .ft \\$2 +\\.. +.. +.par*define-font-macro B B +.par*define-font-macro I I +.par*define-font-macro BI BI +.par*define-font-macro CW CR +.\" underline a word +.de UL +\Z'\\$1'\v'.25m'\D'l \w'\\$1'u 0'\v'-.25m'\\$2 +.. +.\" box a word +.de BX +.nr par*bxw \w'\\$1'+.4m +\Z'\v'.25m'\D'l 0 -1m'\D'l \\n[par*bxw]u 0'\D'l 0 1m'\D'l -\\n[par*bxw]u 0''\ +\Z'\h'.2m'\\$1'\ +\h'\\n[par*bxw]u' +.. +.\" The first time UX is used, put a registered mark after it. +.ds par*ux-rg \(rg +.de UX +\s[\\n[.s]*8u/10u]UNIX\s0\\$1\\*[par*ux-rg] +.ds par*ux-rg +.. +.ds par@sup-start \v'-.9m\s'\En[.s]*7u/10u'+.7m' +.als { par@sup-start +.ds par@sup-end \v'-.7m\s0+.9m' +.als } par@sup-end +.\" footnote paragraphs +.\" FF is the footnote format +.nr FF 0 +.\" This can be redefined. It gets a second argument of `no' if the first +.\" argument was supplied by the user, rather than automatically. +.de FP +.br +.if !d par*fp!\\n[FF] \{\ +. @error unknown footnote format `\\n[FF]' +. nr FF 0 +.\} +.ie '\\$2'no' .par*fp!\\n[FF]-no "\\$1" +.el .par*fp!\\n[FF] "\\$1" +.. +.de par*fp!0 +.@PP +\&\\*[par@sup-start]\\$1\\*[par@sup-end]\ \c +.. +.de par*fp!0-no +.@PP +\&\\$1\ \c +.. +.de par*fp!1 +.@PP +\&\\$1.\ \c +.. +.de par*fp!1-no +.@PP +\&\\$1\ \c +.. +.de par*fp!2 +.@LP +\&\\$1.\ \c +.. +.de par*fp!2-no +.@LP +\&\\$1\ \c +.. +.de par*fp!3 +.@IP "\\$1." (u;\\n[\\n[.ev]:PI]*2) +.. +.de par*fp!3-no +.@IP "\\$1" (u;\\n[\\n[.ev]:PI]*2) +.. +.\" *************************** +.\" ******** module nh ******** +.\" *************************** +.\" Numbered headings. +.\" nh*hl is the level of the last heading +.nr nh*hl 0 +.\" numbered heading +.de @NH +.ie '\\$1'S' \{\ +. shift +. nr nh*hl 0 +. while \\n[.$] \{\ +. nr nh*hl +1 +. nr H\\n[nh*hl] 0\\$1 +. shift +. \} +. if !\\n[nh*hl] \{\ +. nr H1 1 +. nr nh*hl 1 +. @error missing arguments to .NH S +. \} +.\} +.el \{\ +. nr nh*ohl \\n[nh*hl] +. ie \\n[.$] \{\ +. nr nh*hl 0\\$1 +. ie \\n[nh*hl]<=0 \{\ +. nr nh*ohl 0 +. nr nh*hl 1 +. \} +. el \{\ +. if \\n[nh*hl]-\\n[nh*ohl]>1 \ +. @warning .NH \\n[nh*ohl] followed by .NH \\n[nh*hl] +. \} +. \} +. el .nr nh*hl 1 +. while \\n[nh*hl]>\\n[nh*ohl] \{\ +. nr nh*ohl +1 +. nr H\\n[nh*ohl] 0 +. \} +. nr H\\n[nh*hl] +1 +.\} +.ds SN +.nr nh*i 0 +.while \\n[nh*i]<\\n[nh*hl] \{\ +. nr nh*i +1 +. as SN \\n[H\\n[nh*i]]. +.\} +.SH +\\*[SN] +.. +.\" **************************** +.\" ******** module toc ******** +.\" **************************** +.\" Table of contents generation. +.de @XS +.da toc*div +.ev h +.ie \\n[.$] .XA "\\$1" +.el .XA +.. +.de @div-end!toc*div +.XE +.. +.de XA +.ie '\\n(.z'toc*div' \{\ +. if d toc*num .toc*end-entry +. ie \\n[.$] \{\ +. ie '\\$1'no' .ds toc*num +. el .ds toc*num "\\$1 +. \} +. el .ds toc*num \\n[PN] +. LP +. na +. ll -8n +. in (n;0\\$2) +.\} +.el .@error XA without XS +.. +.de XE +.ie '\\n(.z'toc*div' \{\ +. if d toc*num .toc*end-entry +. ev +. di +.\} +.el .@error XS without XE +.. +.de toc*end-entry +\\a\\t\\*[toc*num] +.br +.rm toc*num +.. +.de PX +.1C +.if !'\\$1'no' \{\ +. ce 1 +. ps \\n[PS]+2 +. ft B +\\*[TOC] +. ft +. ps +.\} +.nf +.char \[toc*leader-char] .\h'1m' +.lc \[toc*leader-char] +.ta (u;\\n[.l]-\\n[.i]-\w'000') (u;\\n[.l]-\\n[.i])R +.sp 2 +.toc*div +.par@reset +.. +.\" print the table of contents on page i +.de TC +.P1 +.pg@begin 1 i +.PX \\$1 +.. +.\" **************************** +.\" ******** module eqn ******** +.\" **************************** +.\" Eqn support. +.de EQ +.. +.de EN +.. +.de @EQ +.br +.ds eqn*num "\\$2 +.ie '\\$1'L' .nr eqn*type 0 +.el \{\ +. ie '\\$1'I' .nr eqn*type 1 +. el \{\ +. nr eqn*type 2 +. if !'\\$1'C' .ds eqn*num "\\$1 +. \} +.\} +.di eqn*div +.in 0 +.nf +.. +.de @div-end!eqn*div +.@EN +.. +.\" Note that geqn mark and lineup work correctly in centered equations. +.de @EN +.ie !'\\n(.z'eqn*div' .@error-recover mismatched EN +.el \{\ +. br +. di +. nr eqn*have-num 0 +. if !'\\*[eqn*num]'' .nr eqn*have-num 1 +. if \\n[dl]:\\n[eqn*have-num] \{\ +. sp \\n[DD]u +. par@reset +. ds eqn*tabs \\n[.tabs] +. nf +. ie \\n[dl] \{\ +. ds@need \\n[dn]u-1v+\n[.V]u +. chop eqn*div +. ie \\n[eqn*type]=0 \{\ +. ta (u;\\n[.l]-\\n[.i])R +\\*[eqn*div]\t\\*[eqn*num] +. \} +. el \{\ +. ie \\n[eqn*type]=1 .ta \\n[DI]u \ +(u;\\n[.l]-\\n[.i])R +. el .ta (u;\\n[.l]-\\n[.i]/2)C \ +(u;\\n[.l]-\\n[.i])R +\t\\*[eqn*div]\t\\*[eqn*num] +. \} +. \} +. el \{\ +. ta (u;\\n[.l]-\\n[.i])R +\t\\*[eqn*num] +. \} +. sp \\n[DD]u +. fi +. ta \\*[eqn*tabs] +. \} +.\} +.. +.\" **************************** +.\" ******** module tbl ******** +.\" **************************** +.\" Tbl support. +.nr tbl*have-header 0 +.de TS +.\" The break is necessary in the case where the first page has not yet begun. +.br +.sp \\n[DD]u +.if '\\$1'H' .di tbl*header-div +.. +.de tbl@top-hook +.if \\n[tbl*have-header] \{\ +. ie \\n[.t]-\\n[tbl*header-ht]-1v .tbl*print-header +. el .sp \\n[.t]u +.\} +.. +.de tbl*print-header +.ev nf +.tbl*header-div +.ev +.mk #T +.. +.de TH +.ie '\\n[.z]'tbl*header-div' \{\ +. nr T. 0 +. T# +. br +. di +. ie \\n[dn]+\\n[FM]+\\n[HM]+2v>=\\n[.p] \{\ +. @error ridiculously long table header +. ds@need \\n[dn] +. tbl*print-header +. \} +. el \{\ +. nr tbl*header-ht \\n[dn] +. ds@need \\n[dn]u+1v +. tbl*print-header +. nr tbl*have-header 1 +. \} +.\} +.el .@error-recover .TH without .TS H +.. +.de @div-end!tbl*header-div +.TH +.TE +.. +.de TE +.ie '\\n(.z'tbl*header-div' .@error-recover .TS H but no .TH before .TE +.el \{\ +. nr tbl*have-header 0 +. sp \\n[DD]u +.\} +.\" reset tabs +.TA +.. +.de tbl@bottom-hook +.if \\n[tbl*have-header] \{\ +. nr T. 1 +. T# +.\} +.. +.de T& +.. +.\" **************************** +.\" ******** module pic ******** +.\" **************************** +.\" Pic support. +.\" PS height width +.de PS +.br +.sp \\n[DD]u +.ie \\n[.$]<2 .@error bad arguments to PS (not preprocessed with pic?) +.el \{\ +. ds@need (u;\\$1)+1v +. in +(u;\\n[.l]-\\n[.i]-\\$2/2>?0) +.\} +.. +.de PE +.par@reset +.sp \\n[DD]u+.5m +.. +.\" **************************** +.\" ******** module ref ******** +.\" **************************** +.\" Refer support. +.de ]- +.rm [A [B [C [D [E [G [I [J [N [O [P [Q [R [S [T [V +.rm ref*string +.. +.\" Other +.ds ref*spec!0 Q A T1 S V N P I C D O +.\" Journal article +.ds ref*spec!1 Q A T2 J S V N P I C D O +.\" Book +.ds ref*spec!2 Q A T1 S V P I C D O +.\" Article within book +.ds ref*spec!3 Q A T2 B E S V P I C D O +.\" Tech report +.ds ref*spec!4 Q A T2 R G P I C D O +.\" ][ type +.de ][ +.if r [T \{\ +. als [T1 [T +. als [T2 [T +.\} +.ie d ref*spec!\\$1 .ref*build \\*[ref*spec!\\$1] +.el \{\ +. @error unknown reference type `\\$1' +. ref*build \\*[ref*spec!0] +.\} +.ref*print +.rm ref*string +.rm [F [T1 [T2 +.. +.\" start of reference number +.ds [. \\*[par@sup-start] +.\" end of reference number +.ds .] \\*[par@sup-end] +.\" period before reference +.ds <. . +.\" period after reference +.ds >. \" empty +.\" comma before reference +.ds <, , +.\" comma after reference +.ds >, \" empty +.\" start collected references +.de ]< +.als ref*print ref*end-print +.SH +\&\\*[REFERENCES] +.par@reset +.. +.\" end collected references +.de ]> +.par@finish +.als ref*print ref*normal-print +.. +.de ref*normal-print +.ie d [F .FS "\\*([.\\*([F\\*(.]" +.el .FS \& +\\*[ref*string] +.FE +.. +.de ref*end-print +.ie d [F .IP "\\*([F." +.el .XP +\\*[ref*string] +.. +.als ref*print ref*normal-print +.de ref*build +.rm ref*string ref*post-punct +.nr ref*suppress-period 1 +.while \\n[.$] \{\ +. if d [\\$1 \{\ +. ie d ref*add-\\$1 .ref*add-\\$1 +. el .ref*add-dflt \\$1 +. \} +. shift +.\} +.\" now add a final period +.ie d ref*string \{\ +. if !\\n[ref*suppress-period] .as ref*string . +. if d ref*post-punct \{\ +. as ref*string "\\*[ref*post-punct] +. rm ref*post-punct +. \} +.\} +.el .ds ref*string +.. +.de ref*add-T1 +.ref*field T , "\fI" "" "\fP" +.if r [T .nr ref*suppress-period \\n([T +.. +.de ref*add-T2 +.ref*field T , "\\*Q" "" "\\*U" +.if r [T .nr ref*suppress-period \\n([T +.. +.de ref*add-P +.ie \\n([P>0 .ref*field P , "pp. " +.el .ref*field P , "p. " +.. +.de ref*add-J +.ref*field J , \fI "" \fP +.. +.de ref*add-D +.ref*field D "" ( ) +.. +.de ref*add-E +.ref*field E , "ed. " +.. +.de ref*add-G +.ref*field G "" ( ) +.. +.de ref*add-B +.ref*field B "" "in \fI" "" \fP +.. +.de ref*add-O +.ref*field O . +.ie r [O .nr ref*suppress-period \\n([O +.el .nr ref*suppress-period 1 +.. +.de ref*add-A +.ref*field A , +.if r [A .nr ref*suppress-period \\n([A +.. +.de ref*add-dflt +.ref*field \\$1 , +.. +.\" First argument is the field letter. +.\" Second argument is the punctuation character to use to separate this field +.\" from the previous field. +.\" Third argument is a string with which to prefix this field. +.\" Fourth argument is a string with which to postfix this field. +.\" Fifth argument is a string to add after the punctuation character supplied +.\" by the next field. +.de ref*field +.if d ref*string \{\ +. ie d ref*post-punct \{\ +. as ref*string "\\$2\\*[ref*post-punct] \" +. rm ref*post-punct +. \} +. el .as ref*string "\\$2 \" +.\} +.as ref*string "\\$3\\*([\\$1\\$4 +.if \\n[.$]>4 .ds ref*post-punct "\\$5 +.nr ref*suppress-period 0 +.. +.\" **************************** +.\" ******** module acc ******** +.\" **************************** +.\" Accents and special characters. +.ds Q \(lq +.ds U \(rq +.ds - \(em +.\" Characters +.\" The idea of this definition is for the top of the 3 to be at the x-height. +.if !c\[yogh] .char \[yogh] \Z'\v'\w'x'*0-\En[rst]u'\s[\En[.s]*8u/10u]\ +\v'\w'3'*0+\En[rst]u'3\s0'\h'\w'\s[\En[.s]*8u/10u]3'u' +.\" Accents +.de acc*over-def +.ds \\$1 \Z'\v'(u;\w'x'*0+\En[rst]-\En[.cht])'\ +\h'(u;-\En[skw]+(-\En[.w]-\w'\\$2'/2)+\En[.csk])'\\$2' +.. +.de acc*under-def +.ds \\$1 \Z'\v'\En[.cdp]u'\h'(u;-\En[.w]-\w'\\$2'/2)'\\$2' +.. +.de acc*slash-def +.ds \\$1 \Z'\h'(u;-\En[.w]-\w'\\$2'/2)'\ +\v'(u;\En[.cdp]-\En[.cht]+\En[rst]+\En[rsb]/2)'\\$2' +.. +.de acc*prefix-def +.ds \\$1 \Z'\h'(u;\w'x'-\w'\\$2'/2)'\\$2' +.. +.acc*prefix-def ' \' +.acc*prefix-def ` \` +.acc*prefix-def ^ ^ +.acc*prefix-def , \(ac +.acc*prefix-def : \(ad +.acc*prefix-def ~ ~ +.\" improved accent marks +.de AM +.acc*over-def ' \' +.acc*over-def ` \` +.acc*over-def ^ ^ +.acc*over-def ~ ~ +.acc*over-def : \(ad +.acc*over-def v \(ah +.acc*over-def _ \(a- +.acc*over-def o \(ao +.acc*under-def , \(ac +.acc*under-def . \s[\En[.s]*8u/10u]\v'.2m'.\v'-.2m'\s0 +.acc*under-def hook \(ho +.acc*slash-def / / +.char \[hooko] o\\\\*[hook] +.ds q \[hooko] +.ds 3 \[yogh] +.ds D- \(-D\" Icelandic uppercase eth +.ds d- \(Sd\" Icelandic lowercase eth +.ds Th \(TP\" Icelandic uppercase thorn +.ds th \(Tp\" Icelandic lowercase thorn +.ds 8 \(ss\" German double s +.ds Ae \(AE\" AE ligature +.ds ae \(ae\" ae ligature +.ds Oe \(OE\" OE ligature +.ds oe \(oe\" oe ligature +.ds ? \(r?\" upside down ? +.ds ! \(r!\" upside down ! +.. +.\" Make sure that no blank lines creep in at the end of this file. diff --git a/gnu/usr.bin/groff/tmac/tmac.tty b/gnu/usr.bin/groff/tmac/tmac.tty new file mode 100644 index 000000000000..4d5193fe3ab5 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/tmac.tty @@ -0,0 +1,48 @@ +.nr _C \n(.C +.cp 0 +.nroff +.ftr CW B +.ftr C B +.ftr CR B +.po 0 +.if c\[char173] .shc \[char173] +.de tty-char +.if !c\\$1 .char \\$1 "\\$2 +.. +.if c\(md .tr \(bu\(md +.tty-char \(bu \z+o +.tty-char \(14 1/4 +.tty-char \(12 1/2 +.tty-char \(34 3/4 +.tty-char \(ff ff +.tty-char \(fi fi +.tty-char \(fl fl +.tty-char \(Fi ffi +.tty-char \(Fl ffl +.tty-char \(<- <- +.tty-char \(-> -> +.tty-char \(<> <-> +.tty-char \(em -- +.tty-char \(+- +- +.tty-char \(co (C) +.tty-char \(<= <= +.tty-char \(>= >= +.tty-char \(!= != +.tty-char \(== == +.tty-char \(~= ~= +.tty-char \(sq [] +.tty-char \(lh <= +.tty-char \(rh => +.tty-char \(lA <= +.tty-char \(rA => +.tty-char \(hA <=> +.tty-char \(rg (R) +.tty-char \(OE OE +.tty-char \(oe oe +.tty-char \(AE AE +.tty-char \(ae ae +.tty-char \(an - +.cp \n(_C +.\" If you want the character definitions in tmac.tty-char to be loaded +.\" automatically, remove the `\"' from the next line. +.\"do mso tmac.tty-char diff --git a/gnu/usr.bin/groff/tmac/tmac.tty-char b/gnu/usr.bin/groff/tmac/tmac.tty-char new file mode 100644 index 000000000000..9815e6c0f0e6 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/tmac.tty-char @@ -0,0 +1,196 @@ +.\" This file defines standard troff characters and some groff characters for +.\" use with -Tascii and -Tlatin1. +.\" +.\" These definitions are chosen so that, as far as possible, they: +.\" - work with both -Tascii and -Tlatin1. +.\" - work on devices that display only the last overstruck character +.\" as well as on devices that support overstriking +.\" - represent the character's graphical shape (not its meaning) +.\" +.nr _C \n(.C +.cp 0 +.de tty-char +.if !c\\$1 .char \\$1 "\\$2 +.. +.ie c\(a- .ds tty-rn \(a- +.el .ds tty-rn \v'-1m'_\v'+1m' +.tty-char \(tm tm +.tty-char \(rn \*[tty-rn] +.tty-char \(ua \z|^ +.tty-char \(da \z|v +.tty-char \(sc S +.tty-char \(ct \z/c +.tty-char \(dg \z|- +.tty-char \(dd \z|= +.tty-char \(ib (\z=_ +.tty-char \(ip \z=_) +.tty-char \(sb (= +.tty-char \(sp =) +.tty-char \(if oo +.tty-char \(pt oc +.tty-char \(es {} +.tty-char \(ca (^) +.tty-char \(cu U +.tty-char \(de o +.tty-char \(di -:- +.tty-char \(no ~ +.tty-char \(gr \Z'\*[tty-rn]'V +.tty-char \(is \z'\z,I +.tty-char \(mo E +.tty-char \(pd a +.tty-char \(sr \e/ +.tty-char \(*C \z_H +.tty-char \(*D \z_/\z_\e +.tty-char \(*F \zIO +.tty-char \(*G |\*[tty-rn] +.tty-char \(*H \z-O +.tty-char \(*L /\e +.tty-char \(*P TT +.tty-char \(*Q \zIY +.tty-char \(*S \z_\Z'\*[tty-rn]'> +.tty-char \(*W \z_O +.if c\(ss .tty-char \(*b \(ss +.tty-char \(*b B +.tty-char \(*a a +.tty-char \(*c \z,E +.tty-char \(*d d +.tty-char \(*e e +.tty-char \(*f \z|o +.tty-char \(+f \z|o +.tty-char \(*g y +.tty-char \(*h \z-0 +.tty-char \(+h \z-0 +.tty-char \(*i i +.tty-char \(*k k +.tty-char \(*l \z>\e +.tty-char \(*m \z,u +.tty-char \(*n v +.tty-char \(*p \z-n +.tty-char \(+p \z-w +.tty-char \(*q \z|u +.tty-char \(*r p +.tty-char \(*s \z-o +.tty-char \(*t \z~t +.tty-char \(*u u +.tty-char \(*w w +.tty-char \(*x x +.tty-char \(*y n +.tty-char \(*z \z,C +.tty-char \(ts s +.\" Definition of \(ss should follow that of \(*b. +.tty-char \(ss B +.tty-char \(c* \zO\(mu +.tty-char \(c+ \zO+ +.tty-char \(AN ^ +.tty-char \(OR v +.tty-char \(uA \z=^ +.tty-char \(dA \z=v +.if c\(md .tty-char \(a. \(md +.tty-char \(Im I +.tty-char \(Re R +.tty-char \(/L \z/L +.tty-char \(/l \z/l +.tty-char \(%0 %o +.tty-char \(ao o +.tty-char \(a" """" +.tty-char \(ah v +.tty-char \(ho \(ac +.tty-char \(/_ \z_/ +.tty-char \(=~ =~ +.tty-char \(Ah N +.tty-char \(CR _| +.tty-char \(fa \z-V +.tty-char \(nm \z/E +.tty-char \(pp \z_| +.tty-char \(sd '' +.tty-char \(st -) +.tty-char \(te 3 +.if c\(md .tty-char \(tf .\(md. +.tty-char \(tf .:. +.tty-char \(wp p +.tty-char \(~~ ~~ +.tty-char \(Fn \z,f +.tty-char \(Bq ,, +.tty-char \(bq , +.tty-char \(lz <> +.\" Latin-1 characters +.tty-char \(r! \z,i +.tty-char \(Po \z-L +.tty-char \(Cs \zox +.tty-char \(Ye \z=Y +.tty-char \(bb | +.tty-char \(ad """" +.tty-char \(Of \z_a +.tty-char \(Fo << +.tty-char \(a- \*[tty-rn] +.tty-char \(S2 2 +.tty-char \(S3 3 +.tty-char \(ps 9| +.tty-char \(md . +.tty-char \(ac , +.tty-char \(S1 1 +.tty-char \(Om \z_o +.tty-char \(Fc >> +.tty-char \(r? \z'c +.tty-char \(`A \z`A +.tty-char \('A \z'A +.tty-char \(^A \z^A +.tty-char \(~A \z~A +.tty-char \(:A \z"A +.tty-char \(oA \zoA +.tty-char \(,C \z,C +.tty-char \(`E \z`E +.tty-char \('E \z'E +.tty-char \(^E \z^E +.tty-char \(:E \z"E +.tty-char \(`I \z`I +.tty-char \('I \z'I +.tty-char \(^I \z^I +.tty-char \(:I \z"I +.tty-char \(-D \z-D +.tty-char \(~N \z~N +.tty-char \(`O \z`O +.tty-char \('O \z'O +.tty-char \(^O \z^O +.tty-char \(~O \z~O +.tty-char \(:O \z"O +.tty-char \(/O \z/O +.tty-char \(`U \z`U +.tty-char \('U \z'U +.tty-char \(^U \z^U +.tty-char \(:U \z"U +.tty-char \('Y \z'Y +.tty-char \(TP \zIb +.tty-char \(`a \z`a +.tty-char \('a \z'a +.tty-char \(^a \z^a +.tty-char \(~a \z~a +.tty-char \(:a \z"a +.tty-char \(oa \zoa +.tty-char \(,c \z,c +.tty-char \(`e \z`e +.tty-char \('e \z'e +.tty-char \(^e \z^e +.tty-char \(:e \z"e +.tty-char \(`i \z`i +.tty-char \('i \z'i +.tty-char \(^i \z^i +.tty-char \(:i \z"i +.tty-char \(Sd \z`\z'o +.tty-char \(~n \z~n +.tty-char \(`o \z`o +.tty-char \('o \z'o +.tty-char \(^o \z^o +.tty-char \(~o \z~o +.tty-char \(:o \z"o +.tty-char \(/o \z/o +.tty-char \(`u \z`u +.tty-char \('u \z'u +.tty-char \(^u \z^u +.tty-char \(:u \z"u +.tty-char \('y \z'y +.tty-char \(Tp \zpb +.tty-char \(:y \z"y +.\"tty-char \(:y \ij +.cp \n(_C +.do mso tmac.latin1 diff --git a/gnu/usr.bin/groff/tmac/troffrc b/gnu/usr.bin/groff/tmac/troffrc new file mode 100644 index 000000000000..f3140d8e6abd --- /dev/null +++ b/gnu/usr.bin/groff/tmac/troffrc @@ -0,0 +1,24 @@ +.\" Startup file for troff. +.\" This is tested by pic. +.nr 0p 0 +.\" Use .do here, so that it works with -C. +.\" The groff command defines the .X string if the -X option was given. +.ie r.X .do ds troffrc!ps tmac.Xps +.el .do ds troffrc!ps tmac.ps +.do ds troffrc!dvi tmac.dvi +.do ds troffrc!X75 tmac.X +.do ds troffrc!X75-12 tmac.X +.do ds troffrc!X100 tmac.X +.do ds troffrc!X100-12 tmac.X +.do ds troffrc!ascii tmac.tty +.do ds troffrc!latin1 tmac.tty +.do if d troffrc!\*[.T] \ +. do mso \*[troffrc!\*[.T]] +.do rm troffrc!ps troffrc!Xps troffrc!dvi troffrc!X75 troffrc!X75-12 \ +troffrc!X100 troffrc!X100-12 +.do tr \[char160] +.\" Set the hyphenation language to `us'. +.do hla us +.\" Load hyphenation patterns from `hyphen.us' (in the tmac directory). +.do hpf hyphen.us +.\" Don't let blank lines creep in here. |
