Including graphics
Creating figures and illustrations with TEX isn't easy.
Although it is theoretically possible to place small dots
anywhere on a page and build up an arbitrarily complex picture,
time and memory limitations make such a scheme impractical.
(LATEX provides a picture
environment, but it is very inefficient
and only suitable for small, simple diagrams.)
TEX does however provide a \special
command which can be used
to pass arbitrary information to the DVI interpreter.
's printing and previewing code interprets a \special
command
using a simple syntax that allows inclusion of a given file.
Note that using \special
can seriously reduce the portability of
your TEX documents because a given DVI-reading program can only understand
\special
commands that obey its own particular syntax.
One useful technique to enhance portability is to
hide the actual \special
call inside a macro; then when you move your
TEX file to another computer all you need to do is change the macro
definition (assuming the DVI driver supports similar functionality in its
handling of \special
).
For an example of this approach see Larry Siebenmann's
boxedeps.doc
and boxedeps.tex
in the Plain
sub-folder
in TeX-inputs.
Another alternative is epsf.tex
; see epsftest.tex
in the
TeX-docs folder. Using either of these macro packages will make your
input files much more portable.
A \special
command can appear almost anywhere in your input file.
It behaves like an invisible box of zero height and width.
TEX simply stores the given information in the DVI file at the current
page position.
When previewing a DVI file, draws a small marker indicating the
location of a \special
.
The ``Page Info'' item will display this location in paper coordinates
as well as the text of the \special
command.
Similar information is displayed if you choose to show statistics
when printing a DVI file.
Subsections