home *** CD-ROM | disk | FTP | other *** search
/ Aminet 10 / aminetcdnumber101996.iso / Aminet / util / gnu / groff_src.lha / groff-1.10src / tmac / tmac.psfig < prev    next >
Text File  |  1993-02-23  |  1KB  |  88 lines

  1. .\" These are macros to make psfig work with groff.
  2. .\" They require that psfig be patched as described in ../grops/psfig.diff.
  3. .de psfig-defs
  4. ps: mdef 100
  5.  
  6. % wid ht llx lly urx ury psfigstart -
  7.  
  8. /psfigstart {
  9.     /level1 save def
  10.     /ury exch def
  11.     /urx exch def
  12.     /lly exch def
  13.     /llx exch def
  14.     /ht exch u def
  15.     /wid exch u def
  16.     currentpoint ht add translate
  17.     wid urx llx sub div ht ury lly sub div neg scale
  18.     llx neg lly neg translate
  19.  
  20.     % set the graphics state to default values
  21.     0 setgray
  22.     0 setlinecap
  23.     1 setlinewidth
  24.     0 setlinejoin
  25.     10 setmiterlimit
  26.     [] 0 setdash
  27.     newpath
  28.     /showpage {} def
  29. } bind def
  30.  
  31. % psfigclip -
  32.  
  33. /psfigclip {
  34.     currentpoint newpath
  35.     llx lly moveto
  36.     urx lly lineto
  37.     urx ury lineto
  38.     llx ury lineto
  39.     closepath clip
  40.     newpath moveto
  41. } bind def
  42.  
  43. % psfigend -
  44.  
  45. /psfigend {
  46.     level1 restore
  47. } bind def
  48.  
  49. % globalstart -
  50.  
  51. /globalstart {
  52.     % save the current space code on the stack
  53.     SC
  54.     level0 restore
  55. } bind def
  56.  
  57. % globalend -
  58.  
  59. /globalend {
  60.     end
  61.     BP
  62.     /SC exch def
  63.     DEFS begin
  64. } bind def
  65. ..
  66. .de psfig-init
  67. .if \\n[.P] \{\
  68. \Y[psfig-defs]
  69. .    br
  70. .    sp -1
  71. .    ds psfig-init\" empty
  72. .    rm psfig-defs
  73. .\}
  74. ..
  75. .de F+
  76. .br
  77. .psfig-init
  78. .nr psfig-fill \\n[.u]
  79. .nf
  80. .sp -.5
  81. .if !\\n[.$] .ce 9999
  82. ..
  83. .de F-
  84. .br
  85. .ce 0
  86. .if \\n[psfig-fill] .fi
  87. ..
  88.