In general you are better off using a drawing program designed for the
device you will be printing on, and then using the \special
command (or the \PSbox macro below) to include a
file.
If you are using a program which generates Encapsulated PostScript Files,
you can simply use the epsf documentstyle, and then say
\epsfbox{filename.ps}
at the place where you want the figure. This automatically reserves
space for the PostScript picture based on the size stored in it. See
the dvips man page for more detail.
To include a non-Encapsulated PostScript file (i.e. one written by hand or by certain drawing programs):
\begin{document}.
Most of the magic is needed so that LaTeX knows how big the document is,
so that it can reserve space for the PostScript figure for proper
placement and spacing.
\newcommand{\PSbox}[3]{\mbox{\special{psfile=#1}\hspace{#2}\rule{0pt}{#3}}}
idraw
is being used, group the entire picture and move it to the bottom-left
corner of the page. If it is a raw PostScript file, add an appropriate
translate command, if you know how.) When you do this, the left-most
inch of the picture may not be printed, since although
(0,0) is at the lower-left hand corner of the page, on some printers
the left most inch part of the page isn't part of the
image area. Don't worry about it--the missing part should be visible
when LaTeX moves it back onto the page.
\PSbox{/mit/username/filename.PS}{1.7in}{0.25in}
Where the first argument is the filename of the PostScript file, the
second is the width of the graphic, and the third argument is the height
of the graphic. The dimensions can be specified in any format that
LaTeX accepts. So, for example, a dimension such as ``4cm'' will also
work.
This ``PSbox'' can be included in a figure, or anything else you want!
\PSbox{/mit/username/filename hoffset=hoffset voffset=voffset}{width}{length}
For example, to include a file which is 4 inches high and 5 inches wide, which is located 3 inches from the bottom of the page and 2 inches from the left side of the page, the PSbox would be:
\PSbox{/mit/username/filename.PS hoffset=-144 voffset=-216}{5in}{4in}
NOTE: xdvi cannot show included PostScript figures; instead, it
leaves a blank space of the correct size. Xdvi will also print
a warning that says `xdvi: special ``filename'' not implemented'
every time you preview a page with a PostScript figure on it. This is
nothing to worry about--it's just reminding you that it can't preview
the PostScript figure--it should still print out without any problems.
NOTE NOTE: the version of xdvi currently installed in the
sipb locker can preview PostScript figures, either using the
native Display PostScript features (default), or by rendering the image through
another program first (the ``-nodps'' option). This feature
still has some problems, and in some circumstances X server bugs could
caused you to be logged out without warning. As always, we recomend
that you save your files early and often.
If you want to see where the PostScript picture will appear, you can
change the \mbox in the definition of \PSbox to
\framebox. In other words, you'd change the line
\newcommand{\PSbox}[3]{\mbox{\special{psfile=#1}\hspace{#2}\rule{0pt}{#3}}}
in your document to be:
\newcommand{\PSbox}[3]{\fbox{\special{psfile=#1}\hspace{#2}\rule{0pt}{#3}}}
Assuming that you have specified the arguments to \PSbox correctly, this
will result in a box being drawn around the area where the PostScript
image will appear. However, when you print your LaTeX document, the box
will appear on the printed output as well. You will need to change the
\fbox back to \mbox and run LaTeX again on your file
to make the box go away when you want to print your final copy.