Update to groff 1.19.2.
[dragonfly.git] / contrib / groff-1.19 / tmac / doc-ditroff
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. [Deleted.  See
13 .\"     ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change]
14 .\" 4. Neither the name of the University nor the names of its contributors
15 .\"    may be used to endorse or promote products derived from this software
16 .\"    without specific prior written permission.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" SUCH DAMAGE.
29 .\"
30 .\"     @(#)doc-ditroff 8.1 (Berkeley) 06/08/93
31 .\"
32 .\"     %beginstrip%
33 .
34 .
35 .eo
36 .
37 .\" use -rD=1 for double-sided printing
38 .
39 .if !r D .nr D 0
40 .
41 .\" use -rcR=1 to force the creation of a single, very long page
42 .
43 .if !r cR .nr cR 0
44 .
45 .\" use -rS={11,12} to change the font size from 10pt to 11pt or 12pt.
46 .
47 .if !r S .nr S 10
48 .
49 .
50 .ec
51 .
52 .
53 .ie        (\n[S] == 11) \{\
54 .  ps 10.95z
55 .  vs 13.6p
56 .\}
57 .el \{ .ie (\n[S] == 12) \{\
58 .  ps 12z
59 .  vs 14.5p
60 .\}
61 .el \{\
62 .  ps 10z
63 .  vs 12p
64 .\}\}
65 .
66 .
67 .\" the `doc-xx-font' strings must not be empty!
68 .
69 .ds doc-caption-font \f[R]\s[\n[.ps]u]
70 .ds doc-caption-font2 \f[R]\s[\n[.ps]u]
71 .ds doc-Ad-font \f[I]\s[\n[.ps]u]
72 .ds doc-Ar-font \f[CO]\s[\n[.ps]u]
73 .ds doc-Cm-font \f[CB]\s[\n[.ps]u]
74 .ds doc-Em-font \f[I]\s[\n[.ps]u]
75 .ds doc-Er-font \f[C]\s[\n[.ps]u]
76 .ds doc-Ev-font \f[C]\s[\n[.ps]u]
77 .ds doc-Fa-font \f[CO]\s[\n[.ps]u]
78 .ds doc-Fd-font \f[CB]\s[\n[.ps]u]
79 .ds doc-Fl-font \f[CB]\s[\n[.ps]u]
80 .ds doc-Fn-font \f[CB]\s[\n[.ps]u]
81 .ds doc-Ft-font \f[CO]\s[\n[.ps]u]
82 .ds doc-Ic-font \f[CB]\s[\n[.ps]u]
83 .ds doc-Li-font \f[C]
84 .ds doc-Me-font \f[B]\s[\n[.ps]u]
85 .ds doc-Nm-font \f[CB]\s[\n[.ps]u]
86 .ds doc-No-font \f[R]\s[\n[.ps]u]
87 .ds doc-Pa-font \f[C]\s[\n[.ps]u]
88 .ds doc-Sh-font \f[B]\s[\n[.ps]u]
89 .ds doc-Sy-font \f[B]\s[\n[.ps]u]
90 .ds doc-Sx-font \f[B]\s[\n[.ps]u]
91 .ds doc-Tn-font-shape \f[R]
92 \# XXX: adapt to discrete LaTeX font sizes
93 .ds doc-Tn-font-size \s[(\n[.ps]u - 1z)]
94 .ds doc-Va-font \f[I]\s[\n[.ps]u]
95 .ds doc-Xr-font \f[C]\s[\n[.ps]u]
96 .
97 .ds doc-left-parenthesis \f[R]\|(\|\f[]\s[\n[.ps]u]
98 .ds doc-right-parenthesis \f[R]\|)\|\f[]\s[\n[.ps]u]
99 .ds lp \f[R](\f[]\s[\n[.ps]u]
100 .ds rp \f[R])\f[]\s[\n[.ps]u]
101 .ds doc-left-bracket \f[R]\^[\^\f[]\s[\n[.ps]u]
102 .ds doc-right-bracket \f[R]\^]\f[]\s[\n[.ps]u]
103 .
104 .tr *\[**]
105 .
106 .\" miscellaneous
107 .nr doc-subheader-indent (\w\a\f[C],\au * 5u)
108 .nr doc-paragraph-space .5v
109 .
110 .nr doc-digit-width \w'\0'u
111 .nr doc-fixed-width \w\a\f[C]0\a
112 .
113 .eo
114 .
115 .
116 .\" NS doc-header-space global register
117 .\" NS   the space between header and body
118 .
119 .nr doc-header-space .5i
120 .
121 .
122 .\" NS doc-footer-space global register
123 .\" NS   the space between body and footer
124 .
125 .nr doc-footer-space .5i
126 .
127 .
128 .\" NS doc-display-vertical global register
129 .\" NS   vertical space between list elements etc.
130 .
131 .nr doc-display-vertical 0
132 .
133 .
134 .\" NS doc-setup-page-layout macro
135 .\" NS   set up page layout
136 .\" NS
137 .\" NS modifies:
138 .\" NS   doc-display-vertical
139 .
140 .de doc-setup-page-layout
141 .  ie r LL \
142 .    ll \n[LL]u
143 .  el \
144 .    ll 6.5i
145 .
146 .  ie r LT \
147 .    lt \n[LT]u
148 .  el \
149 .    lt 6.5i
150 .
151 .  po 1i
152 .
153 .  nr doc-display-vertical .5v
154 ..
155 .
156 .
157 .ds doc-left-singlequote \[oq]
158 .ds doc-right-singlequote \[cq]
159 .
160 .\" the following strings are `official'
161 .ds <= \[<=]
162 .ds >= \[>=]
163 .ds Lq \[lq]
164 .ds Rq \[rq]
165 .ds ua \[ua]
166 .ds aa \[aa]
167 .ds ga \[ga]
168 .ds q \[dq]
169 .ds Pi \[*p]
170 .ds Ne \[!=]
171 .ds Le \[<=]
172 .ds Ge \[>=]
173 .ds Lt <
174 .ds Gt >
175 .ds Pm \[+-]
176 .ds If \[if]
177 .ds Na \f[I]NaN\f[]
178 .ds Ba \f[R]|\f[]
179 .ds Am &
180 .
181 .
182 .\" NS doc-header-string global string
183 .\" NS   the final string used for the manual page header
184 .
185 .ds doc-header-string
186 .
187 .
188 .\" NS doc-setup-header macro
189 .\" NS   install and initialize header and footer support
190 .\" NS
191 .\" NS modifies:
192 .\" NS   doc-header-string
193 .
194 .de doc-setup-header
195 .  ds doc-header-string "\*[doc-document-title]
196 .  if !"\*[doc-section]"Null" \
197 .    as doc-header-string \|(\*[doc-section])
198 .
199 .  wh 0 doc-header
200 .  wh -1.25i doc-footer
201 .
202 .  br
203 .
204 .  e@ doc-end-macro
205 ..
206 .
207 .
208 .\" NS doc-get-width macro
209 .\" NS   computes the width of a string as a multiple of `doc-fixed-width':
210 .\" NS   `.doc-get-width string'
211 .\" NS
212 .\" NS modifies:
213 .\" NS   doc-width
214 .
215 .de doc-get-width
216 .  nr doc-width \w\a\f[C]\$1\a
217 .  ie (\n[doc-width] >= \n[doc-fixed-width]) \{\
218 .    ie (\n[doc-width] % \n[doc-fixed-width]) \
219 .      nr doc-width ((\n[doc-width] / \n[doc-fixed-width]) + 1)
220 .    el \
221 .      nr doc-width (\n[doc-width] / \n[doc-fixed-width])
222 .  \}
223 .  el \{\
224 .    ie \n[doc-width] \
225 .      nr doc-width 1
226 .    el \
227 .      nr doc-width 0
228 .  \}
229 ..
230 .
231 .
232 .\" NS doc-get-arg-width macro
233 .\" NS   computes the width of an argument as a multiple of
234 .\" NS   `doc-fixed-width': `.doc-get-arg-width arg-index'
235 .\" NS
236 .\" NS modifies:
237 .\" NS   doc-width
238 .
239 .de doc-get-arg-width
240 .  nr doc-width \w\a\f[C]\*[doc-arg\$1]\a
241 .  ie (\n[doc-width] >= \n[doc-fixed-width]) \{\
242 .    ie (\n[doc-width] % \n[doc-fixed-width]) \
243 .      nr doc-width ((\n[doc-width] / \n[doc-fixed-width]) + 1)
244 .    el \
245 .      nr doc-width (\n[doc-width] / \n[doc-fixed-width])
246 .  \}
247 .  el \{\
248 .    ie \n[doc-width] \
249 .      nr doc-width 1
250 .    el \
251 .      nr doc-width 0
252 .  \}
253 ..
254 .
255 .
256 .\" NS Ql user macro
257 .\" NS   quoted literal define
258 .\" NS
259 .\" NS modifies:
260 .\" NS   doc-argXXX
261 .\" NS   doc-arg-limit
262 .\" NS   doc-arg-ptr
263 .\" NS   doc-macro-name
264 .\" NS   doc-spaceXXX
265 .\" NS   doc-typeXXX
266 .\" NS   doc-quote-left
267 .\" NS   doc-quote-right
268 .\" NS
269 .\" NS local variables:
270 .\" NS   doc-reg-Ql
271 .\" NS   doc-reg-Ql1
272 .\" NS   doc-reg-Ql2
273 .\" NS
274 .\" NS width register `Ql' set in doc-common
275 .
276 .de Ql
277 .  if !\n[doc-arg-limit] \{\
278 .    ie \n[.$] \{\
279 .      ds doc-macro-name Ql
280 .      doc-parse-args \$@
281 .    \}
282 .    el \
283 .      tm Usage: .Ql argument ... (#\n[.c])
284 .  \}
285 .
286 .  nr doc-reg-Ql (\n[doc-arg-ptr] + 1)
287 .  doc-get-arg-width \n[doc-reg-Ql]
288 .
289 .  \" don't use quotes if we have more than two succeeding string arguments
290 .  nr doc-reg-Ql +1
291 .  if (\n[doc-arg-limit] >= \n[doc-reg-Ql]) \
292 .    if (\n[doc-type\n[doc-reg-Ql]] == 2) \
293 .      nr doc-width 3
294 .
295 .  \" make a difference in quotation style for strings longer
296 .  \" than two characters
297 .  ie (\n[doc-width] > 2) \
298 .    Li
299 .  el \{\
300 .    ie \n[doc-arg-ptr] \{\
301 .      \" we replace `Ql' with `Li'
302 .      ds doc-arg\n[doc-arg-ptr] Li
303 .      nr doc-arg-ptr -1
304 .    \}
305 .    el \{\
306 .      \" if .Ql has been called directly, we must shift all elements in
307 .      \" the argument vector to the right so that we can insert `Li'
308 .      nr doc-reg-Ql \n[doc-arg-limit]
309 .      nr doc-reg-Ql1 (\n[doc-arg-limit] + 1)
310 .      while \n[doc-reg-Ql] \{\
311 .        rn doc-arg\n[doc-reg-Ql] doc-arg\n[doc-reg-Ql1]
312 .        rnn doc-type\n[doc-reg-Ql] doc-type\n[doc-reg-Ql1]
313 .        rn doc-space\n[doc-reg-Ql] doc-space\n[doc-reg-Ql1]
314 .        nr doc-reg-Ql -1
315 .        nr doc-reg-Ql1 -1
316 .      \}
317 .      ds doc-arg1 Li
318 .      nr doc-type1 1
319 .      ds doc-space1
320 .      nr doc-arg-limit +1
321 .    \}
322 .
323 .    ds doc-quote-left "\*[doc-left-singlequote]
324 .    ds doc-quote-right "\*[doc-right-singlequote]
325 .    doc-enclose-string
326 .  \}
327 ..
328 .
329 .
330 .ec
331 .
332 .\" EOF