Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / groff / tmac / doc-nroff
1 .\" Copyright (c) 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
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.
19 .\"
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
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)doc-nroff   8.1 (Berkeley) 06/08/93
33 .\"     $FreeBSD: src/contrib/groff/tmac/doc-nroff,v 1.1.1.1.8.6 2003/02/14 15:22:11 ru Exp $
34 .\"
35 .\"     %beginstrip%
36 .
37 .
38 .eo
39 .
40 .\" use -rD=1 for double-sided printing
41 .
42 .if !r D .nr D 0
43 .
44 .\" use -rcR=0 to have multiple pages instead of a single, very long page
45 .
46 .if !r cR .nr cR 1
47 .
48 .\" the following switches are ignored in nroff mode
49 .
50 .nr S 10
51 .nr C 0
52 .
53 .\" the `doc-xx-font' strings must not be empty!
54 .
55 .ds doc-caption-font \f[R]
56 .ds doc-caption-font2 \f[R]
57 .ds doc-Ad-font \f[I]
58 .ds doc-Ar-font \f[I]
59 .ds doc-Cm-font \f[B]
60 .ds doc-Em-font \f[I]
61 .ds doc-Er-font \f[R]
62 .ds doc-Ev-font \f[R]
63 .ds doc-Fa-font \f[I]
64 .ds doc-Fd-font \f[B]
65 .ds doc-Fl-font \f[B]
66 .ds doc-Fn-font \f[B]
67 .ds doc-Ft-font \f[I]
68 .ds doc-Ic-font \f[B]
69 .ds doc-Li-font \f[R]
70 .ds doc-Me-font \f[B]
71 .ds doc-Nm-font \f[B]
72 .ds doc-No-font \f[R]
73 .ds doc-Pa-font \f[I]
74 .ds doc-Sh-font \f[B]
75 .ds doc-Sy-font \f[B]
76 .ds doc-Sx-font \f[I]
77 .ds doc-Tn-font-shape \f[R]
78 .ds doc-Tn-font-size
79 .ds doc-Va-font \f[I]
80 .ds doc-Xr-font \f[R]
81 .
82 .ds doc-left-parenthesis \f[R](\f[]
83 .ds doc-right-parenthesis \f[R])\f[]
84 .ds lp \f[R](\f[]
85 .ds rp \f[R])\f[]
86 .ds doc-left-bracket \f[R][\f[]
87 .ds doc-right-bracket \f[R]]\f[]
88 .
89 .\" miscellaneous
90 .nr doc-subheader-indent .5i
91 .nr doc-paragraph-space 1v
92 .
93 .ec
94 .nr doc-digit-width \w'\0\0'u
95 .nr doc-fixed-width \w'0'
96 .eo
97 .
98 .
99 .\" NS doc-header-space global register
100 .\" NS   the space between header and body
101 .
102 .nr doc-header-space 0
103 .
104 .
105 .\" NS doc-footer-space global register
106 .\" NS   the space between body and footer
107 .
108 .nr doc-footer-space 0
109 .
110 .
111 .\" NS doc-display-vertical global register
112 .\" NS   vertical space between list elements etc.
113 .
114 .nr doc-display-vertical 0
115 .
116 .
117 .\" NS doc-setup-page-layout macro
118 .\" NS   set up page layout
119 .\" NS
120 .\" NS modifies:
121 .\" NS   doc-display-vertical
122 .\" NS   doc-footer-space
123 .\" NS   doc-header-space
124 .
125 .de doc-setup-page-layout
126 .  ie \n[cR] \
127 .    nr doc-header-space 0
128 .  el \
129 .    nr doc-header-space .5i
130 .  nr doc-footer-space .5i
131 .
132 .  ie r LL \
133 .    ll \n[LL]u
134 .  el \
135 .    ll 78n
136 .
137 .  ie r LT \
138 .    lt \n[LT]u
139 .  el \
140 .    lt 78n
141 .
142 .  po 0i
143 .
144 .  nr doc-display-vertical 1v
145 .  ad l
146 .  na
147 ..
148 .
149 .
150 .ec
151 .
152 .ds doc-left-singlequote \[oq]
153 .ds doc-right-singlequote \[cq]
154 .
155 .\" the following strings are `official'
156 .ds <= \[<=]
157 .ds >= \[>=]
158 .ds aa \[aa]
159 .ds ga \[ga]
160 .ds q \[dq]
161 .ds Ne \[!=]
162 .ds Le \[<=]
163 .ds Ge \[>=]
164 .ds Lt <
165 .ds Gt >
166 .ds Pm \[+-]
167 .ds Na \f[I]NaN\f[]
168 .ds Ba \f[R]|\f[]
169 .ds Am &
170 .
171 .\" Unicode TTYs have all glyph forms; for other TTY character sets we need
172 .\" character representations which are different from GNU troff's standard
173 .\" forms.
174 .ie '\*[.T]'utf8' \{\
175 .  ds Rq \[rq]
176 .  ds Lq \[lq]
177 .  ds ua \[ua]
178 .  ds Pi \[*p]
179 .  ds If \[if]
180 .\}
181 .el \{\
182 .  ds Rq ''
183 .  ds Lq ``
184 .  ds ua ^
185 .  ds Pi pi
186 .  ds If infinity
187 .\}
188 .
189 .eo
190 .
191 .
192 .\" NS doc-header-string global string
193 .\" NS   the final string used for the manual page header
194 .
195 .ds doc-header-string
196 .
197 .
198 .\" NS doc-setup-header macro
199 .\" NS   install and initialize header and footer support
200 .\" NS
201 .\" NS modifies:
202 .\" NS   doc-header-string
203 .
204 .de doc-setup-header
205 .  nr % 1
206 .  ds doc-header-string "\*[doc-document-title]
207 .  if !"\*[doc-section]"Null" \
208 .    as doc-header-string (\*[doc-section])
209 .
210 .  ie \n[cR] \
211 .    doc-header
212 .  el \{\
213 .    wh 0 doc-header
214 .    wh -1.167i doc-footer
215 .  \}
216 .
217 .  if ((\n[nl] == 0) : (\n[nl] == -1)) \
218 '    bp
219 .
220 .  e@ doc-end-macro
221 ..
222 .
223 .
224 .\" NS doc-get-width macro
225 .\" NS   computes the width of a string as a multiple of `doc-fixed-width':
226 .\" NS   `.doc-get-width string'
227 .\" NS
228 .\" NS modifies:
229 .\" NS   doc-width
230 .
231 .de doc-get-width
232 .  nr doc-width \w\a\$1\a
233 .  ie (\n[doc-width] >= \n[doc-fixed-width]) \{\
234 .    ie (\n[doc-width] % \n[doc-fixed-width]) \
235 .      nr doc-width ((\n[doc-width] / \n[doc-fixed-width]) + 1)
236 .    el \
237 .      nr doc-width (\n[doc-width] / \n[doc-fixed-width])
238 .  \}
239 .  el \
240 .    nr doc-width 0
241 ..
242 .
243 .
244 .\" NS doc-get-arg-width macro
245 .\" NS   computes the width of an argument as a multiple of
246 .\" NS   `doc-fixed-width': `.doc-get-arg-width arg-index'
247 .\" NS
248 .\" NS modifies:
249 .\" NS   doc-width
250 .
251 .de doc-get-arg-width
252 .  nr doc-width \w\a\*[doc-arg\$1]\a
253 .  ie (\n[doc-width] >= \n[doc-fixed-width]) \{\
254 .    ie (\n[doc-width] % \n[doc-fixed-width]) \
255 .      nr doc-width ((\n[doc-width] / \n[doc-fixed-width]) + 1)
256 .    el \
257 .      nr doc-width (\n[doc-width] / \n[doc-fixed-width])
258 .  \}
259 .  el \
260 .    nr doc-width 0
261 ..
262 .
263 .
264 .\" NS Ql user macro
265 .\" NS   quoted literal define
266 .\" NS
267 .\" NS modifies:
268 .\" NS   doc-macro-name
269 .\" NS   doc-quote-left
270 .\" NS   doc-quote-right
271 .\" NS
272 .\" NS width register `Ql' set in doc-common
273 .
274 .de Ql
275 .  if !\n[doc-arg-limit] \{\
276 .    ie \n[.$] \
277 .      ds doc-macro-name Ql
278 .    el \
279 .      tm Usage: .Ql argument ... (#\n[.c])
280 .  \}
281 .
282 .  ds doc-quote-left "\*[doc-left-singlequote]
283 .  ds doc-quote-right "\*[doc-right-singlequote]
284 .
285 .  doc-enclose-string \$@
286 ..
287 .
288 .
289 .ec
290 .
291 .\" EOF