Drawing with TeX
There are many packages to do pictures in (La)TeX itself (rather than
importing graphics created externally), ranging from simple use of
LaTeX picture
environment, through enhancements like
eepic, to
sophisticated (but slow) drawing with PicTeX. Depending on your type
of drawing, and setup, here are a few systems you may consider:
- PicTeX is a venerable, and very powerful, system, that draws
by placing dots on the page to give the effect of a line or curve. While
this has the potential of great power, it is (of course) much slower
than any of the other established packages. What’s more, there
are problems with its documentation.
- epic was designed to make use of the LaTeX
picture
environment somewhat less agonising;
eepic extends it, and is capable of using tpic
\
special
commands to improve printing performance. (If the
\
special
s aren’t available, the eepicemu will do the
business, far less efficiently.
- pict2e; this was advertised in
the LaTeX manual, but didn’t appear for nearly
ten years after publication of the book! It removes all the petty
restrictions that surround the use of the
picture
environment. It therefore suffers only from the rather
eccentric drawing language of the environment, and is a far more
useful tool than the original environment has ever been. (Note that
pict2e supersedes David Carlisle’s stop-gap
pspicture.)
- PSTricks; this gives you access to all the power of
PostScript from TeX itself, by sophisticated use of
\
special
commands. Since PostScript is itself a
pretty powerful programming language, many astounding things can in
principle be achieved using PSTricks (a wide range of
contributed packages, ranging from world mapping to lens design
diagrams, is available).
Pstricks’ \
special
s are
by default specific to dvips, but VTeX (both in its
commercial and in its free versions) understands them. PDFTeX
users may use pst-pdf, which (like
epstopdf — see
PDFLaTeX graphics) generates
PDF files using an auxiliary program, from PSTricks
commands (pst-pdf also requires a recent installation of
the preview package).
There is a PSTricks mailing list
(pstricks@tug.org) which you may
join, or you may
just browse the
list archives.
- pgf: while pstricks is very powerful and
convenient, using it with PDFLaTeX is an awful fidget: if you
simply want the graphical capabilities, pgf, together with
its rather pleasing “user-oriented” interface tikz, may be a good
bet for you. While PDF has (in essence) the same graphical
capabilities as PostScript, it isn’t programmable; pgf provides
common LaTeX commands that will utilise the graphical
capabilities of both PostScript and PDF equally.
- MetaPost; you liked Metafont, but never got to grips with font files?
Try MetaPost —
all the power of Metafont, but it generates PostScript figures; MetaPost
is nowadays part of most serious (La)TeX distributions. Knuth
uses it for all his work…
- Mfpic; you liked Metafont, but can’t understand the
language? The package makes up Metafont or MetaPost code for you
within using familiar-looking TeX macros. Not quite the
full power of MetaPost, but a friendlier interface; of course, with
MetaPost output, the results can be used equally well in either
LaTeX or PDFLaTeX.
- You liked PicTeX but don’t have enough memory or time? Look
at Eitan Gurari’s dratex, which is as powerful as most
other TeX drawing packages, but is an entirely new
implementation, which is not as hard on memory, is much more
readable (and is fully documented).
- dratex.sty
- graphics/dratex (or browse the directory)
- epic.sty
- macros/latex/contrib/epic (or browse the directory)
- eepic.sty
- macros/latex/contrib/eepic (or browse the directory)
- eepicemu.sty
- macros/latex/contrib/eepic (or browse the directory)
- mfpic
- graphics/mfpic (or browse the directory)
- preview.sty
- macros/latex/contrib/preview (or browse the directory)
- pspicture.sty
- macros/latex/contrib/pspicture (or browse the directory)
- pst-pdf.sty
- macros/latex/contrib/pst-pdf (or browse the directory)
- pgf.sty
- graphics/pgf (or browse the directory)
- pict2e.sty
- macros/latex/contrib/pict2e (or browse the directory)
- pictex.sty
- graphics/pictex (or browse the directory)
- pstricks
- graphics/pstricks (or browse the directory)
- tikz.sty
- Distributed with graphics/pgf (or browse the directory)
This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=drawing