* All affected files: Update postal address of FSF.
[s-roff.git] / tmac / an-old.tmac
blob6742fb7708ef4cc63050d9fc3c12285072447f11
1 .\" an-old.tmac
2 .\"
3 .\" Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004
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, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, 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 .\"
37 .if !\n(.g .ab These man macros work only with groff.
39 .do if d RI .nx
41 .do mso devtag.tmac
43 .nr _C \n(.C
44 .cp 0
46 .if (\n[.x]\n[.y] < 118) \
47 .  ab You need GNU troff version 1.18 or higher to run this version of man!
49 .if !r D .nr D 0
50 .if !r C .nr C 0
51 .if !r S .nr S 10
52 .\" we must use consecutive page numbers when using postscript to generate
53 .\" html images, and we must not reset the page number at the beginning
54 .\" (the `ps4html' register is automatically added to the command line by
55 .\" the pre-html preprocessor)
56 .if !r ps4html \
57 .  if r P .pn 0\n[P]
58 .if !r cR \{\
59 .  ie n .nr cR 1
60 .  el   .nr cR 0
61 .\}
63 .nr need_eo_h 0
65 .if !r LL \{\
66 .  ie n .nr LL 78n
67 .  el   .nr LL 6.5i
68 .\}
69 .if !r LT \
70 .  nr LT \n[LL]
72 .nr FT -.5i
74 .\" Default heading font
75 .ds HF B
77 .nr an-first 1
79 .nr an-html 0
80 .if '\*[.T]'html' .nr an-html 1
81 .if \n[an-html] .nr C 1
82 .if r ps4html .nr C 1
84 .\" we redefine .ne to avoid page breaks if cR is set; instead, the page
85 .\" length is increased to the necessary amount (this is needed for tables)
86 .\"
87 .\" similarly, we redefine .bp if cR is set, adjusting the page length to
88 .\" the current position so that no empty lines are inserted
89 .if \n[cR] \{\
90 .  de1 ne
91 .    ie \\n[.$] \
92 .      nr an-ne (v;\\$*)
93 .    el \
94 .      nr an-ne 1v
95 .    if (\\n[an-ne] >= \\n[.t]) \
96 .      pl +(\\n[an-ne]u - \\n[.t]u + 1v)
97 .  .
99 .  rn bp an-bp
100 .  de1 bp
101 .    br
102 .    pl \\n[nl]u
103 .    an-bp \\$*
104 .  .
107 .de set-an-margin
108 .  nr an-margin \\n[IN]
111 .\" .TH title section extra1 extra2 extra3
112 .de1 TH
113 .  if \\n[an-html] \{\
114 .    DEVTAG-TL
115 \\$1
116 .    DEVTAG-EO-TL
117 .  \}
119 .  de an-init \" We have to do it like this to get multiple man pages right.
120 .    ds an-title "\\$1
121 .    ds an-section "\\$2
122 .    ds an-extra1 "\\$3
123 .    ie (\\n[.$] > 3) .ds an-extra2 "\\$4
124 .    el               .ds an-extra2 \"Sun Release 4.0
125 .    ie (\\n[.$] > 4) .ds an-extra3 "\\$5
126 .    el               .ds an-extra3 \"System Programmer's Manual
127 .    ds an-init
128 \\..
130 .  DT
132 .  nr PS    10z \" default point size
133 .  nr PS-SS 10z
134 .  nr PS-SH 10.95z
135 .  nr VS    12p
137 .  \" use sizes similar to LaTeX
138 .  if t \{\
139 .    ie (\\n[S] == 11) \{\
140 .      nr PS    10.95z
141 .      nr PS-SS 10.95z
142 .      nr PS-SH 12z
143 .      nr VS    13.6p
144 .    \}
145 .    el \{\
146 .      if (\\n[S] == 12) \{\
147 .        nr PS    12z
148 .        nr PS-SS 12z
149 .        nr PS-SH 14.4z
150 .        nr VS    14.5p
151 .      \}
152 .    \}
153 .  \}
155 .  ps \\n[PS]u
156 .  vs \\n[VS]u
157 .  ll \\n[LL]u
159 .\" We must select an integer indentation value for nroff;
160 .\" see comment in an-do-tag.
161 .  if !r IN \{\
162 .    ie t .nr IN 7.2n
163 .    el   .nr IN 7n
164 .  \}
165 .  PD
166 .  if !r SN \
167 .    nr SN 3n \" the indentation of sub-sub-headings relative to sub-headings
168 .  nr an-level 1
169 .  set-an-margin
170 .  nr an-prevailing-indent \\n[IN]
171 .  nr an-tag-sep 1n
173 .  nr an-no-space-flag 0
174 .  nr an-break-flag 0
175 .  nr an-div? 0
177 .  ie \\n[cR] \
178 .    an-header
179 .  el \{\
180 .    wh 0 an-header
181 .    wh -1i an-footer
182 .    wh \\n[FT]u an-p-footer
184 .    if (\\n[nl] > 0) \{\
185 .      ie \\n[C] .bp (\\n[%] + 1)
186 .      el        .bp 1
187 .    \}
188 .  \}
191 .\" BSD compatibility macros: .AT and .UC
193 .de1 AT
194 .  ds an-extra2 "7th Edition
195 .  if "\\$1"3" .ds an-extra2 "7th Edition
196 .  if "\\$1"4" .ds an-extra2 "System III
197 .  if "\\$1"5" \{\
198 .    ie "\\$2"" .ds an-extra2 "System V
199 .    el .ds an-extra2 "System V Release \\$2
200 .  \}
203 .de1 UC
204 .  ds an-extra2 "3rd Berkeley Distribution
205 .  if "\\$1"3" .ds an-extra2 "3rd Berkeley Distribution
206 .  if "\\$1"4" .ds an-extra2 "4th Berkeley Distribution
207 .  if "\\$1"5" .ds an-extra2 "4.2 Berkeley Distribution
208 .  if "\\$1"6" .ds an-extra2 "4.3 Berkeley Distribution
209 .  if "\\$1"7" .ds an-extra2 "4.4 Berkeley Distribution
212 .de1 DT
213 .  ta T .5i \" This sets tabs every .5 inches
216 .de1 PD
217 .  ie \\n[.$] .nr PD (v;\\$1)
218 .  el         .nr PD (.4v >? \n[.V])
221 .\" Redefine these to customize the header & footer
223 .de1 PT
224 .  tl '\\*[an-title](\\*[an-section])'\\*[an-extra3]'\\*[an-title](\\*[an-section])'
227 .de1 BT
228 .  if r ps4html \
229 .    return
230 .  ie \\n[D] \{\
231 .    if o .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
232 .    if e .tl '\\*[an-page-string]'\\*[an-extra1]'\\*[an-extra2]'
233 .  \}
234 .  el \
235 .    tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
238 .de1 an-header
239 .  an-init
240 .  if \\n[cR] \{\
241 .    ie \\n[an-first] \
242 .      nr an-first 0
243 .    el \
244 .      sp .5i
245 .  \}
246 .  ev 1
247 .  ps \\n[PS]u
248 .  vs \\n[VS]u
249 .  lt \\n[LT]u
250 .  ie \\n[an-html] \
251 .    tl ''''
252 .  el \{\
253 .    if !\\n[cR] \
254 .      sp .5i
255 .    PT
256 .    ie !\\n[cR] \
257 .      sp |1i
258 .    el \
259 .      sp .5i
260 .  \}
261 .  ev
262 .  ns
265 .de1 an-footer
266 '  bp
269 .af an-page-letter a
271 .de1 an-p-footer
272 .  ev 1
273 .  ps \\n[PS]u
274 .  vs \\n[VS]u
275 .  lt \\n[LT]u
276 .  ie \\n[an-html] \{\
277 .    ds an-page-string
278 .    ds an-extra1
279 .    ds an-extra2
280 .  \}
281 .  el \{\
282 .    ie r X \{\
283 .      if (\\n[%] > \\n[X]) \{\
284 .        nr an-page-letter (\\n[%] - \\n[X])
285 .        ds an-page-string \\n[X]\\n[an-page-letter]
286 .      \}
287 .    \}
288 .    el \{\
289 .      ie \\n[cR] \
290 .        ds an-page-string "\\*[an-title](\\*[an-section])
291 .      el \
292 .        ds an-page-string \\n[%]
293 .    \}
294 .  \}
295 .  BT
296 .  ev
299 .de1 an-end
300 .  nr % 1
301 .  pl +4v
302 .  fl
303 .  sp 3
304 .  an-p-footer
305 .  pl \\n[nl]u
308 .if \n[cR] .em an-end
310 .de1 SH
311 .  sp \\n[PD]u
312 .  nr an-level 1
313 .  set-an-margin
314 .  nr an-prevailing-indent \\n[IN]
315 .  fi
316 .  in \\n[an-margin]u
317 .  ti 0
318 .  nr need_eo_h 1
319 .  DEVTAG-NH \\n[an-level]
320 .  it 1 an-trap
321 .  nr an-no-space-flag 1
322 .  nr an-break-flag 1
323 .  ps \\n[PS-SH]u
324 .  ft \\*[HF]
325 .  ne (2v + 1u)
326 .  if \\n[.$] \&\\$*
329 .de1 SS
330 .  sp \\n[PD]u
331 .  nr an-level 1
332 .  set-an-margin
333 .  nr an-prevailing-indent \\n[IN]
334 .  fi
335 .  in \\n[IN]u
336 .  ti \\n[SN]u
337 .  it 1 an-trap
338 .  nr an-no-space-flag 1
339 .  nr an-break-flag 1
340 .  ps \\n[PS-SS]u
341 .  ft \\*[HF]
342 .  ne (2v + 1u)
343 .  if \\n[.$] \&\\$*
346 .de1 B
347 .  it 1 an-trap
348 .  ft B
349 .  if \\n[.$] \&\\$*
352 .de1 I
353 .  it 1 an-trap
354 .  ft I
355 .  if \\n[.$] \,\\$*\/
358 .de1 SM
359 .  it 1 an-trap
360 .  ps -1
361 .  if \\n[.$] \&\\$*
364 .de1 SB
365 .  it 1 an-trap
366 .  ps -1
367 .  ft B
368 .  if \\n[.$] \&\\$*
371 .de1 TP
372 .  sp \\n[PD]u
373 .  if \\n[.$] .nr an-prevailing-indent (n;\\$1)
374 .  it 1 an-trap
375 .  in 0
376 .  ll -\\n[an-margin]u
377 .  if !\\n[an-div?] .di an-div
378 .  nr an-div? 1
381 .de1 an-trap
382 .  if \\n[need_eo_h]>0 .DEVTAG-EO-H
383 .  nr need_eo_h 0
384 .  ft R
385 .  ps \\n[PS]u
386 .  vs \\n[VS]u
387 .  if \\n[an-break-flag] \{\
388 .    br
389 .    nr an-break-flag 0
390 .  \}
391 .  if \\n[an-no-space-flag] \{\
392 .    ns
393 .    nr an-no-space-flag 0
394 .  \}
395 .  if \\n[an-div?] .an-do-tag
398 .de an-do-tag
399 .  br
400 .  di
401 .  nr an-div? 0
402 .  ll
403 .  ie (\\n[dl] + \\n[an-tag-sep] > \\n[an-prevailing-indent]) \{\
404 .    in \\n[an-margin]u
405 .    ne (2v + 1u)
406 .    an-div
407 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
408 .  \}
409 .  el \{\
410 .    \" In nroff mode, if the indentation value is not an integer multiple
411 .    \" of the character cell, it is possible that the following combination
412 .    \" of .in and .ti yields a different result as the .in request in
413 .    \" the .ie part above.
414 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
415 .    ti -\\n[an-prevailing-indent]u
416 .    chop an-div
417 .    ne (1v + 1u)
418 .    DEVTAG-COL 1
419 \\*[an-div]\\h'|\\n[an-prevailing-indent]u'\c
420 .    DEVTAG-COL-NEXT 2
421 .  \}
424 .de1 LP
425 .  sp \\n[PD]u
426 .  ps \\n[PS]u
427 .  vs \\n[VS]u
428 .  ft R
429 .  in \\n[an-margin]u
430 .  nr an-prevailing-indent \\n[IN]
433 .als PP LP
434 .als P LP
436 .de1 IP
437 .  ie !\\n[.$] \{\
438 .    ps \\n[PS]u
439 .    vs \\n[VS]u
440 .    ft R
441 .    sp \\n[PD]u
442 .    ne (1v + 1u)
443 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
444 .  \}
445 .  el \{\
446 .    ie (\\n[.$] - 1) .TP "\\$2"
447 .    el               .TP
448 \&\\$1
449 .  \}
452 .de1 HP
453 .  ps \\n[PS]u
454 .  vs \\n[VS]u
455 .  ft R
456 .  sp \\n[PD]u
457 .  ne (1v + 1u)
458 .  if \\n[.$] .nr an-prevailing-indent (n;\\$1)
459 .  in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
460 .  ti \\n[an-margin]u
463 .ds an-empty \" this is referenced to avoid looping on eg .RB ( \\ )
465 .de1 RI
466 .  if \\n[.$] \{\
467 .    ds an-result \&\f[R]\\$1
468 .    shift
469 .    while (\\n[.$] >= 2) \{\
470 .      as an-result \,\f[I]\\$1\f[R]\/\\$2\\*[an-empty]
471 .      shift 2
472 .    \}
473 .    if \\n[.$] .as an-result \,\f[I]\\$1
474 \\*[an-result]
475 .    ft R
476 .  \}
479 .de1 IR
480 .  if \\n[.$] \{\
481 .    ds an-result \&\f[I]\\$1\f[R]
482 .    shift
483 .    while (\\n[.$] >= 2) \{\
484 .      as an-result \/\\$1\f[I]\,\\$2\f[R]
485 .      shift 2
486 .    \}
487 .    if \\n[.$] .as an-result \/\\$1
488 \\*[an-result]
489 .    ft R
490 .  \}
493 .de1 IB
494 .  if \\n[.$] \{\
495 .    ds an-result \&\f[I]\\$1
496 .    shift
497 .    while (\\n[.$] >= 2) \{\
498 .      as an-result \/\f[B]\\$1\f[I]\,\\$2\\*[an-empty]
499 .      shift 2
500 .    \}
501 .    if \\n[.$] .as an-result \/\f[B]\\$1
502 \\*[an-result]
503 .    ft R
504 .  \}
507 .de1 BI
508 .  if \\n[.$] \{\
509 .    ds an-result \&\f[B]\\$1
510 .    shift
511 .    while (\\n[.$] >= 2) \{\
512 .      as an-result \,\f[I]\\$1\f[B]\/\\$2\\*[an-empty]
513 .      shift 2
514 .    \}
515 .    if \\n[.$] .as an-result \,\f[I]\\$1
516 \\*[an-result]
517 .    ft R
518 .  \}
521 .de1 RB
522 .  ds an-result \&
523 .  while (\\n[.$] >= 2) \{\
524 .    as an-result \f[R]\\$1\f[B]\\$2\\*[an-empty]
525 .    shift 2
526 .  \}
527 .  if \\n[.$] .as an-result \f[R]\\$1
528 \\*[an-result]
529 .  ft R
532 .de1 BR
533 .  ds an-result \&
534 .  while (\\n[.$] >= 2) \{\
535 .    as an-result \f[B]\\$1\f[R]\\$2\\*[an-empty]
536 .    shift 2
537 .  \}
538 .  if \\n[.$] .as an-result \f[B]\\$1
539 \\*[an-result]
540 .  ft R
543 .de1 RS
544 .  nr an-saved-margin\\n[an-level] \\n[an-margin]
545 .  nr an-saved-prevailing-indent\\n[an-level] \\n[an-prevailing-indent]
546 .  ie \\n[.$] .nr an-margin +(n;\\$1)
547 .  el         .nr an-margin +\\n[an-prevailing-indent]
548 .  in \\n[an-margin]u
549 .  nr an-prevailing-indent \\n[IN]
550 .  nr an-level +1
553 .de1 RE
554 .  ie \\n[.$] .nr an-level ((;\\$1) <? \\n[an-level])
555 .  el         .nr an-level -1
556 .  nr an-level (1 >? \\n[an-level])
557 .  nr an-margin \\n[an-saved-margin\\n[an-level]]
558 .  nr an-prevailing-indent \\n[an-saved-prevailing-indent\\n[an-level]]
559 .  in \\n[an-margin]u
562 .\" table support
564 .de1 TS
565 .  sp \\n[PD]u
566 .  HTML-IMAGE
569 .de1 T&
572 .de1 TE
573 .  HTML-IMAGE-END
576 .\" dummy equation delimiters
577 .de1 EQ
578 .  HTML-IMAGE
580 .de1 EN
581 .  HTML-IMAGE-END
584 .de1 R
586 .  ie \\n[.$] \{\
587 .    tm `R' is a string (producing the registered sign), not a macro.
588 .    nop \\$*
589 .  \}
590 .  el \{\
591 .    ie c\[rg] \
592 .      nop \[rg]\c
593 .    el \
594 .      nop (Reg.)\c
595 .  \}
598 .\" these strings must work in compatibility mode also
600 .ds S \s'\\n(PSu'
601 .ie c\[tm] .ds Tm \(tm
602 .el        .ds Tm (TM)
603 .ds lq \(lq
604 .ds rq \(rq
606 .if !\n[an-html] \{\
607 .  if !rHY \{\
608 .    ie \n[cR] \
609 .      nr HY 12
610 .    el \
611 .      nr HY 14
612 .  \}
613 .  hy \n[HY]
616 .\" Load local modifications.
617 .mso man.local
619 .cp \n[_C]
621 .\" end of an-old.tmac