* src/preproc/html/pre-html.cpp (usage): Don't describe options but
[s-roff.git] / tmac / an-old.tmac
blob4278303cf03841f795e22adc2d6feb4c5e6aca41
1 .\" an-old.tmac
2 .\"
3 .\" Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005, 2007
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
64 .nr need_col2 0
66 .\" set up the line length...
67 .\" giving precedence to any prior assignment to the \n[LL] register.
68 .if !r LL \{\
70 .  \" but if that isn't predefined...
71 .  \" then try to respect any prior `.ll' request.
72 .  nr LL \n[.l]
74 .  \" For troff, this is sufficient to give us a default line length of
75 .  \" 6.5i, but for nroff, we prefer a default of 78n to nroff's default
76 .  \" 65n.  This has the unfortunate side effect that we will override a
77 .  \" user's `.ll 65n' request, with our preferred 78n default; we can't
78 .  \" possibly know that the 65n came from a `.ll' request, and MUST
79 .  \" assume that it was set by nroff, as its built-in default!  If the
80 .  \" user wants to force this setting, then he MUST use the `-rLL=65n'
81 .  \" option, or an equivalent `.nr LL 65n' request.
82 .  if n \
83 .    if (\n[LL] = 65n) \
84 .      nr LL 78n
85 .\}
87 .if !r LT \
88 .  nr LT \n[LL]
90 .nr FT -.5i
92 .\" Default heading font
93 .ds HF B\"
95 .nr an-first 1
97 .nr an-html 0
98 .if '\*[.T]'html' .nr an-html 1
99 .if \n[an-html] .nr C 1
100 .if r ps4html .nr C 1
102 .\" we redefine .ne to avoid page breaks if cR is set; instead, the page
103 .\" length is increased to the necessary amount (this is needed for tables)
105 .\" similarly, we redefine .bp if cR is set, adjusting the page length to
106 .\" the current position so that no empty lines are inserted
107 .if \n[cR] \{\
108 .  de1 ne
109 .    ie \\n[.$] \
110 .      nr an-ne (v;\\$*)
111 .    el \
112 .      nr an-ne 1v
113 .    if (\\n[an-ne] >= \\n[.t]) \
114 .      pl +(\\n[an-ne]u - \\n[.t]u + 1v)
115 .  .
117 .  rn bp an-bp
118 .  de1 bp
119 .    br
120 .    pl \\n[nl]u
121 .    an-bp \\$*
122 .  .
125 .de set-an-margin
126 .  nr an-margin \\n[IN]
129 .\" .TH title section extra1 extra2 extra3
130 .de1 TH
131 .  if \\n[an-html] \{\
132 .    DEVTAG-TL
133 .    nop \\$1
134 .    DEVTAG-EO-TL
135 .  \}
137 .  de an-init \" We have to do it like this to get multiple man pages right.
138 .    ds an-title "\\$1\"
139 .    ds an-section "\\$2\"
140 .    ds an-extra1 "\\$3\"
141 .    ie (\\n[.$] > 3) .ds an-extra2 "\\$4\"
142 .    el               .ds an-extra2 \"Sun Release 4.0
143 .    ie (\\n[.$] > 4) .ds an-extra3 "\\$5\"
144 .    el               .ds an-extra3 \"System Programmer's Manual
145 .    ds an-init
146 \\..
148 .  DT
150 .  nr PS    10z \" default point size
151 .  nr PS-SS 10z
152 .  nr PS-SH 10.95z
153 .  nr VS    12p
155 .  \" use sizes similar to LaTeX
156 .  if t \{\
157 .    ie (\\n[S] == 11) \{\
158 .      nr PS    10.95z
159 .      nr PS-SS 10.95z
160 .      nr PS-SH 12z
161 .      nr VS    13.6p
162 .    \}
163 .    el \{\
164 .      if (\\n[S] == 12) \{\
165 .        nr PS    12z
166 .        nr PS-SS 12z
167 .        nr PS-SH 14.4z
168 .        nr VS    14.5p
169 .      \}
170 .    \}
171 .  \}
173 .  ps \\n[PS]u
174 .  vs \\n[VS]u
175 .  ll \\n[LL]u
177 .\" We must select an integer indentation value for nroff;
178 .\" see comment in an-do-tag.
179 .  if !r IN \{\
180 .    ie t .nr IN 7.2n
181 .    el   .nr IN 7n
182 .  \}
183 .  PD
184 .  if !r SN \
185 .    nr SN 3n \" the indentation of sub-sub-headings relative to sub-headings
186 .  nr an-level 1
187 .  set-an-margin
188 .  nr an-prevailing-indent \\n[IN]
189 .  nr an-tag-sep 1n
191 .  nr an-no-space-flag 0
192 .  nr an-break-flag 0
193 .  nr an-div? 0
195 .  ie \\n[cR] \
196 .    an-header
197 .  el \{\
198 .    wh 0 an-header
199 .    wh -1i an-footer
200 .    wh \\n[FT]u an-p-footer
202 .    if (\\n[nl] > 0) \{\
203 .      ie \\n[C] .bp (\\n[%] + 1)
204 .      el        .bp 1
205 .    \}
206 .  \}
209 .\" BSD compatibility macros: .AT and .UC
211 .de1 AT
212 .  ds an-extra2 "7th Edition\"
213 .  if "\\$1"3" .ds an-extra2 "7th Edition\"
214 .  if "\\$1"4" .ds an-extra2 "System III\"
215 .  if "\\$1"5" \{\
216 .    ie "\\$2"" .ds an-extra2 "System V\"
217 .    el .ds an-extra2 "System V Release \\$2\"
218 .  \}
221 .de1 UC
222 .  ds an-extra2 "3rd Berkeley Distribution\"
223 .  if "\\$1"3" .ds an-extra2 "3rd Berkeley Distribution\"
224 .  if "\\$1"4" .ds an-extra2 "4th Berkeley Distribution\"
225 .  if "\\$1"5" .ds an-extra2 "4.2 Berkeley Distribution\"
226 .  if "\\$1"6" .ds an-extra2 "4.3 Berkeley Distribution\"
227 .  if "\\$1"7" .ds an-extra2 "4.4 Berkeley Distribution\"
230 .de1 DT
231 .  ta T .5i \" This sets tabs every .5 inches
234 .de1 PD
235 .  ie \\n[.$] .nr PD (v;\\$1)
236 .  el         .nr PD (.4v >? \n[.V])
239 .\" Redefine these to customize the header & footer
241 .de1 PT
242 .  tl '\\*[an-title](\\*[an-section])'\\*[an-extra3]'\\*[an-title](\\*[an-section])'
245 .de1 BT
246 .  if r ps4html \
247 .    return
248 .  ie \\n[D] \{\
249 .    if o .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
250 .    if e .tl '\\*[an-page-string]'\\*[an-extra1]'\\*[an-extra2]'
251 .  \}
252 .  el \
253 .    tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
256 .de1 an-header
257 .  an-init
258 .  if \\n[cR] \{\
259 .    ie \\n[an-first] \
260 .      nr an-first 0
261 .    el \
262 .      sp .5i
263 .  \}
264 .  ev an-1
265 .  ps \\n[PS]u
266 .  vs \\n[VS]u
267 .  lt \\n[LT]u
268 .  ie \\n[an-html] \
269 .    tl ''''
270 .  el \{\
271 .    if !\\n[cR] \
272 .      sp .5i
273 .    PT
274 .    ie !\\n[cR] \
275 .      sp |1i
276 .    el \
277 .      sp .5i
278 .  \}
279 .  ev
280 .  ns
283 .de1 an-footer
284 '  bp
287 .af an-page-letter a
289 .de1 an-p-footer
290 .  ev an-1
291 .  ps \\n[PS]u
292 .  vs \\n[VS]u
293 .  lt \\n[LT]u
294 .  ie \\n[an-html] \{\
295 .    ds an-page-string
296 .    ds an-extra1
297 .    ds an-extra2
298 .  \}
299 .  el \{\
300 .    ie r X \{\
301 .      if (\\n[%] > \\n[X]) \{\
302 .        nr an-page-letter (\\n[%] - \\n[X])
303 .        ds an-page-string \\n[X]\\n[an-page-letter]\"
304 .      \}
305 .    \}
306 .    el \{\
307 .      ie \\n[cR] \
308 .        ds an-page-string "\\*[an-title](\\*[an-section])\"
309 .      el \
310 .        ds an-page-string \\n[%]\"
311 .    \}
312 .  \}
313 .  BT
314 .  ev
317 .de1 an-end
318 .  nr % 1
319 .  pl +4v
320 .  fl
321 .  sp 3
322 .  an-p-footer
323 .  pl \\n[nl]u
326 .if \n[cR] .em an-end
328 .de1 SH
329 .  sp \\n[PD]u
330 .  nr an-level 1
331 .  set-an-margin
332 .  nr an-prevailing-indent \\n[IN]
333 .  fi
334 .  in \\n[an-margin]u
335 .  ti 0
336 .  nr need_eo_h 1
337 .  DEVTAG-NH \\n[an-level]
338 .  it 1 an-trap
339 .  nr an-no-space-flag 1
340 .  nr an-break-flag 1
341 .  ps \\n[PS-SH]u
342 .  ft \\*[HF]
343 .  ne (2v + 1u)
344 .  if \\n[.$] \&\\$*
347 .de1 SS
348 .  sp \\n[PD]u
349 .  nr an-level 1
350 .  set-an-margin
351 .  nr an-prevailing-indent \\n[IN]
352 .  fi
353 .  in \\n[IN]u
354 .  ti \\n[SN]u
355 .  it 1 an-trap
356 .  nr an-no-space-flag 1
357 .  nr an-break-flag 1
358 .  ps \\n[PS-SS]u
359 .  ft \\*[HF]
360 .  ne (2v + 1u)
361 .  if \\n[.$] \&\\$*
364 .de1 B
365 .  it 1 an-trap
366 .  ft B
367 .  if \\n[.$] \&\\$*
370 .de1 I
371 .  it 1 an-trap
372 .  ft I
373 .  if \\n[.$] \,\\$*\/
376 .de1 SM
377 .  it 1 an-trap
378 .  ps -1
379 .  if \\n[.$] \&\\$*
382 .de1 SB
383 .  it 1 an-trap
384 .  ps -1
385 .  ft B
386 .  if \\n[.$] \&\\$*
389 .de1 TP
390 .  sp \\n[PD]u
391 .  if \\n[.$] .nr an-prevailing-indent (n;\\$1)
392 .  it 1 an-trap
393 .  in 0
394 .  ll -\\n[an-margin]u
395 .  if !\\n[an-div?] .di an-div
396 .  nr an-div? 1
399 .de1 an-trap
400 .  if \\n[need_eo_h]>0 .DEVTAG-EO-H
401 .  nr need_eo_h 0
402 .  if \\n[need_col2]>0 .DEVTAG-COL 2
403 .  nr need_col2 0
404 .  ft R
405 .  ps \\n[PS]u
406 .  vs \\n[VS]u
407 .  if \\n[an-break-flag] \{\
408 .    br
409 .    nr an-break-flag 0
410 .  \}
411 .  if \\n[an-no-space-flag] \{\
412 .    ns
413 .    nr an-no-space-flag 0
414 .  \}
415 .  if \\n[an-div?] .an-do-tag
418 .de an-do-tag
419 .  br
420 .  di
421 .  nr an-div? 0
422 .  ll
423 .  \" We must emit the diversion in a separate environment to
424 .  \" assure that a possible margin character is printed correctly.
425 .  ev an-2
426 .  evc 0
427 .  mc
428 .  nf
429 .  in \\n[an-margin]u
430 .  ie (\\n[dl] + \\n[an-tag-sep] > \\n[an-prevailing-indent]) \{\
431 .    ne (2v + 1u)
432 .    an-div
433 .    ev
434 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
435 .  \}
436 .  el \{\
437 .    \" In nroff mode, the indentation value should be an integer multiple
438 .    \" of the character cell, to avoid different results compared to the
439 .    \" the .ie part above.
440 .    ne (1v + 1u)
441 .    DEVTAG-COL 1
442 .    an-div
443 .    sp -1
444 .    ev
445 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
446 .    DEVTAG-COL-NEXT 2
447 .  \}
450 .de1 LP
451 .  sp \\n[PD]u
452 .  ps \\n[PS]u
453 .  vs \\n[VS]u
454 .  ft R
455 .  in \\n[an-margin]u
456 .  nr an-prevailing-indent \\n[IN]
457 .  ns
460 .als PP LP
461 .als P LP
463 .de1 IP
464 .  ie !\\n[.$] \{\
465 .    ps \\n[PS]u
466 .    vs \\n[VS]u
467 .    ft R
468 .    sp \\n[PD]u
469 .    ne (1v + 1u)
470 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
471 .    ns
472 .  \}
473 .  el \{\
474 .    ie (\\n[.$] - 1) .TP "\\$2"
475 .    el               .TP
476 \&\\$1
477 .  \}
480 .de1 HP
481 .  ps \\n[PS]u
482 .  vs \\n[VS]u
483 .  ft R
484 .  sp \\n[PD]u
485 .  ne (1v + 1u)
486 .  if \\n[.$] .nr an-prevailing-indent (n;\\$1)
487 .  in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
488 .  ti \\n[an-margin]u
489 .  DEVTAG-COL 1
490 .  nr need_col2 1
491 .  ns
494 .ds an-empty \" this is referenced to avoid looping on eg .RB ( \\ )
496 .de1 RI
497 .  if \\n[.$] \{\
498 .    ds an-result \&\f[R]\\$1\"
499 .    shift
500 .    while (\\n[.$] >= 2) \{\
501 .      as an-result \,\f[I]\\$1\f[R]\/\\$2\\*[an-empty]\"
502 .      shift 2
503 .    \}
504 .    if \\n[.$] .as an-result \,\f[I]\\$1\"
505 \\*[an-result]
506 .    ft R
507 .  \}
510 .de1 IR
511 .  if \\n[.$] \{\
512 .    ds an-result \&\f[I]\\$1\f[R]\"
513 .    shift
514 .    while (\\n[.$] >= 2) \{\
515 .      as an-result \/\\$1\f[I]\,\\$2\f[R]\"
516 .      shift 2
517 .    \}
518 .    if \\n[.$] .as an-result \/\\$1\"
519 \\*[an-result]
520 .    ft R
521 .  \}
524 .de1 IB
525 .  if \\n[.$] \{\
526 .    ds an-result \&\f[I]\\$1\"
527 .    shift
528 .    while (\\n[.$] >= 2) \{\
529 .      as an-result \/\f[B]\\$1\f[I]\,\\$2\\*[an-empty]\"
530 .      shift 2
531 .    \}
532 .    if \\n[.$] .as an-result \/\f[B]\\$1\"
533 \\*[an-result]
534 .    ft R
535 .  \}
538 .de1 BI
539 .  if \\n[.$] \{\
540 .    ds an-result \&\f[B]\\$1\"
541 .    shift
542 .    while (\\n[.$] >= 2) \{\
543 .      as an-result \,\f[I]\\$1\f[B]\/\\$2\\*[an-empty]\"
544 .      shift 2
545 .    \}
546 .    if \\n[.$] .as an-result \,\f[I]\\$1\"
547 \\*[an-result]
548 .    ft R
549 .  \}
552 .de1 RB
553 .  ds an-result \&\"
554 .  while (\\n[.$] >= 2) \{\
555 .    as an-result \f[R]\\$1\f[B]\\$2\\*[an-empty]\"
556 .    shift 2
557 .  \}
558 .  if \\n[.$] .as an-result \f[R]\\$1\"
559 \\*[an-result]
560 .  ft R
563 .de1 BR
564 .  ds an-result \&\"
565 .  while (\\n[.$] >= 2) \{\
566 .    as an-result \f[B]\\$1\f[R]\\$2\\*[an-empty]\"
567 .    shift 2
568 .  \}
569 .  if \\n[.$] .as an-result \f[B]\\$1\"
570 \\*[an-result]
571 .  ft R
574 .de1 RS
575 .  nr an-saved-margin\\n[an-level] \\n[an-margin]
576 .  nr an-saved-prevailing-indent\\n[an-level] \\n[an-prevailing-indent]
577 .  ie \\n[.$] .nr an-margin +(n;\\$1)
578 .  el         .nr an-margin +\\n[an-prevailing-indent]
579 .  in \\n[an-margin]u
580 .  nr an-prevailing-indent \\n[IN]
581 .  nr an-level +1
584 .de1 RE
585 .  ie \\n[.$] .nr an-level ((;\\$1) <? \\n[an-level])
586 .  el         .nr an-level -1
587 .  nr an-level (1 >? \\n[an-level])
588 .  nr an-margin \\n[an-saved-margin\\n[an-level]]
589 .  nr an-prevailing-indent \\n[an-saved-prevailing-indent\\n[an-level]]
590 .  in \\n[an-margin]u
593 .\" table support
595 .de1 TS
596 .  sp \\n[PD]u
597 .  HTML-IMAGE
600 .de1 T&
603 .de1 TE
604 .  HTML-IMAGE-END
607 .\" dummy equation delimiters
608 .de1 EQ
609 .  HTML-IMAGE
611 .de1 EN
612 .  HTML-IMAGE-END
615 .de1 R
617 .  ie \\n[.$] \{\
618 .    tm `R' is a string (producing the registered sign), not a macro.
619 .    nop \\$*
620 .  \}
621 .  el \{\
622 .    ie c\[rg] \
623 .      nop \[rg]\c
624 .    el \
625 .      nop (Reg.)\c
626 .  \}
629 .\" these strings must work in compatibility mode also
631 .ds S \s'\\n(PSu'\"
632 .ie c\[tm] .ds Tm \(tm\"
633 .el        .ds Tm (TM)\"
634 .ds lq \(lq\"
635 .ds rq \(rq\"
637 .if !\n[an-html] \{\
638 .  if !rHY \{\
639 .    ie \n[cR] \
640 .      nr HY 12
641 .    el \
642 .      nr HY 14
643 .  \}
644 .  hy \n[HY]
647 .\" Load man macro extensions.
648 .mso an-ext.tmac
650 .\" Load local modifications.
651 .mso man.local
653 .cp \n[_C]
655 .\" end of an-old.tmac