Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / groff / tmac / an-old.tmac
1 .\" an-old.tmac
2 .\"
3 .\" Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002
4 .\"   Free Software Foundation, Inc.
5 .\"      Written by James Clark (jjc@jclark.com)
6 .\"
7 .\" This file is part of groff.
8 .\"
9 .\" groff is free software; you can redistribute it and/or modify it under
10 .\" the terms of the GNU General Public License as published by the Free
11 .\" Software Foundation; either version 2, or (at your option) any later
12 .\" version.
13 .\"
14 .\" groff is distributed in the hope that it will be useful, but WITHOUT ANY
15 .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 .\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
17 .\" for more details.
18 .\"
19 .\" You should have received a copy of the GNU General Public License along
20 .\" with groff; see the file COPYING.  If not, write to the Free Software
21 .\" Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 .\"
23 .\"  -rcR=1 => Create a single, very long page instead of multiple pages.
24 .\"            Useful for online display.  Default in nroff mode.
25 .\"            Desactivate with -rcR=0.
26 .\"  -rC1 => Number pages continuously, rather than start each at 1.
27 .\"  -rD1 => Double-sided printing, ie different odd and even page footers.
28 .\"  -rPnnn => Number first page nnn.
29 .\"  -rSxx => Use size `xx'pt (either 10, 11, or 12) for document rather
30 .\"           than the default size of 10pt.
31 .\"  -rXnnn => Number pages after nnn as nnna, nnnb, nnnc, ...
32 .\"
33 .\" The file man.local is loaded at the end.  Put local additions there.
34 .\" If you need to add things to TH, use `.am1 TH'.
35 .\"
36 .
37 .if !\n(.g .ab These man macros work only with groff.
38 .
39 .do if d RI .nx
40 .
41 .nr _C \n(.C
42 .cp 0
43 .
44 .if (\n[.x]\n[.y] < 118) \
45 .  ab You need GNU troff version 1.18 or higher to run this version of man!
46 .
47 .if !r D .nr D 0
48 .if !r C .nr C 0
49 .if !r S .nr S 10
50 .\" we must use consecutive page numbers when using postscript to generate
51 .\" html images, and we must not reset the page number at the beginning
52 .\" (the `ps4html' register is automatically added to the command line by
53 .\" the pre-html preprocessor)
54 .if !r ps4html \
55 .  if r P .pn 0\n[P]
56 .if !r cR \{\
57 .  ie n .nr cR 1
58 .  el   .nr cR 0
59 .\}
60 .
61 .if !r LL \{\
62 .  ie n .nr LL 78n
63 .  el   .nr LL 6.5i
64 .\}
65 .if !r LT \{\
66 .  ie n .nr LT 78n
67 .  el   .nr LT 6.5i
68 .\}
69 .
70 .nr an-html 0
71 .if '\*[.T]'html' .nr an-html 1
72 .if \n[an-html] .nr C 1
73 .if r ps4html .nr C 1
74 .
75 .\" we redefine .ne to avoid page breaks; instead, the page length is
76 .\" increased to the necessary amount (this is needed for tables)
77 .if n \{\
78 .  de1 ne
79 .    ie \\n[.$] \
80 .      nr an-ne \\$*
81 .    el \
82 .      nr an-ne 1v
83 .    if (\\n[an-ne] >= \\n[.t]) \
84 .      pl +(\\n[an-ne]u - \\n[.t]u + 1v)
85 .  .
86 .\}
87 .
88 .de set-an-margin
89 .  nr an-margin \\n[IN]
90 ..
91 .
92 .\" .TH title section extra1 extra2 extra3
93 .de1 TH
94 .  if \\n[an-html] \{\
95 .    HTML-TAG ".tl"
96 \\$1
97 .  \}
98 .
99 .  de an-init \" We have to do it like this to get multiple man pages right.
100 .    ds an-title "\\$1
101 .    ds an-section "\\$2
102 .    ds an-extra1 "\\$3
103 .    ie (\\n[.$] > 3) .ds an-extra2 "\\$4
104 .    el               .ds an-extra2 \"Sun Release 4.0
105 .    ie (\\n[.$] > 4) .ds an-extra3 "\\$5
106 .    el               .ds an-extra3 \"System Programmer's Manual
107 .    ds an-init
108 \\..
109 .
110 .  DT
111 .
112 .  nr PS    10z \" default point size
113 .  nr PS-SS 10z
114 .  nr PS-SH 10.95z
115 .  nr VS    12p
116 .
117 .  \" use sizes similar to LaTeX
118 .  if t \{\
119 .    ie (\\n[S] == 11) \{\
120 .      nr PS    10.95z
121 .      nr PS-SS 10.95z
122 .      nr PS-SH 12z
123 .      nr VS    13.6p
124 .    \}
125 .    el \{\
126 .      if (\\n[S] == 12) \{\
127 .        nr PS    12z
128 .        nr PS-SS 12z
129 .        nr PS-SH 14.4z
130 .        nr VS    14.5p
131 .      \}
132 .    \}
133 .  \}
134 .
135 .  ps \\n[PS]u
136 .  vs \\n[VS]u
137 .  ll \\n[LL]u
138 .
139 .  nr IN 7.2n
140 .  PD
141 .  nr SN 3n \" the indentation of sub-sub-headings relative to sub-headings
142 .  nr an-level 1
143 .  set-an-margin
144 .  nr an-prevailing-indent \\n[IN]
145 .  nr an-tag-sep 1n
146 .
147 .  nr an-no-space-flag 0
148 .  nr an-break-flag 0
149 .  nr an-div? 0
150 .
151 .  ie \\n[cR] \
152 .    an-header
153 .  el \{\
154 .    wh 0 an-header
155 .    wh -1i an-footer
156 .    wh -.5i an-p-footer
157 .
158 .    if (\\n[nl] > 0) \{\
159 .      ie \\n[C] .bp (\\n[%] + 1)
160 .      el        .bp 1
161 .    \}
162 .  \}
163 ..
164 .
165 .\" BSD compatibility macros: .AT and .UC
166 .
167 .de1 AT
168 .  ds an-extra2 "7th Edition
169 .  if "\\$1"3" .ds an-extra2 "7th Edition
170 .  if "\\$1"4" .ds an-extra2 "System III
171 .  if "\\$1"5" \{\
172 .    ie "\\$2"" .ds an-extra2 "System V
173 .    el .ds an-extra2 "System V Release \\$2
174 .  \}
175 ..
176 .
177 .de1 UC
178 .  ds an-extra2 "3rd Berkeley Distribution
179 .  if "\\$1"3" .ds an-extra2 "3rd Berkeley Distribution
180 .  if "\\$1"4" .ds an-extra2 "4th Berkeley Distribution
181 .  if "\\$1"5" .ds an-extra2 "4.2 Berkeley Distribution
182 .  if "\\$1"6" .ds an-extra2 "4.3 Berkeley Distribution
183 .  if "\\$1"7" .ds an-extra2 "4.4 Berkeley Distribution
184 ..
185 .
186 .de1 DT
187 .  ta T .5i \" This sets tabs every .5 inches
188 ..
189 .
190 .de1 PD
191 .  ie \\n[.$] .nr PD (v;\\$1)
192 .  el         .nr PD (.4v >? \n[.V])
193 ..
194 .
195 .de1 an-header
196 .  an-init
197 .  ev 1
198 .  ps \\n[PS]u
199 .  vs \\n[VS]u
200 .  lt \\n[LT]u
201 .  ie \\n[an-html] \
202 .    tl ''''
203 .  el \{\
204 .    if !\\n[cR] \
205 .      sp .5i
206 .    tl '\\*[an-title](\\*[an-section])'\\*[an-extra3]'\\*[an-title](\\*[an-section])'
207 .    ie !\\n[cR] \
208 .      sp |1i
209 .    el \
210 .      sp .5i
211 .  \}
212 .  ev
213 .  ns
214 ..
215 .
216 .de1 an-footer
217 '  bp
218 ..
219 .
220 .af an-page-letter a
221 .
222 .de1 an-p-footer
223 .  ev 1
224 .  ps \\n[PS]u
225 .  vs \\n[VS]u
226 .  lt \\n[LT]u
227 .  ie \\n[an-html] \{\
228 .    ds an-page-string
229 .    ds an-extra1
230 .    ds an-extra2
231 .  \}
232 .  el \{\
233 .    ie r X \{\
234 .      if (\\n[%] > \\n[X]) \{\
235 .        nr an-page-letter (\\n[%] - \\n[X])
236 .        ds an-page-string \\n[X]\\n[an-page-letter]
237 .      \}
238 .    \}
239 .    el \{\
240 .      ie \\n[cR] \
241 .        ds an-page-string "\\*[an-title](\\*[an-section])
242 .      el \
243 .        ds an-page-string \\n[%]
244 .    \}
245 .  \}
246 .  ie \\n[D] \{\
247 .    if o .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
248 .    if e .tl '\\*[an-page-string]'\\*[an-extra1]'\\*[an-extra2]'
249 .  \}
250 .  el \
251 .    tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
252 .  ev
253 ..
254 .
255 .de1 an-end
256 .  nr % 1
257 .  pl +4v
258 .  fl
259 .  sp 3
260 .  an-p-footer
261 .  pl \\n[nl]u
262 ..
263 .
264 .if \n[cR] .em an-end
265 .
266 .de1 SH
267 .  sp \\n[PD]u
268 .  nr an-level 1
269 .  set-an-margin
270 .  nr an-prevailing-indent \\n[IN]
271 .  fi
272 .  in \\n[an-margin]u
273 .  ti 0
274 .  HTML-TAG ".NH \\n[an-level]"
275 .  it 1 an-trap
276 .  nr an-no-space-flag 1
277 .  nr an-break-flag 1
278 .  ps \\n[PS-SH]u
279 .  ft B
280 .  ne (2v + 1u)
281 .  if \\n[.$] \&\\$*
282 ..
283 .
284 .de1 SS
285 .  sp \\n[PD]u
286 .  nr an-level 1
287 .  set-an-margin
288 .  nr an-prevailing-indent \\n[IN]
289 .  fi
290 .  in \\n[IN]u
291 .  ti \\n[SN]u
292 .  it 1 an-trap
293 .  nr an-no-space-flag 1
294 .  nr an-break-flag 1
295 .  ps \\n[PS-SS]u
296 .  ft B
297 .  ne (2v + 1u)
298 .  if \\n[.$] \&\\$*
299 ..
300 .
301 .de1 B
302 .  it 1 an-trap
303 .  ft B
304 .  if \\n[.$] \&\\$*
305 ..
306 .
307 .de1 I
308 .  it 1 an-trap
309 .  ft I
310 .  if \\n[.$] \,\\$*\/
311 ..
312 .
313 .de1 SM
314 .  it 1 an-trap
315 .  ps -1
316 .  if \\n[.$] \&\\$*
317 ..
318 .
319 .de1 SB
320 .  it 1 an-trap
321 .  ps -1
322 .  ft B
323 .  if \\n[.$] \&\\$*
324 ..
325 .
326 .de1 TP
327 .  sp \\n[PD]u
328 .  if \\n[.$] .nr an-prevailing-indent (n;\\$1)
329 .  it 1 an-trap
330 .  in 0
331 .  ll -\\n[an-margin]u
332 .  if !\\n[an-div?] .di an-div
333 .  nr an-div? 1
334 ..
335 .
336 .de1 an-trap
337 .  ft R
338 .  ps \\n[PS]u
339 .  vs \\n[VS]u
340 .  if \\n[an-break-flag] \{\
341 .    br
342 .    nr an-break-flag 0
343 .  \}
344 .  if \\n[an-no-space-flag] \{\
345 .    ns
346 .    nr an-no-space-flag 0
347 .  \}
348 .  if \\n[an-div?] .an-do-tag
349 ..
350 .
351 .de an-do-tag
352 .  nr an-div? 0
353 .  br
354 .  ll
355 .  di
356 .  ie (\\n[dl] + \\n[an-tag-sep] > \\n[an-prevailing-indent]) \{\
357 .    in \\n[an-margin]u
358 .    ne (2v + 1u)
359 .    an-div
360 .    br
361 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
362 .  \}
363 .  el \{\
364 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
365 .    ti -\\n[an-prevailing-indent]u
366 .    chop an-div
367 .    ne (1v + 1u)
368 \\*[an-div]\\h'|\\n[an-prevailing-indent]u'\c
369 .  \}
370 ..
371 .
372 .de an-do-tag-html
373 .  nr an-div? 0
374 .  br
375 .  ll
376 .  di
377 .  ie ((\\n[dl] + \\n[an-tag-sep]) > \\n[an-prevailing-indent]) \{\
378 .    in \\n[an-margin]u
379 .    an-div
380 .    br
381 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u + \\n[an-tag-sep]u)
382 .  \}
383 .  el \{\
384 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u + \\n[an-tag-sep]u)
385 .    ti \\n[an-margin]u
386 .    chop an-div
387 .    HTML-TAG-NS ".col 1"
388 \\*[an-div]\\h'|\\n[an-prevailing-indent]u'\\h'\\n[an-tag-sep]u'\c
389 .    HTML-TAG-NS ".col 2"
390 .  \}
391 ..
392 .
393 .de1 LP
394 .  br
395 .  sp \\n[PD]u
396 .  ps \\n[PS]u
397 .  vs \\n[VS]u
398 .  ft R
399 .  in \\n[an-margin]u
400 .  nr an-prevailing-indent \\n[IN]
401 ..
402 .
403 .als PP LP
404 .als P LP
405 .
406 .de1 IP
407 .  ie !\\n[.$] \{\
408 .    ps \\n[PS]u
409 .    vs \\n[VS]u
410 .    ft R
411 .    sp \\n[PD]u
412 .    ne (1v + 1u)
413 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
414 .  \}
415 .  el \{\
416 .    ie (\\n[.$] - 1) .TP "\\$2"
417 .    el               .TP
418 \&\\$1
419 .  \}
420 ..
421 .
422 .de1 HP
423 .  ps \\n[PS]u
424 .  vs \\n[VS]u
425 .  ft R
426 .  sp \\n[PD]u
427 .  ne (1v + 1u)
428 .  if \\n[.$] .nr an-prevailing-indent (n;\\$1)
429 .  in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
430 .  ti \\n[an-margin]u
431 ..
432 .
433 .ds an-empty \" this is referenced to avoid looping on eg .RB ( \\ )
434 .
435 .de1 RI
436 .  if \\n[.$] \{\
437 .    ds an-result \&\\$1
438 .    shift
439 .    while (\\n[.$] >= 2) \{\
440 .      as an-result \,\f[I]\\$1\f[R]\/\\$2\\*[an-empty]
441 .      shift 2
442 .    \}
443 .    if \\n[.$] .as an-result \,\f[I]\\$1\f[R]
444 \\*[an-result]
445 .  \}
446 ..
447 .
448 .de1 IR
449 .  if \\n[.$] \{\
450 .    ds an-result \&\f[I]\\$1\f[R]
451 .    shift
452 .    while (\\n[.$] >= 2) \{\
453 .      as an-result \/\\$1\f[I]\,\\$2\f[R]
454 .      shift 2
455 .    \}
456 .    if \\n[.$] .as an-result \/\\$1
457 \\*[an-result]
458 .  \}
459 ..
460 .
461 .de1 IB
462 .  if \\n[.$] \{\
463 .    ds an-result \&\f[I]\\$1
464 .    shift
465 .    while (\\n[.$] >= 2) \{\
466 .      as an-result \/\f[B]\\$1\f[I]\,\\$2\\*[an-empty]
467 .      shift 2
468 .    \}
469 .    if \\n[.$] .as an-result \/\f[B]\\$1
470 \\*[an-result]
471 .    ft R
472 .  \}
473 ..
474 .
475 .de1 BI
476 .  if \\n[.$] \{\
477 .    ds an-result \&\f[B]\\$1
478 .    shift
479 .    while (\\n[.$] >= 2) \{\
480 .      as an-result \,\f[I]\\$1\f[B]\/\\$2\\*[an-empty]
481 .      shift 2
482 .    \}
483 .    if \\n[.$] .as an-result \,\f[I]\\$1
484 \\*[an-result]
485 .    ft R
486 .  \}
487 ..
488 .
489 .de1 RB
490 .  ds an-result \&
491 .  while (\\n[.$] >= 2) \{\
492 .    as an-result \f[R]\\$1\f[B]\\$2\\*[an-empty]
493 .    shift 2
494 .  \}
495 .  if \\n[.$] .as an-result \f[R]\\$1
496 \\*[an-result]
497 .  ft R
498 ..
499 .
500 .de1 BR
501 .  ds an-result \&
502 .  while (\\n[.$] >= 2) \{\
503 .    as an-result \f[B]\\$1\f[R]\\$2\\*[an-empty]
504 .    shift 2
505 .  \}
506 .  if \\n[.$] .as an-result \f[B]\\$1
507 \\*[an-result]
508 .  ft R
509 ..
510 .
511 .de1 RS
512 .  br
513 .  nr an-saved-margin\\n[an-level] \\n[an-margin]
514 .  nr an-saved-prevailing-indent\\n[an-level] \\n[an-prevailing-indent]
515 .  ie \\n[.$] .nr an-margin +(n;\\$1)
516 .  el         .nr an-margin +\\n[an-prevailing-indent]
517 .  in \\n[an-margin]u
518 .  nr an-prevailing-indent \\n[IN]
519 .  nr an-level +1
520 ..
521 .
522 .de1 RE
523 .  br
524 .  ie \\n[.$] .nr an-level ((;\\$1) <? \\n[an-level])
525 .  el         .nr an-level -1
526 .  nr an-level (1 >? \\n[an-level])
527 .  nr an-margin \\n[an-saved-margin\\n[an-level]]
528 .  nr an-prevailing-indent \\n[an-saved-prevailing-indent\\n[an-level]]
529 .  in \\n[an-margin]u
530 ..
531 .
532 .\" table support
533 .
534 .de1 TS
535 .  sp \\n[PD]u
536 .  HTML-IMAGE
537 ..
538 .
539 .de1 T&
540 ..
541 .
542 .de1 TE
543 .  HTML-IMAGE-END
544 ..
545 .
546 .\" dummy equation delimiters
547 .de1 EQ
548 .  HTML-IMAGE
549 ..
550 .de1 EN
551 .  HTML-IMAGE-END
552 ..
553 .
554 .de1 R
555 \c
556 .  ie \\n[.$] \{\
557 .    tm `R' is a string (producing the registered sign), not a macro.
558 .    nop \\$*
559 .  \}
560 .  el \{\
561 .    ie c\[rg] \
562 .      nop \[rg]\c
563 .    el \
564 .      nop (Reg.)\c
565 .  \}
566 ..
567 .
568 .\" these strings must work in compatibility mode also
569 .
570 .ds S \s'\\n(PSu'
571 .ie c\[tm] .ds Tm \(tm
572 .el        .ds Tm (TM)
573 .ds lq \(lq
574 .ds rq \(rq
575 .
576 .ie \n[an-html] \{\
577 .   rm an-do-tag
578 .   als an-do-tag an-do-tag-html
579 .\}
580 .el .hy 14
581 .
582 .\" Load local modifications.
583 .mso man.local
584 .
585 .cp \n[_C]
586 .
587 .\" end of an-old.tmac