summaryrefslogtreecommitdiff
path: root/tmac/doc-nroff
diff options
context:
space:
mode:
authorwlemb <wlemb>2001-03-23 00:17:50 +0000
committerwlemb <wlemb>2001-03-23 00:17:50 +0000
commit5a425eaf6e5cc80206e2562878fd9e24f398b973 (patch)
treeb387186eef3de10b1b1ce6056eb7ddd77a5d0039 /tmac/doc-nroff
parenta736fb6eaf38fd5fbb5bc3bd20e59f42b0bad491 (diff)
downloadgroff-5a425eaf6e5cc80206e2562878fd9e24f398b973.tar.gz
Replaced mdoc implementation. The new version is `state of the
art', using almost all new features of groff 1.17 -- it won't run with older versions. * tmac/doc.tmac: Completely rewritten. * tmac/doc-common: Ditto. * tmac/doc-nroff: Ditto. * tmac/doc-ditroff: Ditto. * tmac/doc-syms: Ditto. * tmac/mdoc.local: New file. * tmac/groff_mdoc.samples.man: Replaced with ... * tmac/groff_mdoc.reference.man: New file, covering mdoc completely. * tmac/strip.sed: Updated. * tmac/Makefile.sub: Updated. * INSTALL: Updated. * tmac/groff_man.man: Add `man.local' to the FILES section.
Diffstat (limited to 'tmac/doc-nroff')
-rw-r--r--tmac/doc-nroff417
1 files changed, 234 insertions, 183 deletions
diff --git a/tmac/doc-nroff b/tmac/doc-nroff
index c036f218..fbbcfa46 100644
--- a/tmac/doc-nroff
+++ b/tmac/doc-nroff
@@ -11,8 +11,8 @@
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
@@ -29,197 +29,248 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)doc-nroff 5.6 (Berkeley) 8/5/91
+.\" @(#)doc-nroff 5.6 (Berkeley) 8/5/91
.\"
-.\" tmac.mdoc-nroff
.\" %beginstrip%
-.\"
-.ds aD \fI
-.ds aR \fI
-.ds cM \fB
-.ds dF \fR
-.ds eM \fI
-.ds eR \fR
-.ds eV \fR
-.ds fA \fI
-.ds fD \fB
-.ds fL \fB
-.ds fN \fB
-.ds fP \fP
-.ds fS
-.ds fT \fI
-.ds Hs \fR
-.ds iC \fB
-.ds lI \fR
-.ds lP \fR\|(\fP
-.ds rP \fR\|)\fP
-.ds lp \fR\|(\fP
-.ds rp \fR\|)\fP
-.ds lB \fR\|[\|\fP
-.ds rB \fR\|]\fP
-.ds mL \fB
-.ds nM \fB
-.ds nO \fR
-.ds pA \fI
-.ds Pu {\ .\ ,\ ;\ :\ (\ )\ [\ ]}
-.ds rA \fR
-.ds rT \fI
-.ds sH \fB
-.ds sP
-.ds sY \fB
-.ds sX \fI
-.ds tF \fR
-.ds tN
-.ds vA \fI
-.ds Vs \fR
-.ds vT \fB
-.ds xR \fR
-.\" MISCELLANEOUS
-.nr sI .5i
-.nr Ti .5i
-.nr cR 1
-.nr Pp 1v
-.ds lS \0\0
-.nr lS \w'\0\0'u
-.nr dI 6n
-.\"
-.de pL
-.ie \\n(cR .nr Hm 0
-.el .nr Hm .5i
-.nr Fm .5i
-.nr ll 78n
-.ll 78n
-.nr lt 78n
-.lt 78n
-.nr po 0i
-.po 0i
-.nr dV 1v
-.ad l
-.na
+.
+.
+.eo
+.
+.\" use -rD=1 for double-sided printing
+.
+.if !r D .nr D 0
+.
+.\" use -rcR=0 to have multiple pages instead of a single, very long page
+.
+.if !r cR .nr cR 1
+.
+.\" the `doc-xx-font' strings must not be empty!
+.
+.ds doc-caption-font \f[R]
+.ds doc-caption-font2 \f[R]
+.ds doc-Ad-font \f[I]
+.ds doc-Ar-font \f[I]
+.ds doc-Cm-font \f[B]
+.ds doc-Em-font \f[I]
+.ds doc-Er-font \f[R]
+.ds doc-Ev-font \f[R]
+.ds doc-Fa-font \f[I]
+.ds doc-Fd-font \f[B]
+.ds doc-Fl-font \f[B]
+.ds doc-Fn-font \f[B]
+.ds doc-Ft-font \f[I]
+.ds doc-Ic-font \f[B]
+.ds doc-Li-font \f[R]
+.ds doc-Me-font \f[B]
+.ds doc-Nm-font \f[B]
+.ds doc-No-font \f[R]
+.ds doc-Pa-font \f[I]
+.ds doc-Sh-font \f[B]
+.ds doc-Sy-font \f[B]
+.ds doc-Sx-font \f[I]
+.ds doc-Tn-font-shape \f[R]
+.ds doc-Tn-font-size
+.ds doc-Va-font \f[I]
+.ds doc-Xr-font \f[R]
+.
+.ds doc-left-parenthesis \f[R](\f[P]
+.ds doc-right-parenthesis \f[R])\f[P]
+.ds lp \f[R](\f[P]
+.ds rp \f[R])\f[P]
+.ds doc-left-bracket \f[R][\f[P]
+.ds doc-right-bracket \f[R]]\f[P]
+.
+.\" miscellaneous
+.nr doc-subheader-indent .5i
+.nr doc-paragraph-space 1v
+.
+.ec
+.nr doc-digit-width \w'\0\0'u
+.nr doc-fixed-width \w'0'
+.eo
+.
+.
+.\" NS doc-header-space global register
+.\" NS the space between header and body
+.
+.nr doc-header-space 0
+.
+.
+.\" NS doc-footer-space global register
+.\" NS the space between body and footer
+.
+.nr doc-footer-space 0
+.
+.
+.\" NS doc-display-vertical global register
+.\" NS vertical space between list elements etc.
+.
+.nr doc-display-vertical 0
+.
+.
+.\" NS doc-setup-page-layout macro
+.\" NS set up page layout
+.\" NS
+.\" NS modifies:
+.\" NS doc-display-vertical
+.\" NS doc-footer-space
+.\" NS doc-header-space
+.
+.de doc-setup-page-layout
+. ie \n[cR] \
+. nr doc-header-space 0
+. el \
+. nr doc-header-space .5i
+. nr doc-footer-space .5i
+.
+. ll 78n
+. lt 78n
+. po 0i
+.
+. nr doc-display-vertical 1v
+. ad l
+. na
..
-.ds <= \&<\&=
-.ds >= \&>\&=
-.ds Rq ''
-.ds Lq ``
-.ds ua ^
-.ds aa \'
-.ds ga \`
-.ds sL `
-.ds sR '
-.ds q \&"
-.\" Math stuff
-.ds Pi pi
-.ds Ne !=
-.ds Le <=
-.ds Ge >=
+.
+.
+.ec
+.
+.ds doc-left-singlequote \[oq]
+.ds doc-right-singlequote \[cq]
+.
+.\" the following strings are `official'
+.ds <= \[<=]
+.ds >= \[>=]
+.ds aa \[aa]
+.ds ga \[ga]
+.ds q \[dq]
+.ds Ne \[!=]
+.ds Le \[<=]
+.ds Ge \[>=]
.ds Lt <
.ds Gt >
-.ds Pm +-
-.ds If infinity
-.ds Na \fINaN\fP
-.ds Ba \fR\&|\fP
-
-.\"
-.de hK
-.nr % 1
-.ds hT \\*(dT
-.if !"\\*(cH"Null" \{\
-. ie !"\\*(gP"Null" .as hT \|(\|\\*(cH\\*(gP\|)
-. el .as hT \\|(\\|\\*(cH\\|)
-.\}
-.if "\\*(cH"Null" .if !"\\*(gP"Null" .as hT \&\|(\|\\*(gP\|)
-.ie \\n(cR \{\
-. hM
-. wh -1v fM
+.ds Pm \[+-]
+.ds Na \f[I]NaN\f[P]
+.ds Ba \f[R]|\f[P]
+.
+.\" Unicode TTYs have all glyph forms; for other TTY character sets we need
+.\" character representations which are different from GNU troff's standard
+.\" forms.
+.ie '\*[.T]'utf8' \{\
+. ds Rq \[rq]
+. ds Lq \[lq]
+. ds ua \[ua]
+. ds Pi \[*p]
+. ds If \[if]
.\}
.el \{\
-. wh 0 hM
-. wh -1.167i fM
+. ds Rq ''
+. ds Lq ``
+. ds ua ^
+. ds Pi pi
+. ds If infinity
.\}
-.if \\n(nl==0:\\n(nl==-1 'bp
-.em lM
+.
+.eo
+.
+.
+.\" NS doc-header-string global string
+.\" NS the final string used for the manual page header
+.
+.ds doc-header-string
+.
+.
+.\" NS doc-setup-header macro
+.\" NS install and initialize header and footer support
+.\" NS
+.\" NS modifies:
+.\" NS doc-header-string
+.
+.de doc-setup-header
+. nr % 1
+. ds doc-header-string "\*[doc-document-title]
+. if !"\*[doc-section]"Null" \
+. as doc-header-string (\*[doc-section])
+.
+. ie \n[cR] \
+. doc-header
+. el \{\
+. wh 0 doc-header
+. wh -1.167i doc-footer
+. \}
+.
+. if ((\n[nl] == 0) : (\n[nl] == -1)) \
+' bp
+.
+. e@ doc-end-macro
..
-.nr fW \w'0'
-.de sW
-.nr sW \w\\$1
-.ie \\n(sW>=\\n(fW \{\
-. ie \\n(sW%\\n(fW .nr sW (\\n(sW/\\n(fW)+1
-. el .nr sW \\n(sW/\\n(fW
-.\}
-.el .nr sW 0
+.
+.
+.\" NS doc-get-width macro
+.\" NS computes the width of a string as a multiple of `doc-fixed-width':
+.\" NS `.doc-get-width string'
+.\" NS
+.\" NS modifies:
+.\" NS doc-width
+.
+.de doc-get-width
+. nr doc-width \w\$1
+. ie (\n[doc-width] >= \n[doc-fixed-width]) \{\
+. ie (\n[doc-width] % \n[doc-fixed-width]) \
+. nr doc-width ((\n[doc-width] / \n[doc-fixed-width]) + 1)
+. el \
+. nr doc-width (\n[doc-width] / \n[doc-fixed-width])
+. \}
+. el \
+. nr doc-width 0
..
-.de aW
-.nr sW \w\\*(A\\$1
-.ie \\n(sW>=\\n(fW \{\
-. ie \\n(sW%\\n(fW .nr sW (\\n(sW/\\n(fW)+1
-. el .nr sW \\n(sW/\\n(fW
-.\}
-.el .nr sW 0
+.
+.
+.\" NS doc-get-arg-width macro
+.\" NS computes the width of an argument as a multiple of
+.\" NS `doc-fixed-width': `.doc-get-arg-width arg-index'
+.\" NS
+.\" NS modifies:
+.\" NS doc-width
+.
+.de doc-get-arg-width
+. nr doc-width \w\*[doc-arg\$1]
+. ie (\n[doc-width] >= \n[doc-fixed-width]) \{\
+. ie (\n[doc-width] % \n[doc-fixed-width]) \
+. nr doc-width ((\n[doc-width] / \n[doc-fixed-width]) + 1)
+. el \
+. nr doc-width (\n[doc-width] / \n[doc-fixed-width])
+. \}
+. el \
+. nr doc-width 0
..
-.\" NS Ql macro - Quoted literal define
+.
+.
+.\" NS Ql user macro
+.\" NS quoted literal define
+.\" NS
+.\" NS modifies:
+.\" NS doc-macro-name
+.\" NS doc-quote-left
+.\" NS doc-quote-right
+.\" NS
+.\" NS width register `Ql' set in doc-common
+.
.de Ql
-.if \\n(aC==0 \{\
-. ds mN Ql
-. ds A1 \\$1
-. ds A2 \\$2
-. ds A3 \\$3
-. ds A4 \\$4
-. ds A5 \\$5
-. ds A6 \\$6
-. ds A7 \\$7
-. ds A8 \\$8
-. ds A9 \\$9
-. nr fV \\n(.$
-. fV
-.\}
-.ds qL \&\\*(sL
-.ds qR \&\\*(sR
-.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" NS Sh macro - Section Headers
-.\" NS nS register - Section Header SYNOPSIS flag
-.\" NS nF register - Section Header FILES flag
-.\" NS nA register - Section Header SEE ALSO flag
-.\" NS nT register - Section Header STANDARDS flag
-.de Sh
-.nr nS 0
-.nr sE 0
-.nr iS 0
-.ie "\\$1"NAME" \{\
-. hK
-' in 0
-.\}
-.el \{\
-. nr nS 0
-. nr nA 0
-. nr nF 0
-. nr nT 0
-. nr nY 0
-. nr aN 0
-. nr oT 0
-. if "\\$1"SEE" .nr nA 1
-. if "\\$1"FILES" .nr nF 1
-. if "\\$1"STANDARDS" .nr nT 1
-. if "\\$1"SYNOPSIS" .nr nS 1
-. if "\\$1"DESCRIPTION" \{\
-. rr fB
-. rr Fb
-. ds Fb
-. nr fY 0
-. nr fZ 0
-. \}
-. if "\\$1"AUTHORS" .nr nY 1
-. in 0
-.\}
-.pL
-'sp
-.ns
-.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
-.if !\\n(cR .ne 3
-'fi
-\&\\*(sH\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6 \|\\$7 \|\\$8 \|\\$9
-\&\fP\s0\&
-.in \\n(.iu+\\n(Tiu
-.if "\\$1"SEE" .nr sE 1
-.ns
+. if !\n[doc-arg-limit] \{\
+. ie \n[.$] \
+. ds doc-macro-name Ql
+. el \
+. tm Usage: .Ql argument ... (#\n[.c])
+. \}
+.
+. ds doc-quote-left "\*[doc-left-singlequote]
+. ds doc-quote-right "\*[doc-right-singlequote]
+.
+. doc-enclose-string \$@
..
+.
+.
+.ec
+.
+.\" EOF