Using the package epsf
- using the macro to import a ps file:
%%This macro was based on the application InstantTeX Picture.
\newcommand {\PICTURE}[2]{
\let\picnaturalsize=N
\def\picsize {#1}
\def\picfilename{#2}
\ifx\nopictures Y\else{\ifx\epsfloaded Y\else\input epsf \fi
\let\epsfloaded=Y
\centerline{\ifx\picnaturalsize N\epsfxsize \picsize\fi \epsfbox{\picfilename}}}\fi
}
- Here is an example:
\newcommand {\PICTURE}[2]{
\let\picnaturalsize=N
\def\picsize {#1}
\def\picfilename{#2}
\ifx\nopictures Y\else{\ifx\epsfloaded Y\else\input epsf \fi
\let\epsfloaded=Y
\centerline{\ifx\picnaturalsize N\epsfxsize \picsize\fi
\epsfbox{\picfilename}}}\fi
}
\begin{document}
%%%%%%%%%%%%%%%% PICTURE %%%%%%%%%%%%%%
\begin{figure}[htbp]
\PICTURE{2.0in}{b_new.ps}
\caption{ Here comes the caption.}
\label{example1}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
A larger example:
%%%%%%%%%%% PICTURE %%%%%%%%%%%%%
\begin{figure}[htbp]
\PICTURE{3.0in}{b_new.ps}
\caption{ Here comes the caption.}
\label{example2}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
View the example
- Before using this macro make sure that the file epsf.tex locates
at the "standard" place. For example, at the Geometry Center, it is in the
directory /usr0/pkg/tex/lib/inputs.
Previous