* doc/pic.ms: Improve documentation of absolute coordinates.
[s-roff.git] / tmac / an-old.tmac
blob72d6e3e8e395fa447ccb9c1f0ae86ce031708548
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 .    pl \\n[nl]u
98 .    an-bp
99 .  .
102 .de set-an-margin
103 .  nr an-margin \\n[IN]
106 .\" .TH title section extra1 extra2 extra3
107 .de1 TH
108 .  if \\n[an-html] \{\
109 .    HTML-TAG-NS ".tl"
110 \\$1
111 .  \}
113 .  de an-init \" We have to do it like this to get multiple man pages right.
114 .    ds an-title "\\$1
115 .    ds an-section "\\$2
116 .    ds an-extra1 "\\$3
117 .    ie (\\n[.$] > 3) .ds an-extra2 "\\$4
118 .    el               .ds an-extra2 \"Sun Release 4.0
119 .    ie (\\n[.$] > 4) .ds an-extra3 "\\$5
120 .    el               .ds an-extra3 \"System Programmer's Manual
121 .    ds an-init
122 \\..
124 .  DT
126 .  nr PS    10z \" default point size
127 .  nr PS-SS 10z
128 .  nr PS-SH 10.95z
129 .  nr VS    12p
131 .  \" use sizes similar to LaTeX
132 .  if t \{\
133 .    ie (\\n[S] == 11) \{\
134 .      nr PS    10.95z
135 .      nr PS-SS 10.95z
136 .      nr PS-SH 12z
137 .      nr VS    13.6p
138 .    \}
139 .    el \{\
140 .      if (\\n[S] == 12) \{\
141 .        nr PS    12z
142 .        nr PS-SS 12z
143 .        nr PS-SH 14.4z
144 .        nr VS    14.5p
145 .      \}
146 .    \}
147 .  \}
149 .  ps \\n[PS]u
150 .  vs \\n[VS]u
151 .  ll \\n[LL]u
153 .\" We must select an integer indentation value for nroff;
154 .\" see comment in an-do-tag.
155 .  if !r IN \{\
156 .    ie t .nr IN 7.2n
157 .    el   .nr IN 7n
158 .  \}
159 .  PD
160 .  if !r SN \
161 .    nr SN 3n \" the indentation of sub-sub-headings relative to sub-headings
162 .  nr an-level 1
163 .  set-an-margin
164 .  nr an-prevailing-indent \\n[IN]
165 .  nr an-tag-sep 1n
167 .  nr an-no-space-flag 0
168 .  nr an-break-flag 0
169 .  nr an-div? 0
171 .  ie \\n[cR] \
172 .    an-header
173 .  el \{\
174 .    wh 0 an-header
175 .    wh -1i an-footer
176 .    wh \\n[FT]u an-p-footer
178 .    if (\\n[nl] > 0) \{\
179 .      ie \\n[C] .bp (\\n[%] + 1)
180 .      el        .bp 1
181 .    \}
182 .  \}
185 .\" BSD compatibility macros: .AT and .UC
187 .de1 AT
188 .  ds an-extra2 "7th Edition
189 .  if "\\$1"3" .ds an-extra2 "7th Edition
190 .  if "\\$1"4" .ds an-extra2 "System III
191 .  if "\\$1"5" \{\
192 .    ie "\\$2"" .ds an-extra2 "System V
193 .    el .ds an-extra2 "System V Release \\$2
194 .  \}
197 .de1 UC
198 .  ds an-extra2 "3rd Berkeley Distribution
199 .  if "\\$1"3" .ds an-extra2 "3rd Berkeley Distribution
200 .  if "\\$1"4" .ds an-extra2 "4th Berkeley Distribution
201 .  if "\\$1"5" .ds an-extra2 "4.2 Berkeley Distribution
202 .  if "\\$1"6" .ds an-extra2 "4.3 Berkeley Distribution
203 .  if "\\$1"7" .ds an-extra2 "4.4 Berkeley Distribution
206 .de1 DT
207 .  ta T .5i \" This sets tabs every .5 inches
210 .de1 PD
211 .  ie \\n[.$] .nr PD (v;\\$1)
212 .  el         .nr PD (.4v >? \n[.V])
215 .\" Redefine these to customize the header & footer
217 .de1 PT
218 .  tl '\\*[an-title](\\*[an-section])'\\*[an-extra3]'\\*[an-title](\\*[an-section])'
221 .de1 BT
222 .  if r ps4html \
223 .    return
224 .  ie \\n[D] \{\
225 .    if o .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
226 .    if e .tl '\\*[an-page-string]'\\*[an-extra1]'\\*[an-extra2]'
227 .  \}
228 .  el \
229 .    tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
232 .de1 an-header
233 .  an-init
234 .  if \\n[cR] \{\
235 .    ie \\n[an-first] \
236 .      nr an-first 0
237 .    el \
238 .      sp .5i
239 .  \}
240 .  ev 1
241 .  ps \\n[PS]u
242 .  vs \\n[VS]u
243 .  lt \\n[LT]u
244 .  ie \\n[an-html] \
245 .    tl ''''
246 .  el \{\
247 .    if !\\n[cR] \
248 .      sp .5i
249 .    PT
250 .    ie !\\n[cR] \
251 .      sp |1i
252 .    el \
253 .      sp .5i
254 .  \}
255 .  ev
256 .  ns
259 .de1 an-footer
260 '  bp
263 .af an-page-letter a
265 .de1 an-p-footer
266 .  ev 1
267 .  ps \\n[PS]u
268 .  vs \\n[VS]u
269 .  lt \\n[LT]u
270 .  ie \\n[an-html] \{\
271 .    ds an-page-string
272 .    ds an-extra1
273 .    ds an-extra2
274 .  \}
275 .  el \{\
276 .    ie r X \{\
277 .      if (\\n[%] > \\n[X]) \{\
278 .        nr an-page-letter (\\n[%] - \\n[X])
279 .        ds an-page-string \\n[X]\\n[an-page-letter]
280 .      \}
281 .    \}
282 .    el \{\
283 .      ie \\n[cR] \
284 .        ds an-page-string "\\*[an-title](\\*[an-section])
285 .      el \
286 .        ds an-page-string \\n[%]
287 .    \}
288 .  \}
289 .  BT
290 .  ev
293 .de1 an-end
294 .  nr % 1
295 .  pl +4v
296 .  fl
297 .  sp 3
298 .  an-p-footer
299 .  pl \\n[nl]u
302 .if \n[cR] .em an-end
304 .de1 SH
305 .  sp \\n[PD]u
306 .  nr an-level 1
307 .  set-an-margin
308 .  nr an-prevailing-indent \\n[IN]
309 .  fi
310 .  in \\n[an-margin]u
311 .  ti 0
312 .  HTML-TAG-NS ".NH \\n[an-level]"
313 .  it 1 an-trap
314 .  nr an-no-space-flag 1
315 .  nr an-break-flag 1
316 .  ps \\n[PS-SH]u
317 .  ft \\*[HF]
318 .  ne (2v + 1u)
319 .  if \\n[.$] \&\\$*
322 .de1 SS
323 .  sp \\n[PD]u
324 .  nr an-level 1
325 .  set-an-margin
326 .  nr an-prevailing-indent \\n[IN]
327 .  fi
328 .  in \\n[IN]u
329 .  ti \\n[SN]u
330 .  it 1 an-trap
331 .  nr an-no-space-flag 1
332 .  nr an-break-flag 1
333 .  ps \\n[PS-SS]u
334 .  ft \\*[HF]
335 .  ne (2v + 1u)
336 .  if \\n[.$] \&\\$*
339 .de1 B
340 .  it 1 an-trap
341 .  ft B
342 .  if \\n[.$] \&\\$*
345 .de1 I
346 .  it 1 an-trap
347 .  ft I
348 .  if \\n[.$] \,\\$*\/
351 .de1 SM
352 .  it 1 an-trap
353 .  ps -1
354 .  if \\n[.$] \&\\$*
357 .de1 SB
358 .  it 1 an-trap
359 .  ps -1
360 .  ft B
361 .  if \\n[.$] \&\\$*
364 .de1 TP
365 .  sp \\n[PD]u
366 .  if \\n[.$] .nr an-prevailing-indent (n;\\$1)
367 .  it 1 an-trap
368 .  in 0
369 .  ll -\\n[an-margin]u
370 .  if !\\n[an-div?] .di an-div
371 .  nr an-div? 1
374 .de1 an-trap
375 .  ft R
376 .  ps \\n[PS]u
377 .  vs \\n[VS]u
378 .  if \\n[an-break-flag] \{\
379 .    br
380 .    nr an-break-flag 0
381 .  \}
382 .  if \\n[an-no-space-flag] \{\
383 .    ns
384 .    nr an-no-space-flag 0
385 .  \}
386 .  if \\n[an-div?] .an-do-tag
389 .de an-do-tag
390 .  br
391 .  di
392 .  nr an-div? 0
393 .  ll
394 .  ie (\\n[dl] + \\n[an-tag-sep] > \\n[an-prevailing-indent]) \{\
395 .    in \\n[an-margin]u
396 .    ne (2v + 1u)
397 .    an-div
398 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
399 .  \}
400 .  el \{\
401 .    \" In nroff mode, if the indentation value is not an integer multiple
402 .    \" of the character cell, it is possible that the following combination
403 .    \" of .in and .ti yields a different result as the .in request in
404 .    \" the .ie part above.
405 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
406 .    ti -\\n[an-prevailing-indent]u
407 .    chop an-div
408 .    ne (1v + 1u)
409 .    HTML-TAG-NS ".col 1"
410 \\*[an-div]\\h'|\\n[an-prevailing-indent]u'\c
411 .    HTML-TAG-NS ".col 2"
412 .  \}
415 .de1 LP
416 .  sp \\n[PD]u
417 .  ps \\n[PS]u
418 .  vs \\n[VS]u
419 .  ft R
420 .  in \\n[an-margin]u
421 .  nr an-prevailing-indent \\n[IN]
424 .als PP LP
425 .als P LP
427 .de1 IP
428 .  ie !\\n[.$] \{\
429 .    ps \\n[PS]u
430 .    vs \\n[VS]u
431 .    ft R
432 .    sp \\n[PD]u
433 .    ne (1v + 1u)
434 .    in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
435 .  \}
436 .  el \{\
437 .    ie (\\n[.$] - 1) .TP "\\$2"
438 .    el               .TP
439 \&\\$1
440 .  \}
443 .de1 HP
444 .  ps \\n[PS]u
445 .  vs \\n[VS]u
446 .  ft R
447 .  sp \\n[PD]u
448 .  ne (1v + 1u)
449 .  if \\n[.$] .nr an-prevailing-indent (n;\\$1)
450 .  in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
451 .  ti \\n[an-margin]u
454 .ds an-empty \" this is referenced to avoid looping on eg .RB ( \\ )
456 .de1 RI
457 .  if \\n[.$] \{\
458 .    ds an-result \&\\$1
459 .    shift
460 .    while (\\n[.$] >= 2) \{\
461 .      as an-result \,\f[I]\\$1\f[R]\/\\$2\\*[an-empty]
462 .      shift 2
463 .    \}
464 .    if \\n[.$] .as an-result \,\f[I]\\$1\f[R]
465 \\*[an-result]
466 .  \}
469 .de1 IR
470 .  if \\n[.$] \{\
471 .    ds an-result \&\f[I]\\$1\f[R]
472 .    shift
473 .    while (\\n[.$] >= 2) \{\
474 .      as an-result \/\\$1\f[I]\,\\$2\f[R]
475 .      shift 2
476 .    \}
477 .    if \\n[.$] .as an-result \/\\$1
478 \\*[an-result]
479 .  \}
482 .de1 IB
483 .  if \\n[.$] \{\
484 .    ds an-result \&\f[I]\\$1
485 .    shift
486 .    while (\\n[.$] >= 2) \{\
487 .      as an-result \/\f[B]\\$1\f[I]\,\\$2\\*[an-empty]
488 .      shift 2
489 .    \}
490 .    if \\n[.$] .as an-result \/\f[B]\\$1
491 \\*[an-result]
492 .    ft R
493 .  \}
496 .de1 BI
497 .  if \\n[.$] \{\
498 .    ds an-result \&\f[B]\\$1
499 .    shift
500 .    while (\\n[.$] >= 2) \{\
501 .      as an-result \,\f[I]\\$1\f[B]\/\\$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 RB
511 .  ds an-result \&
512 .  while (\\n[.$] >= 2) \{\
513 .    as an-result \f[R]\\$1\f[B]\\$2\\*[an-empty]
514 .    shift 2
515 .  \}
516 .  if \\n[.$] .as an-result \f[R]\\$1
517 \\*[an-result]
518 .  ft R
521 .de1 BR
522 .  ds an-result \&
523 .  while (\\n[.$] >= 2) \{\
524 .    as an-result \f[B]\\$1\f[R]\\$2\\*[an-empty]
525 .    shift 2
526 .  \}
527 .  if \\n[.$] .as an-result \f[B]\\$1
528 \\*[an-result]
529 .  ft R
532 .de1 RS
533 .  nr an-saved-margin\\n[an-level] \\n[an-margin]
534 .  nr an-saved-prevailing-indent\\n[an-level] \\n[an-prevailing-indent]
535 .  ie \\n[.$] .nr an-margin +(n;\\$1)
536 .  el         .nr an-margin +\\n[an-prevailing-indent]
537 .  in \\n[an-margin]u
538 .  nr an-prevailing-indent \\n[IN]
539 .  nr an-level +1
542 .de1 RE
543 .  ie \\n[.$] .nr an-level ((;\\$1) <? \\n[an-level])
544 .  el         .nr an-level -1
545 .  nr an-level (1 >? \\n[an-level])
546 .  nr an-margin \\n[an-saved-margin\\n[an-level]]
547 .  nr an-prevailing-indent \\n[an-saved-prevailing-indent\\n[an-level]]
548 .  in \\n[an-margin]u
551 .\" table support
553 .de1 TS
554 .  sp \\n[PD]u
555 .  HTML-IMAGE
558 .de1 T&
561 .de1 TE
562 .  HTML-IMAGE-END
565 .\" dummy equation delimiters
566 .de1 EQ
567 .  HTML-IMAGE
569 .de1 EN
570 .  HTML-IMAGE-END
573 .de1 R
575 .  ie \\n[.$] \{\
576 .    tm `R' is a string (producing the registered sign), not a macro.
577 .    nop \\$*
578 .  \}
579 .  el \{\
580 .    ie c\[rg] \
581 .      nop \[rg]\c
582 .    el \
583 .      nop (Reg.)\c
584 .  \}
587 .\" these strings must work in compatibility mode also
589 .ds S \s'\\n(PSu'
590 .ie c\[tm] .ds Tm \(tm
591 .el        .ds Tm (TM)
592 .ds lq \(lq
593 .ds rq \(rq
595 .if !\n[an-html] \{\
596 .  if !rHY \{\
597 .    ie \n[cR] \
598 .      nr HY 12
599 .    el \
600 .      nr HY 14
601 .  \}
602 .  hy \n[HY]
605 .\" Load local modifications.
606 .mso man.local
608 .cp \n[_C]
610 .\" end of an-old.tmac