[comp.text.tex] Inserted graphics with LaTeX

dhosek@sif.claremont.edu (Hosek, Donald A.) (06/28/90)

In article <1990Jun26.160626.10692@cbnews.att.com>, elk@cbnews.att.com (Edwin L. King) writes...
>   I have a post script fiel that I want to include as a figure.
>   I know to use \special{....}.  My problem is setting up
>   the figure to reserve the space for it and to give me the
>   proper caption for the figure.  Preferably, it would
>   also auto-number the figure.  If it doesn't do that natively,
>   I can number it by hand, but I think it does that.

Here's how I suggest handling inserted graphics:

% In the preamble, I define an environment which defines whether illustrations
% are to be placed flushleft, flushright, or centered
\newenvironment{aroundpic}{\begin{center}}{\end{center}}


% Then a typical graphic insertion will look like the following. LaTeX will
% handle adding figure 1 to the beginning of the caption and placing the figure 
% on the page.
\begin{figure}
\begin{aroundpic}
\setlength{\unitlength}{1in} % Or whatever your favorite dimension is.
\begin{picture}(3,2) % The size of the inserted graphic
\put(0,0){\special{<command to insert graphic here>}}
\end{picture}
\end{aroundpic}
\caption{Here is where the auto-numbered caption goes. If one has a fairly 
         long caption, a short form should be given in the optional argument
         even if there is no list of figures since the optional argument will
         be written to a file in any event.}
\end{figure}


---
Don Hosek                         TeX, LaTeX, and Metafont Consulting and
dhosek@ymir.claremont.edu         production work. Free Estimates.
dhosek@ymir.bitnet                
uunet!jarthur!ymir                Phone: 714-625-0147