1 .\" Copyright (c) 1991 The Regents of the University of California.
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)doc-ditroff 5.8 (Berkeley) 8/5/91
39 .\" use -rC=1 to number pages continuously
43 .\" use -rcR=1 to force the creation of a single, very long page
50 .\" the `doc-xx-font' strings must not be empty!
52 .ds doc-caption-font \f[R]\s[\n[.ps]u]
53 .ds doc-caption-font2 \f[R]\s[\n[.ps]u]
54 .ds doc-Ad-font \f[I]\s[\n[.ps]u]
55 .ds doc-Ar-font \f[CO]\s[\n[.ps]u]
56 .ds doc-Cm-font \f[CB]\s[\n[.ps]u]
57 .ds doc-Em-font \f[I]\s[\n[.ps]u]
58 .ds doc-Er-font \f[C]\s[\n[.ps]u]
59 .ds doc-Ev-font \f[C]\s[\n[.ps]u]
60 .ds doc-Fa-font \f[CO]\s[\n[.ps]u]
61 .ds doc-Fd-font \f[CB]\s[\n[.ps]u]
62 .ds doc-Fl-font \f[CB]\s[\n[.ps]u]
63 .ds doc-Fn-font \f[CB]\s[\n[.ps]u]
64 .ds doc-Ft-font \f[CO]\s[\n[.ps]u]
65 .ds doc-Ic-font \f[CB]\s[\n[.ps]u]
67 .ds doc-Me-font \f[B]\s[\n[.ps]u]
68 .ds doc-Nm-font \f[CB]\s[\n[.ps]u]
69 .ds doc-No-font \f[R]\s[\n[.ps]u]
70 .ds doc-Pa-font \f[C]\s[\n[.ps]u]
71 .ds doc-Sh-font \f[B]\s[\n[.ps]u]
72 .ds doc-Sy-font \f[B]\s[\n[.ps]u]
73 .ds doc-Sx-font \f[B]\s[\n[.ps]u]
74 .ds doc-Tn-font-shape \f[R]
75 \# XXX: adapt to discrete LaTeX font sizes
76 .ds doc-Tn-font-size \s[(\n[.ps]u - 1z)]
77 .ds doc-Va-font \f[I]\s[\n[.ps]u]
78 .ds doc-Xr-font \f[C]\s[\n[.ps]u]
80 .ds doc-left-parenthesis \f[R]\|(\|\f[P]\s[\n[.ps]u]
81 .ds doc-right-parenthesis \f[R]\|)\|\f[P]\s[\n[.ps]u]
82 .ds lp \f[R](\f[P]\s[\n[.ps]u]
83 .ds rp \f[R])\f[P]\s[\n[.ps]u]
84 .ds doc-left-bracket \f[R]\^[\^\f[P]\s[\n[.ps]u]
85 .ds doc-right-bracket \f[R]\^]\f[P]\s[\n[.ps]u]
90 .nr doc-subheader-indent (\w
\a\f[C],
\au * 5u)
91 .nr doc-paragraph-space .5v
93 .nr doc-digit-width \w'\0'u
94 .nr doc-fixed-width \w
\a\f[C]0
\a
99 .\" NS doc-header-space global register
100 .\" NS the space between header and body
102 .nr doc-header-space 0
105 .\" NS doc-footer-space global register
106 .\" NS the space between body and footer
108 .nr doc-footer-space 0
111 .\" NS doc-display-vertical global register
112 .\" NS vertical space between list elements etc.
114 .nr doc-display-vertical 0
117 .\" NS doc-setup-page-layout macro
118 .\" NS set up page layout
121 .\" NS doc-display-vertical
122 .\" NS doc-footer-space
123 .\" NS doc-header-space
125 .de doc-setup-page-layout
126 . nr doc-header-space .5i
127 . nr doc-footer-space .5i
133 . nr doc-display-vertical .5v
140 .\" Lq and Rq are `official'
146 .ds doc-left-singlequote \)`
147 .ds doc-right-singlequote \)'
151 .\" math stuff -- all macro names are `official'
166 .\" NS doc-header-string global string
167 .\" NS the final string used for the manual page header
169 .ds doc-header-string
172 .\" NS doc-setup-header macro
173 .\" NS install and initialize header and footer support
176 .\" NS doc-header-string
179 . ds doc-header-string "\*[doc-document-title]
180 . if !"\*[doc-section]"Null" \
181 . as doc-header-string \|(\*[doc-section])
184 . wh -1.25i doc-footer
188 . ds doc-command-name
192 . \" Don't set the page number if this is the first page,
193 . \" in case the user has used -n.
203 .\" NS doc-get-width macro
204 .\" NS computes the width of a string as a multiple of `doc-fixed-width':
205 .\" NS `.doc-get-width string'
211 . nr doc-width \w
\a\f[C]\$1
\a
212 . ie (\n[doc-width] >= \n[doc-fixed-width]) \{\
213 . ie (\n[doc-width] % \n[doc-fixed-width]) \
214 . nr doc-width ((\n[doc-width] / \n[doc-fixed-width]) + 1)
216 . nr doc-width (\n[doc-width] / \n[doc-fixed-width])
227 .\" NS doc-get-arg-width macro
228 .\" NS computes the width of an argument as a multiple of
229 .\" NS `doc-fixed-width': `.doc-get-arg-width arg-index'
234 .de doc-get-arg-width
235 . nr doc-width \w
\a\f[C]\*[doc-arg\$1]
\a
236 . ie (\n[doc-width] >= \n[doc-fixed-width]) \{\
237 . ie (\n[doc-width] % \n[doc-fixed-width]) \
238 . nr doc-width ((\n[doc-width] / \n[doc-fixed-width]) + 1)
240 . nr doc-width (\n[doc-width] / \n[doc-fixed-width])
252 .\" NS quoted literal define
258 .\" NS doc-macro-name
261 .\" NS doc-quote-left
262 .\" NS doc-quote-right
264 .\" NS local variables:
269 .\" NS width register `Ql' set in doc-common
272 . if !\n[doc-arg-limit] \{\
274 . ds doc-macro-name Ql
278 . tm Usage: .Ql argument ... (#\n[.c])
281 . nr doc-reg-Ql (\n[doc-arg-ptr] + 1)
282 . doc-get-arg-width \n[doc-reg-Ql]
284 . \" don't use quotes if we have more than two succeeding string arguments
286 . if (\n[doc-arg-limit] >= \n[doc-reg-Ql]) \
287 . if (\n[doc-type\n[doc-reg-Ql]] == 2) \
290 . \" make a difference in quotation style for strings longer
291 . \" than two characters
292 . ie (\n[doc-width] > 2) \
295 . ie \n[doc-arg-ptr] \{\
296 . \" we replace `Ql' with `Li'
297 . ds doc-arg\n[doc-arg-ptr] Li
301 . \" if .Ql has been called directly, we must shift all elements in
302 . \" the argument vector to the right so that we can insert `Li'
303 . nr doc-reg-Ql \n[doc-arg-limit]
304 . nr doc-reg-Ql1 (\n[doc-arg-limit] + 1)
305 . while \n[doc-reg-Ql] \{\
306 . rn doc-arg\n[doc-reg-Ql] doc-arg\n[doc-reg-Ql1]
307 . rnn doc-type\n[doc-reg-Ql] doc-type\n[doc-reg-Ql1]
308 . rn doc-space\n[doc-reg-Ql] doc-space\n[doc-reg-Ql1]
315 . nr doc-arg-limit +1
318 . ds doc-quote-left "\*[doc-left-singlequote]
319 . ds doc-quote-right "\*[doc-right-singlequote]