Update to groff 1.19.2.
[dragonfly.git] / contrib / groff-1.19 / tmac / psatk.tmac
1 .\" psatk.tmac
2 .\"
3 .\" Implementation of the ATK PB and PE macros for use with groff and grops.
4 .\" Load this after atk.tmac.
5 .nr zT 0
6 .if '\*(.T'ps' .nr zT 1
7 .nr psatk-unit 1p
8 .de psatk-defs
9 ps: mdef 5
10 /PB {
11         /saved save def
12         currentpoint translate
13         \n[psatk-unit] u -\n[psatk-unit] u scale
14         userdict begin
15         /showpage {} def
16 } bind def
17 /PE {
18         end
19         saved restore
20 } bind def
21 /troffadjust {
22         pop 0
23 } bind def
24 ..
25 .de PB
26 .ne \\$1p
27 .nr zT \\n(zT>0
28 \\*[PB\\n(zT]\\
29 ..
30 .de PE
31 \\*[PE\\n(zT]\\
32 ..
33 .ds PB0
34 .\" The last line before the "'PE" is "\}" rather than ".\}".  This
35 .\" would cause a spurious space to be introduced before any picture
36 .\" that was the first thing on a line.  So we have to catch that and
37 .\" remove it.
38 .de PB1
39 .ev psatk
40 .fi
41 .di psatk-mac
42 \!ps: exec PB
43 ..
44 .de PE0
45 \v'-.75m'\
46 \D'l \\$1p 0'\D'l 0 \\$2p'\D'l -\\$1p 0'\D'l 0 -\\$2p'\
47 \h'\\$1p'\v'.75m'\x'\\$2p-1m>?0'\c
48 ..
49 .ds psatk-init \Y[psatk-defs]
50 .de PE1
51 \!PE
52 .di
53 .di null
54 .br
55 .di
56 .rm null
57 .ev
58 \v'-.75m'\
59 \\*[psatk-init]\Y[psatk-mac]\
60 \h'\\$1p'\v'.75m'\x'\\$2p-1m>?0'\c
61 .rm psatk-mac
62 .if \\n(.P .ds psatk-init
63 ..