psatk.tmac

Implementation of the ATK PB and PE macros for use with groff and grops.
Load this after atk.tmac.
.nr zT 0 .nr psatk-unit 1p ps: mdef 5 /PB { /saved save def currentpoint translate \n[psatk-unit] u -\n[psatk-unit] u scale userdict begin /showpage {} def } bind def /PE { end saved restore } bind def /troffadjust { pop 0 } bind def .. .nr zT \\n(zT>0 \\*[PB\\n(zT]\\ .. \\*[PE\\n(zT]\\ .. The last line before the "'PE" is "\}" rather than ".\}". This
would cause a spurious space to be introduced before any picture
that was the first thing on a line. So we have to catch that and
remove it.
.ev psatk .di psatk-mac \!ps: exec PB .. \v'-.75m'\ \D'l \\$1p 0'\D'l 0 \\$2p'\D'l -\\$1p 0'\D'l 0 -\\$2p'\ \h'\\$1p'\v'.75m'\x'\\$2p-1m>?0'\c .. \!PE .di .di null

.di .ev \v'-.75m'\ \\*[psatk-init]\Y[psatk-mac]\ \h'\\$1p'\v'.75m'\x'\\$2p-1m>?0'\c ..