home *** CD-ROM | disk | FTP | other *** search
/ Aminet 10 / aminetcdnumber101996.iso / Aminet / util / gnu / groff_src.lha / groff-1.10src / tmac / tmac.pspic < prev    next >
Text File  |  1995-03-28  |  2KB  |  62 lines

  1. .\" Define the PSPIC macro.
  2. .\" When used other than with -Tps, it will draw a box around where
  3. .\" the picture would go.
  4. .de ps-bb
  5. .nr ps-nargs \\n[.$]
  6. .if \\n[ps-nargs]=4 \{\
  7. .    nr ps-llx 0\\$1
  8. .    nr ps-lly 0\\$2
  9. .    nr ps-urx 0\\$3
  10. .    nr ps-ury 0\\$4
  11. .\}
  12. ..
  13. .de PSPIC
  14. .nr ps-offset-mode 0
  15. .if '\\$1'-L' \{\
  16. .    nr ps-offset-mode 1
  17. .    shift
  18. .\}
  19. .if '\\$1'-R' \{\
  20. .    nr ps-offset-mode 2
  21. .    shift
  22. .\}
  23. .if '\\$1'-I' \{\
  24. .    nr ps-offset-mode 3
  25. .    nr ps-offset (m;\\$2)
  26. .    shift 2
  27. .\}
  28. .br
  29. .sy echo .ps-bb `psbb \\$1` >/tmp/psbb\\n[$$]
  30. .so /tmp/psbb\\n[$$]
  31. .sy rm /tmp/psbb\\n[$$]
  32. .if \\n[ps-nargs]=4 \{\
  33. .    nr ps-wid (\\n[ps-urx]-\\n[ps-llx])
  34. .    nr ps-ht (\\n[ps-ury]-\\n[ps-lly])
  35. .    if \\n[ps-wid]<0 .nr ps-wid 0-\\n[ps-wid]
  36. .    if \\n[ps-ht]<0 .nr ps-ht 0-\\n[ps-ht]
  37. .    ie \\n[.$]>=2 .nr ps-deswid (i;\\$2)
  38. .    el .nr ps-deswid \\n[.l]-\\n[.i]<?\\n[ps-wid]p
  39. .    nr ps-desht \\n[ps-deswid]*1000+(\\n[ps-wid]/2)/\\n[ps-wid]\
  40. *\\n[ps-ht]+500/1000
  41. .    if \\n[.$]>=3&(\\n[ps-desht]>(i;0\\$3)) \{\
  42. .        nr ps-desht (i;\\$3)
  43. .        nr ps-deswid \\n[ps-desht]*1000+(\\n[ps-ht]/2)/\\n[ps-ht]\
  44. *\\n[ps-wid]+500/1000
  45. .    \}
  46. .    ne \\n[ps-desht]u+1v
  47. .       if \\n[ps-offset-mode]=0 .nr ps-offset \\n[.l]-\\n[.i]-\\n[ps-deswid]/2
  48. .       if \\n[ps-offset-mode]=1 .nr ps-offset 0
  49. .       if \\n[ps-offset-mode]=2 .nr ps-offset \\n[.l]-\\n[.i]-\\n[ps-deswid]
  50. .    ie \\n[.$]>=3 .ds ps-desht \\n[ps-desht]
  51. .    el .ds ps-desht \" empty
  52. \h'\\n[ps-offset]u'\
  53. \X'ps: invis'\
  54. \Z'\D'p 0 \\n[ps-desht]u \\n[ps-deswid]u 0 0 -\\n[ps-desht]u''\
  55. \X'ps: endinvis'\
  56. \v'\\n[ps-desht]u'\X'ps: import \\$1 \
  57. \\n[ps-llx] \\n[ps-lly] \\n[ps-urx] \\n[ps-ury] \\n[ps-deswid] \\*[ps-desht]'
  58. .    br
  59. .    sp \\n[ps-desht]u
  60. .\}
  61. ..
  62.