ahn@mpx0.lampf.lanl.gov (Hyo E. Ahn) (06/30/90)
Does anyone know how to insert a postscript file in TeXture 1.2? In VAX I usually put a following command (\insertplot) in my LaTeX file. \begin{figure} \insertplot{tz.ps}{4.8}{7.5}{0}{3}{0.8} \caption{Time-averaged distribution of vertical position for stored muons.} \label{tz} \end{figure} and put an appropriate postscript file in the same directory. I also have a INSETPLOT.TEX (shown below) file to interpret the command (\insetplot). I did exactly do the same thing for Mac and it didn't work. Any help would be greatly appreciated. Thanks. =============================================================================== Hyo E. Ahn, Los Alamos National Laboratory Internet: AHN@MPX0.LAMPF.LANL.GOV AHN@MPX1.LAMPF.LANL.GOV Decnet: MPDC1::DAC::AHN Bitnet: AHN@LAMPF Nodes: DAC (55295::); MPDC1 (43115::) =============================================================================== % INSERTPLOT.TEX % From PostScript driver user manual % % Insertplot parameters: % #1: name of user-generated postscript file % #2: figure height (inches) % #3: figure width (inches) % #4: lower left x-coordinate of figure (inches from left side) % #5: lower left y-coordinate of figure (inches from bottom) % #6: desired figure magnification (1.000 = unmagnified) % % Parameters 2-5 refer to the magnified dimensions of the plot as % printed when the user-generated PostScript file is submitted "as-is" % to the PostScript printer, not to the dimensions you wish it to have % in your TeX document. % \def\insertplot#1#2#3#4#5#6{ \vskip 10pt \nobreak \hbox to \hsize{% \hss \dimen0=#3in% \hbox to #6\dimen0{ % horizontal dimension of plot box \dimen0=#2in% \vbox to #6\dimen0{ % vertical dimension of plot box \vss \special{ps::[asis, begin] 0 SPB /ChartCheckPoint save def %PostScript commands to scale plot /showpage {} def Xpos Ypos translate #6 dup scale #4 72 mul neg #5 72 mul neg translate /xcen #4 #3 2 div add def /ycen #5 #2 2 div add def xcen ycen translate 1 -1 scale xcen -1 mul ycen -1 mul translate } \special{ps: plotfile #1 asis} \special{ps::[asis,end] ChartCheckPoint restore 0 SPE } }% \hss } \hss } \vskip 10pt }