home *** CD-ROM | disk | FTP | other *** search
/ Aminet 10 / aminetcdnumber101996.iso / Aminet / util / gnu / groff_src.lha / groff-1.10src / tmac / tmac.psatk < prev    next >
Text File  |  1991-08-22  |  1KB  |  62 lines

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