There are several vector graphics format in use these days by vector graphics packages, the most common ones being pdf
, eps
, and svg
.
SVG
tends to be the de facto internal working format for most of them these days, and it is a very good format for web applications as most browser will be able to display them natively. However, unfortunately, svg
is currently not supported in LaTeX documents.
The historical format for vector graphics in TeX is eps
and it is indeed the only format supported by the original latex, even for raster based images (indeed, all these file formats can contain both vector and raster based images).
With the graphicx
package, and pdflatex
(and newer incarnations such as xelatex
and lualatex
) you can now include raster files such as jpg
, png
, and so on, without having to put them in a eps
container, and you can also include pdf
files, however you lose the ability to include eps
files.
Most graphics packages will allow you to export as eps or pdf so you can choose at the time which format you want. Alternatively, you can easily convert from one format to the other with command line tools such as epstopdf
.
As for which format is better, this is open for debate, pdf
is basically built on eps
with more features such as embed fonts, including ttf
and otf
ones, and compressibility (so a pdf
will usually be smaller than an eps
) among others. People will usually also have something installed on there computer that reads pdf
, whereas, eps
may be an issue.
I recommend tikz
. The advantage of tikz
over graphical methods are analogous to the reasons to use LaTeX in other situations:
To write documents, many people in science use LaTeX instead of word-processing software. It has a steep learning curve, but saves time in the end and produces better-looking results.
To create presentations, quite a number of people use beamer instead of powerpoint-like software. Probably a bit less than #1, but the story is the same: It has a steep learning curve, but saves time and produces better-looking results in the end.
Some people use tikz
(and pgfplots
) to create their graphics. Probably a considerable lower number than in #1 and #2, but again, the reasoning is the same: It has a steep learning curve, but...
Does it start to sound familiar? I guess it should! For a long time, I used LaTeX only for #1. When I prepared my Master thesis presentation, I made the jump and decided to learn beamer, and then I used LaTeX for #1 and #2. Then, when I was writing my licentiate thesis (midterm PhD thesis in the Swedish academic system), I wasn't satisfied with the diagrams and plots, and decided to learn tikz
and pgfplots
. So then I used LaTeX for #1, #2 and #3.
That's my current situation. I don't know right now if I will make any further steps in the forseeable future. If any, it would be package writing, but so far the prospect of programming in TeX looks daunting to me. Quite possibly the reasoning will once again be the same: It has a steep learning curve, but...
Etc.
P.S. Of course, you can always use other programs to create graphics and then draw on top of your picture!
Best Answer
You can use tikz or pstricks to draw diagrams from within a
LaTeX
document. Diagram drawing software capable of creatingeps
orpdf
files (e.g. xfig (free) or Adobe Illustrator) will also yield good results.For examples using TikZ (including 3D), see here.