Adding a new keyword `papersize' to the DESC file format (similar
[s-roff.git] / tmac / an-old.tmac
blobfd133b3e2c020ffd6861fa734be5e11424ed917a
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 .\"
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]\n[.Y] < 1171) \
45 .  ab You need GNU troff version 1.17.1 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 .  ie n .nr LT 78n
67 .  el   .nr LT 6.5i
68 .\}
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
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 .\}
88 .de set-an-margin
89 .  nr an-margin \\n[IN]
92 .\" .TH title section extra1 extra2 extra3
93 .de1 TH
94 .  if \\n[an-html] \{\
95 .     HTML-TAG ".tl"
96 \\$1
97 .  \}
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 \\..
110 .  DT
112 .  nr PS    10z \" default point size
113 .  nr PS-SS 10z
114 .  nr PS-SH 10.95z
115 .  nr VS    12p
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 .  \}
135 .  ps \\n[PS]u
136 .  vs \\n[VS]u
137 .  ll \\n[LL]u
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
147 .  nr an-no-space-flag 0
148 .  nr an-break-flag 0
149 .  nr an-div? 0
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
158 .    if (\\n[nl] > 0) \{\
159 .      ie \\n[C] .bp (\\n[%] + 1)
160 .      el        .bp 1
161 .    \}
162 .  \}
165 .\" BSD compatibility macros: .AT and .UC
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 .  \}
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
186 .de1 DT
187 .  ta T .5i \" This sets tabs every .5 inches
190 .de1 PD
191 .  ie \\n[.$] .nr PD (v;\\$1)
192 .  el         .nr PD (.4v >? \n[.V])
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
216 .de1 an-footer
217 '  bp
220 .af an-page-letter a
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
255 .de1 an-end
256 .  nr % 1
257 .  pl +4v
258 .  fl
259 .  sp 3
260 .  an-p-footer
261 .  pl \\n[nl]u
264 .if \n[cR] .em an-end
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[.$] \&\\$*
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[.$] \&\\$*
301 .de1 B
302 .  it 1 an-trap
303 .  ft B
304 .  if \\n[.$] \&\\$*
307 .de1 I
308 .  it 1 an-trap
309 .  ft I
310 .  if \\n[.$] \,\\$*\/
313 .de1 SM
314 .  it 1 an-trap
315 .  ps -1
316 .  if \\n[.$] \&\\$*
319 .de1 SB
320 .  it 1 an-trap
321 .  ps -1
322 .  ft B
323 .  if \\n[.$] \&\\$*
326 .de1 TP
327 .  sp \\n[PD]u
328 .  if \\n[.$] .nr an-prevailing-indent (n;\\$1)
329 .  it 1 an-trap
330 .  if !\\n[an-div?] .di an-div
331 .  ie \\n[an-html] .in \\n[an-margin]u
332 .  el \{\
333 .    in 0
334 .    ll -\\n[an-margin]u
335 .  \}
336 .  nr an-div? 1
339 .de1 an-trap
340 .  ft R
341 .  ps \\n[PS]u
342 .  vs \\n[VS]u
343 .  if \\n[an-break-flag] \{\
344 .    br
345 .    nr an-break-flag 0
346 .  \}
347 .  if \\n[an-no-space-flag] \{\
348 .    ns
349 .    nr an-no-space-flag 0
350 .  \}
351 .  if \\n[an-div?] .an-do-tag
354 .de an-do-tag
355 .  nr an-div? 0
356 .  br
357 .  ll
358 .  di
359 .  ie (\\n[dl] + \\n[an-tag-sep] > \\n[an-prevailing-indent]) \{\
360 .    in \\n[an-margin]u
361 .    ne (2v + 1u)
362 .    an-div
363 .    br
364 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
365 .  \}
366 .  el \{\
367 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
368 .    ti -\\n[an-prevailing-indent]u
369 .    chop an-div
370 .    ne (1v + 1u)
371 \\*[an-div]\\h'|\\n[an-prevailing-indent]u'\c
372 .  \}
375 .de1 LP
376 .  br
377 .  sp \\n[PD]u
378 .  ps \\n[PS]u
379 .  vs \\n[VS]u
380 .  ft R
381 .  in \\n[an-margin]u
382 .  nr an-prevailing-indent \\n[IN]
385 .als PP LP
386 .als P LP
388 .de1 IP
389 .  ie !\\n[.$] \{\
390 .    ps \\n[PS]u
391 .    vs \\n[VS]u
392 .    ft R
393 .    sp \\n[PD]u
394 .    ne (1v + 1u)
395 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
396 .  \}
397 .  el \{\
398 .    ie (\\n[.$] - 1) .TP "\\$2"
399 .    el               .TP
400 \&\\$1
401 .  \}
404 .de1 HP
405 .  ps \\n[PS]u
406 .  vs \\n[VS]u
407 .  ft R
408 .  sp \\n[PD]u
409 .  ne (1v + 1u)
410 .  if \\n[.$] .nr an-prevailing-indent (n;\\$1)
411 .  in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
412 .  ti \\n[an-margin]u
415 .ds an-empty \" this is referenced to avoid looping on eg .RB ( \\ )
417 .de1 RI
418 .  if \\n[.$] \{\
419 .    ds an-result \&\\$1
420 .    shift
421 .    while (\\n[.$] >= 2) \{\
422 .      as an-result \,\f[I]\\$1\f[R]\/\\$2\\*[an-empty]
423 .      shift 2
424 .    \}
425 .    if \\n[.$] .as an-result \,\f[I]\\$1\f[R]
426 \\*[an-result]
427 .  \}
430 .de1 IR
431 .  if \\n[.$] \{\
432 .    ds an-result \&\f[I]\\$1\f[R]
433 .    shift
434 .    while (\\n[.$] >= 2) \{\
435 .      as an-result \/\\$1\f[I]\,\\$2\f[R]
436 .      shift 2
437 .    \}
438 .    if \\n[.$] .as an-result \/\\$1
439 \\*[an-result]
440 .  \}
443 .de1 IB
444 .  if \\n[.$] \{\
445 .    ds an-result \&\f[I]\\$1
446 .    shift
447 .    while (\\n[.$] >= 2) \{\
448 .      as an-result \/\f[B]\\$1\f[I]\,\\$2\\*[an-empty]
449 .      shift 2
450 .    \}
451 .    if \\n[.$] .as an-result \/\f[B]\\$1
452 \\*[an-result]
453 .    ft R
454 .  \}
457 .de1 BI
458 .  if \\n[.$] \{\
459 .    ds an-result \&\f[B]\\$1
460 .    shift
461 .    while (\\n[.$] >= 2) \{\
462 .      as an-result \,\f[I]\\$1\f[B]\/\\$2\\*[an-empty]
463 .      shift 2
464 .    \}
465 .    if \\n[.$] .as an-result \,\f[I]\\$1
466 \\*[an-result]
467 .    ft R
468 .  \}
471 .de1 RB
472 .  ds an-result \&
473 .  while (\\n[.$] >= 2) \{\
474 .    as an-result \f[R]\\$1\f[B]\\$2\\*[an-empty]
475 .    shift 2
476 .  \}
477 .  if \\n[.$] .as an-result \f[R]\\$1
478 \\*[an-result]
479 .  ft R
482 .de1 BR
483 .  ds an-result \&
484 .  while (\\n[.$] >= 2) \{\
485 .    as an-result \f[B]\\$1\f[R]\\$2\\*[an-empty]
486 .    shift 2
487 .  \}
488 .  if \\n[.$] .as an-result \f[B]\\$1
489 \\*[an-result]
490 .  ft R
493 .de1 RS
494 .  br
495 .  nr an-saved-margin\\n[an-level] \\n[an-margin]
496 .  nr an-saved-prevailing-indent\\n[an-level] \\n[an-prevailing-indent]
497 .  ie \\n[.$] .nr an-margin +(n;\\$1)
498 .  el         .nr an-margin +\\n[an-prevailing-indent]
499 .  in \\n[an-margin]u
500 .  nr an-prevailing-indent \\n[IN]
501 .  nr an-level +1
504 .de1 RE
505 .  br
506 .  ie \\n[.$] .nr an-level ((;\\$1) <? \\n[an-level])
507 .  el         .nr an-level -1
508 .  nr an-level (1 >? \\n[an-level])
509 .  nr an-margin \\n[an-saved-margin\\n[an-level]]
510 .  nr an-prevailing-indent \\n[an-saved-prevailing-indent\\n[an-level]]
511 .  in \\n[an-margin]u
514 .\" table support
516 .de1 TS
517 .  sp \\n[PD]u
518 .  HTML-IMAGE
521 .de1 TE
522 .  HTML-IMAGE-END
525 .\" dummy equation delimiters
526 .de1 EQ
527 .  HTML-IMAGE
529 .de1 EN
530 .  HTML-IMAGE-END
533 .de1 R
535 .  ie \\n[.$] \{\
536 .    tm `R' is a string (producing the registered sign), not a macro.
537 .    nop \\$*
538 .  \}
539 .  el \{\
540 .    ie c\[rg] \
541 .      nop \[rg]\c
542 .    el \
543 .      nop (Reg.)\c
544 .  \}
547 .\" these strings must work in compatibility mode also
549 .ds S \s'\\n(PSu'
550 .ie c\[tm] .ds Tm \(tm
551 .el        .ds Tm (TM)
552 .ds lq \(lq
553 .ds rq \(rq
555 .if !\n[an-html] .hy 14
557 .\" Load local modifications.
558 .mso man.local
560 .cp \n[_C]
562 .\" end of an-old.tmac