[OS X TeX] Drawing diagrams: what's better?
morelli at flux.utah.edu
Wed May 19 13:19:42 CEST 2010
John B. Thoo wrote:
> Hi, everyone. I hope this isn't a FAQ: Is it better to draw diagrams
> using something like PSTricks or Tikz, or something like xfig or
> Inkscape? What are the pros and cons? TIA.
To PSTricks and Tikz, I'd add Asymptote.
When you mention xfig and Inkscape, you don't explain how you intend to
use them. Do
you just mean to generate ordinary graphic files which you will include
Or do you want to use some level of integration with LaTeX? For
instance, do you need to
include LaTeX text in your diagrams?
Here's my take.
I see only two advantages to using image editor software.
1. They generally have a quicker learning curve than the packages.
2. Certain kinds of diagrams are quicker to create in image editing
software than in a package.
There are numerous disadvantages of using image editing software, and
advantages of using
a LaTeX package.
1. Using an image editor means having to use two separate pieces of
software to generate your
2. Using an image editor therefore exposes you to the maintenance
problems of the image
editor. What if development of it stops? What if it's incompatible with
an upgrade of OS X?
What if you want to switch to a different OS? Etc. When I tried to use
Inkscape, I ran into
bugs when I upgraded to Snow Leopard. I couldn't find fixes, so I
3. Including the graphics in the LaTeX document requires a bunch of
setup and manual
4. Your document source must involve multiple files and hand coded
references between them.
5. Compiling the document involves multiple steps. This get rather
tedious when you are
making frequent tweaks to the diagrams.
6. Some kinds of diagrams are more tedious to create with image editors.
For instance, if
you have a pattern you want to repeat in a number of positions, you can
generate it in TikZ
with a loop. In an image editor, you'd have to copy and paste the image
by hand. It's even
worse if you want to modify the pattern depending on where it is placed.
7. With LaTeX packages, you can include LaTeX text (like mathematical
without a hassle.
8. With a package like TikZ, you can automate and parametrize the
generation of a diagram.
For instance, suppose you're creating a document about trigonometry. You
a function in TikZ that creates a labeled triangle with given angle and
side length data, and
given side and angle labels. Then every time you need a diagram of a
triangle, you need
only write a LaTeX command with the appropriate parameters.
More information about the macostex-archives