Update to groffer 0.9.7.
[s-roff.git] / tmac / an-old.tmac
blob6b75be2005888eecdda177c7ffe45c6002405d17
1 .\" an-old.tmac
2 .\"
3 .\" Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003
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 .\"
37 .if !\n(.g .ab These man macros work only with groff.
39 .do if d RI .nx
41 .nr _C \n(.C
42 .cp 0
44 .if (\n[.x]\n[.y] < 118) \
45 .  ab You need GNU troff version 1.18 or higher to run this version of man!
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 .\}
61 .if !r LL \{\
62 .  ie n .nr LL 78n
63 .  el   .nr LL 6.5i
64 .\}
65 .if !r LT \
66 .  nr LT \n[LL]
68 .nr FT -.5i
70 .\" Default heading font
71 .ds HF B
73 .nr an-first 1
75 .nr an-html 0
76 .if '\*[.T]'html' .nr an-html 1
77 .if \n[an-html] .nr C 1
78 .if r ps4html .nr C 1
80 .\" we redefine .ne to avoid page breaks if cR is set; instead, the page
81 .\" length is increased to the necessary amount (this is needed for tables)
82 .\"
83 .\" similarly, we redefine .bp if cR is set, adjusting the page length to
84 .\" the current position so that no empty lines are inserted
85 .if \n[cR] \{\
86 .  de1 ne
87 .    ie \\n[.$] \
88 .      nr an-ne \\$*
89 .    el \
90 .      nr an-ne 1v
91 .    if (\\n[an-ne] >= \\n[.t]) \
92 .      pl +(\\n[an-ne]u - \\n[.t]u + 1v)
93 .  .
95 .  rn bp an-bp
96 .  de1 bp
97 .    br
98 .    pl \\n[nl]u
99 .    an-bp \\$*
100 .  .
103 .de set-an-margin
104 .  nr an-margin \\n[IN]
107 .\" .TH title section extra1 extra2 extra3
108 .de1 TH
109 .  if \\n[an-html] \{\
110 .    HTML-TAG-NS ".tl"
111 \\$1
112 .  \}
114 .  de an-init \" We have to do it like this to get multiple man pages right.
115 .    ds an-title "\\$1
116 .    ds an-section "\\$2
117 .    ds an-extra1 "\\$3
118 .    ie (\\n[.$] > 3) .ds an-extra2 "\\$4
119 .    el               .ds an-extra2 \"Sun Release 4.0
120 .    ie (\\n[.$] > 4) .ds an-extra3 "\\$5
121 .    el               .ds an-extra3 \"System Programmer's Manual
122 .    ds an-init
123 \\..
125 .  DT
127 .  nr PS    10z \" default point size
128 .  nr PS-SS 10z
129 .  nr PS-SH 10.95z
130 .  nr VS    12p
132 .  \" use sizes similar to LaTeX
133 .  if t \{\
134 .    ie (\\n[S] == 11) \{\
135 .      nr PS    10.95z
136 .      nr PS-SS 10.95z
137 .      nr PS-SH 12z
138 .      nr VS    13.6p
139 .    \}
140 .    el \{\
141 .      if (\\n[S] == 12) \{\
142 .        nr PS    12z
143 .        nr PS-SS 12z
144 .        nr PS-SH 14.4z
145 .        nr VS    14.5p
146 .      \}
147 .    \}
148 .  \}
150 .  ps \\n[PS]u
151 .  vs \\n[VS]u
152 .  ll \\n[LL]u
154 .\" We must select an integer indentation value for nroff;
155 .\" see comment in an-do-tag.
156 .  if !r IN \{\
157 .    ie t .nr IN 7.2n
158 .    el   .nr IN 7n
159 .  \}
160 .  PD
161 .  if !r SN \
162 .    nr SN 3n \" the indentation of sub-sub-headings relative to sub-headings
163 .  nr an-level 1
164 .  set-an-margin
165 .  nr an-prevailing-indent \\n[IN]
166 .  nr an-tag-sep 1n
168 .  nr an-no-space-flag 0
169 .  nr an-break-flag 0
170 .  nr an-div? 0
172 .  ie \\n[cR] \
173 .    an-header
174 .  el \{\
175 .    wh 0 an-header
176 .    wh -1i an-footer
177 .    wh \\n[FT]u an-p-footer
179 .    if (\\n[nl] > 0) \{\
180 .      ie \\n[C] .bp (\\n[%] + 1)
181 .      el        .bp 1
182 .    \}
183 .  \}
186 .\" BSD compatibility macros: .AT and .UC
188 .de1 AT
189 .  ds an-extra2 "7th Edition
190 .  if "\\$1"3" .ds an-extra2 "7th Edition
191 .  if "\\$1"4" .ds an-extra2 "System III
192 .  if "\\$1"5" \{\
193 .    ie "\\$2"" .ds an-extra2 "System V
194 .    el .ds an-extra2 "System V Release \\$2
195 .  \}
198 .de1 UC
199 .  ds an-extra2 "3rd Berkeley Distribution
200 .  if "\\$1"3" .ds an-extra2 "3rd Berkeley Distribution
201 .  if "\\$1"4" .ds an-extra2 "4th Berkeley Distribution
202 .  if "\\$1"5" .ds an-extra2 "4.2 Berkeley Distribution
203 .  if "\\$1"6" .ds an-extra2 "4.3 Berkeley Distribution
204 .  if "\\$1"7" .ds an-extra2 "4.4 Berkeley Distribution
207 .de1 DT
208 .  ta T .5i \" This sets tabs every .5 inches
211 .de1 PD
212 .  ie \\n[.$] .nr PD (v;\\$1)
213 .  el         .nr PD (.4v >? \n[.V])
216 .\" Redefine these to customize the header & footer
218 .de1 PT
219 .  tl '\\*[an-title](\\*[an-section])'\\*[an-extra3]'\\*[an-title](\\*[an-section])'
222 .de1 BT
223 .  if r ps4html \
224 .    return
225 .  ie \\n[D] \{\
226 .    if o .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
227 .    if e .tl '\\*[an-page-string]'\\*[an-extra1]'\\*[an-extra2]'
228 .  \}
229 .  el \
230 .    tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
233 .de1 an-header
234 .  an-init
235 .  if \\n[cR] \{\
236 .    ie \\n[an-first] \
237 .      nr an-first 0
238 .    el \
239 .      sp .5i
240 .  \}
241 .  ev 1
242 .  ps \\n[PS]u
243 .  vs \\n[VS]u
244 .  lt \\n[LT]u
245 .  ie \\n[an-html] \
246 .    tl ''''
247 .  el \{\
248 .    if !\\n[cR] \
249 .      sp .5i
250 .    PT
251 .    ie !\\n[cR] \
252 .      sp |1i
253 .    el \
254 .      sp .5i
255 .  \}
256 .  ev
257 .  ns
260 .de1 an-footer
261 '  bp
264 .af an-page-letter a
266 .de1 an-p-footer
267 .  ev 1
268 .  ps \\n[PS]u
269 .  vs \\n[VS]u
270 .  lt \\n[LT]u
271 .  ie \\n[an-html] \{\
272 .    ds an-page-string
273 .    ds an-extra1
274 .    ds an-extra2
275 .  \}
276 .  el \{\
277 .    ie r X \{\
278 .      if (\\n[%] > \\n[X]) \{\
279 .        nr an-page-letter (\\n[%] - \\n[X])
280 .        ds an-page-string \\n[X]\\n[an-page-letter]
281 .      \}
282 .    \}
283 .    el \{\
284 .      ie \\n[cR] \
285 .        ds an-page-string "\\*[an-title](\\*[an-section])
286 .      el \
287 .        ds an-page-string \\n[%]
288 .    \}
289 .  \}
290 .  BT
291 .  ev
294 .de1 an-end
295 .  nr % 1
296 .  pl +4v
297 .  fl
298 .  sp 3
299 .  an-p-footer
300 .  pl \\n[nl]u
303 .if \n[cR] .em an-end
305 .de1 SH
306 .  sp \\n[PD]u
307 .  nr an-level 1
308 .  set-an-margin
309 .  nr an-prevailing-indent \\n[IN]
310 .  fi
311 .  in \\n[an-margin]u
312 .  ti 0
313 .  HTML-TAG-NS ".NH \\n[an-level]"
314 .  it 1 an-trap
315 .  nr an-no-space-flag 1
316 .  nr an-break-flag 1
317 .  ps \\n[PS-SH]u
318 .  ft \\*[HF]
319 .  ne (2v + 1u)
320 .  if \\n[.$] \&\\$*
323 .de1 SS
324 .  sp \\n[PD]u
325 .  nr an-level 1
326 .  set-an-margin
327 .  nr an-prevailing-indent \\n[IN]
328 .  fi
329 .  in \\n[IN]u
330 .  ti \\n[SN]u
331 .  it 1 an-trap
332 .  nr an-no-space-flag 1
333 .  nr an-break-flag 1
334 .  ps \\n[PS-SS]u
335 .  ft \\*[HF]
336 .  ne (2v + 1u)
337 .  if \\n[.$] \&\\$*
340 .de1 B
341 .  it 1 an-trap
342 .  ft B
343 .  if \\n[.$] \&\\$*
346 .de1 I
347 .  it 1 an-trap
348 .  ft I
349 .  if \\n[.$] \,\\$*\/
352 .de1 SM
353 .  it 1 an-trap
354 .  ps -1
355 .  if \\n[.$] \&\\$*
358 .de1 SB
359 .  it 1 an-trap
360 .  ps -1
361 .  ft B
362 .  if \\n[.$] \&\\$*
365 .de1 TP
366 .  sp \\n[PD]u
367 .  if \\n[.$] .nr an-prevailing-indent (n;\\$1)
368 .  it 1 an-trap
369 .  in 0
370 .  ll -\\n[an-margin]u
371 .  if !\\n[an-div?] .di an-div
372 .  nr an-div? 1
375 .de1 an-trap
376 .  ft R
377 .  ps \\n[PS]u
378 .  vs \\n[VS]u
379 .  if \\n[an-break-flag] \{\
380 .    br
381 .    nr an-break-flag 0
382 .  \}
383 .  if \\n[an-no-space-flag] \{\
384 .    ns
385 .    nr an-no-space-flag 0
386 .  \}
387 .  if \\n[an-div?] .an-do-tag
390 .de an-do-tag
391 .  br
392 .  di
393 .  nr an-div? 0
394 .  ll
395 .  ie (\\n[dl] + \\n[an-tag-sep] > \\n[an-prevailing-indent]) \{\
396 .    in \\n[an-margin]u
397 .    ne (2v + 1u)
398 .    an-div
399 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
400 .  \}
401 .  el \{\
402 .    \" In nroff mode, if the indentation value is not an integer multiple
403 .    \" of the character cell, it is possible that the following combination
404 .    \" of .in and .ti yields a different result as the .in request in
405 .    \" the .ie part above.
406 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
407 .    ti -\\n[an-prevailing-indent]u
408 .    chop an-div
409 .    ne (1v + 1u)
410 .    HTML-TAG-NS ".col 1"
411 \\*[an-div]\\h'|\\n[an-prevailing-indent]u'\c
412 .    HTML-TAG-NS ".col 2"
413 .  \}
416 .de1 LP
417 .  sp \\n[PD]u
418 .  ps \\n[PS]u
419 .  vs \\n[VS]u
420 .  ft R
421 .  in \\n[an-margin]u
422 .  nr an-prevailing-indent \\n[IN]
425 .als PP LP
426 .als P LP
428 .de1 IP
429 .  ie !\\n[.$] \{\
430 .    ps \\n[PS]u
431 .    vs \\n[VS]u
432 .    ft R
433 .    sp \\n[PD]u
434 .    ne (1v + 1u)
435 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
436 .  \}
437 .  el \{\
438 .    ie (\\n[.$] - 1) .TP "\\$2"
439 .    el               .TP
440 \&\\$1
441 .  \}
444 .de1 HP
445 .  ps \\n[PS]u
446 .  vs \\n[VS]u
447 .  ft R
448 .  sp \\n[PD]u
449 .  ne (1v + 1u)
450 .  if \\n[.$] .nr an-prevailing-indent (n;\\$1)
451 .  in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
452 .  ti \\n[an-margin]u
455 .ds an-empty \" this is referenced to avoid looping on eg .RB ( \\ )
457 .de1 RI
458 .  if \\n[.$] \{\
459 .    ds an-result \&\\$1
460 .    shift
461 .    while (\\n[.$] >= 2) \{\
462 .      as an-result \,\f[I]\\$1\f[R]\/\\$2\\*[an-empty]
463 .      shift 2
464 .    \}
465 .    if \\n[.$] .as an-result \,\f[I]\\$1\f[R]
466 \\*[an-result]
467 .  \}
470 .de1 IR
471 .  if \\n[.$] \{\
472 .    ds an-result \&\f[I]\\$1\f[R]
473 .    shift
474 .    while (\\n[.$] >= 2) \{\
475 .      as an-result \/\\$1\f[I]\,\\$2\f[R]
476 .      shift 2
477 .    \}
478 .    if \\n[.$] .as an-result \/\\$1
479 \\*[an-result]
480 .  \}
483 .de1 IB
484 .  if \\n[.$] \{\
485 .    ds an-result \&\f[I]\\$1
486 .    shift
487 .    while (\\n[.$] >= 2) \{\
488 .      as an-result \/\f[B]\\$1\f[I]\,\\$2\\*[an-empty]
489 .      shift 2
490 .    \}
491 .    if \\n[.$] .as an-result \/\f[B]\\$1
492 \\*[an-result]
493 .    ft R
494 .  \}
497 .de1 BI
498 .  if \\n[.$] \{\
499 .    ds an-result \&\f[B]\\$1
500 .    shift
501 .    while (\\n[.$] >= 2) \{\
502 .      as an-result \,\f[I]\\$1\f[B]\/\\$2\\*[an-empty]
503 .      shift 2
504 .    \}
505 .    if \\n[.$] .as an-result \,\f[I]\\$1
506 \\*[an-result]
507 .    ft R
508 .  \}
511 .de1 RB
512 .  ds an-result \&
513 .  while (\\n[.$] >= 2) \{\
514 .    as an-result \f[R]\\$1\f[B]\\$2\\*[an-empty]
515 .    shift 2
516 .  \}
517 .  if \\n[.$] .as an-result \f[R]\\$1
518 \\*[an-result]
519 .  ft R
522 .de1 BR
523 .  ds an-result \&
524 .  while (\\n[.$] >= 2) \{\
525 .    as an-result \f[B]\\$1\f[R]\\$2\\*[an-empty]
526 .    shift 2
527 .  \}
528 .  if \\n[.$] .as an-result \f[B]\\$1
529 \\*[an-result]
530 .  ft R
533 .de1 RS
534 .  nr an-saved-margin\\n[an-level] \\n[an-margin]
535 .  nr an-saved-prevailing-indent\\n[an-level] \\n[an-prevailing-indent]
536 .  ie \\n[.$] .nr an-margin +(n;\\$1)
537 .  el         .nr an-margin +\\n[an-prevailing-indent]
538 .  in \\n[an-margin]u
539 .  nr an-prevailing-indent \\n[IN]
540 .  nr an-level +1
543 .de1 RE
544 .  ie \\n[.$] .nr an-level ((;\\$1) <? \\n[an-level])
545 .  el         .nr an-level -1
546 .  nr an-level (1 >? \\n[an-level])
547 .  nr an-margin \\n[an-saved-margin\\n[an-level]]
548 .  nr an-prevailing-indent \\n[an-saved-prevailing-indent\\n[an-level]]
549 .  in \\n[an-margin]u
552 .\" table support
554 .de1 TS
555 .  sp \\n[PD]u
556 .  HTML-IMAGE
559 .de1 T&
562 .de1 TE
563 .  HTML-IMAGE-END
566 .\" dummy equation delimiters
567 .de1 EQ
568 .  HTML-IMAGE
570 .de1 EN
571 .  HTML-IMAGE-END
574 .de1 R
576 .  ie \\n[.$] \{\
577 .    tm `R' is a string (producing the registered sign), not a macro.
578 .    nop \\$*
579 .  \}
580 .  el \{\
581 .    ie c\[rg] \
582 .      nop \[rg]\c
583 .    el \
584 .      nop (Reg.)\c
585 .  \}
588 .\" these strings must work in compatibility mode also
590 .ds S \s'\\n(PSu'
591 .ie c\[tm] .ds Tm \(tm
592 .el        .ds Tm (TM)
593 .ds lq \(lq
594 .ds rq \(rq
596 .if !\n[an-html] \{\
597 .  if !rHY \{\
598 .    ie \n[cR] \
599 .      nr HY 12
600 .    el \
601 .      nr HY 14
602 .  \}
603 .  hy \n[HY]
606 .\" Load local modifications.
607 .mso man.local
609 .cp \n[_C]
611 .\" end of an-old.tmac