[Mac OS X TeX] labelling graphics using TeXShop/Illustrator
Gary L. Gray
gray at engr.psu.edu
Sat Sep 29 00:07:13 CEST 2001
<x-flowed>Francesco Costanzo and I have come up with a nice little method for
labelling graphics for those of you using TeXShop and Illustrator.
Many of you may already be aware of this method, but we had not seen
it before. Here is a .tex file that you can simply typeset to get the
procedure. If you don't want to typeset it, you can simply decipher
the LaTeX.
Best regards,
Gary L. Gray
Associate Professor
**************************************************
Address: Engineering Science and Mechanics
The Pennsylvania State University
212 Earth & Engineering Sciences Building
University Park, PA 16802-6812
USA
Phone: (814) 863-1778
Fax: (814) 863-7967
E-mail: <mailto:gray at engr.psu.edu>
Web: <http://www.esm.psu.edu/Faculty/Gray/>
**************************************************
\documentclass[12pt]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% Define the margins and the like. %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setlength{\topmargin}{-0.25in}
\setlength{\oddsidemargin}{0.25in}
\setlength{\textwidth}{6.0in}
\setlength{\textheight}{8.8in}
\setlength{\headheight}{0in}
\title{The Key to Graphics-Inclusion Nirvana Using \TeX Shop and
Adobe Illustrator}
\author{Francesco Costanzo\\
Gary L. Gray\\
{\small Engineering Science \& Mechanics} \\[-0.05in]
{\small Penn State University}}
\date{September 28, 2001}
\begin{document}
\maketitle
This is the procedure for labeling graphics using TeXShop, Adobe
Illustrator, and Mac OS X.
\begin{enumerate}
\item
Create your image, without any labels, using Adobe Illustrator (this
was only tested with Illustrator 9 under Classic). Of course you can
generate the \verb".eps" or \verb".pdf" figures elsewhere, and then
open them in Illustrator.
\item
Create a .tex document that:
\begin{enumerate}
\item
is a single page with no page number;
\item
includes, using the graphics package, the image created in Step~1;
\item
includes the typeset labels you wish to include on the this figure.
\end{enumerate}
\item
Typeset the document created in Step~2 using the \TeX\ + Ghostscript
option and be sure to set the \TeX Shop preferences so that the
resulting \verb".ps" file is saved.
\item
Open the \verb".ps" file created as a result of Step~3 in Illustrator
and place the typeset labels on the figure where you would like them.
Disregard any warnings issued by Illustrator when opening the file.
Then save this file out of Illustrator as an \verb".eps" file. Be
sure and tell Illustrator to include the document fonts. For the sake
of this description, call this file \verb"figurename.eps".
\item
At this point, if your intention is to use an \verb".eps" figure in
\TeX Shop, then you are done. If you wish to use \verb".pdf" figures,
then proceed to Step~6.
\item
Now create another \verb".tex" document similar to the one created in
Step~1, except this time you need to include the following when
including the \verb".eps" file created in Step~4.
\begin{verbatim}
\setlength{\fboxsep}{-\fboxrule}
\fbox{\includegraphics{figurename}}
\end{verbatim}
Typeset this file, again using the \TeX\ + Ghostscript option. This
time you only need the resulting \verb".pdf" file.
\item
Open the \verb".pdf" file created in Step~6 in Illustrator. Save that
file out of Illustrator as an Illustrator \verb".pdf" file. This is
not a typo---you \emph{should} save the file as a \verb".pdf" file
since Illustrator will add the needed ``bounding box'' info. Again,
disregard all Illustrator warnings. Let's call this file
\verb"temp.pdf".
\item
Open \verb"temp.pdf" in a text editor (we like BBEdit\footnote{If you
use BBEdit, be sure and turn off ``QuickTime Translation'' in the
BBEdit ``Application'' preferences or else BBEdit will open the
\texttt{.pdf} file as a \texttt{.pdf} file instead of as a text
file.}) and look for the \verb"/ArtBox" information. This will give
you the bounding box or viewport for use in the option to
\verb"\includegraphics" in your final document. Copy the numbers
found in this ``art box''.
\item
Repeat Step~6 without placing the \verb"\fbox" around your figure.
Give this file the name that you want to give to the final version of
the figure that you will be including in \TeX Shop. Here, we will
call it \verb"fig.tex". Once this file is typeset, the resulting
\verb".pdf" is the file you will be including in whatever document
you are writing with the command:
\begin{center}
\verb"\includegraphics[viewport=XX XX XX XX]{fig}"
\end{center}
where \verb"XX XX XX XX" is the \verb"/ArtBox" information found in
Step~8. The \verb".pdf" that results from this this step is the file
you will include in your document.
\end{enumerate}
\end{document}
\end
-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <info at email.esm.psu.edu> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
</x-flowed>
More information about the macostex-archives
mailing list