home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / tex / inputs / insertplot.sty < prev    next >
Encoding:
Text File  |  1991-05-21  |  1.5 KB  |  54 lines

  1. %
  2. % insertplot.sty
  3. %
  4. % This macro is to be used with the Arbortext DVIPS PostScript driver.
  5. % 15 July 1988.
  6. %
  7. %   C. E. Higgs
  8. %   Paul Scherrer Institute
  9. %   CH-5303 Wuerenlingen
  10. %   Switzerland
  11. %   tel: 056 992062 (direct)
  12. %        056 992078 (secretary)
  13. %   Email: HIGGS@CAGEIR5A.BITNET
  14. %
  15. %
  16. % parameter #1: Offset from left margin
  17. %           #2: PostScript file name
  18. %           #3: Vertical space to leave for figure
  19. %           #4: Scaling factor on X-axis
  20. %           #5: Scaling factor on Y-axis
  21. %           #6: Orientation of original figure
  22. %               0 = landscape
  23. %
  24. \def\insertplot#1#2#3#4#5#6{\par\nointerlineskip
  25.   \hbox{%
  26.     \hskip #1
  27.      \vbox to #3{
  28.        \vfil
  29.        \special{ps::[asis,begin]
  30.           0 SPB
  31.           /figsave save def
  32.           /showpage {} def
  33. %
  34.           /initgraphics {} def                   % redefine 3 commands from
  35.           /erasepage {} def                      % the DI-3000 output to be
  36.           /a4 {} def                             % null operations.
  37. %
  38.           /slide{#6 0 eq                         % translate the origin
  39.             {-100 #4 mul 600 #5 mul translate    % and rotate if the
  40.              270.0 rotate}if                     % original figure is
  41.                    } def                         % landscape
  42.           gsave
  43.           Xpos Ypos translate
  44.           slide
  45.           #4 #5 scale}
  46.        \special{ps: plotfile #2 asis}
  47.        \special{ps::[asis,end]
  48.           grestore
  49.           figsave restore
  50.           0 SPE}
  51.     }%
  52.  }}
  53. %
  54.