##
Tikz – A mathematician’s helper *July 27, 2009*

*Posted by Martin Camacho in General.*

Tags: graphics, images, latex, tikz

trackback

Tags: graphics, images, latex, tikz

trackback

Over the years I’ve always looked for some sort of ‘perfect’ LaTeX svg-like image generator. Tikz is a great solution for drawing images in your Latex documents, no matter how complicated or simple. If you’re drawing combinatorial graphs, like I often am, Tikz includes nice loop tools for efficient code. For example, rather than manually drawing a lot of vertical line segments in equally spaced intervals, it is possible to use one for loop and cut the required code down by a ton. Since the language is so simple, it’s easy to learn, and it fits in your Latex code with only an extra \usepackage.

Here is an image from www.texample.net, a wonderful source for tikz tutorials and examples, due to Brian S. Marks.

I strongly recommend Tikz for any mathematical images in Latex. There is an alternative, Asymptote, which is great, but having used both I definitely prefer Tikz.

Adobe Illustrator is also a useful program for generating figures, which I have used multiple times. Unfortunately it’s not free like Tikz though and is somewhat difficult to get used to (after several months I only learned a very small fraction of the whole program).

Some more examples of using TikZ for mathematics beside that of texample.net:

TikZ: Commutative diagrams with crossing edges

TikZ: chains with labeled edges

Math formulas and arrows with TikZ

[…] some of these blog posts. (Though I would recommend interested passers-by also to consider, say, Tikz depending on your aims; I’m not familiar with it, but it has the benefit of being […]

Why do you prefer Tikz to Asymptote?

Though the question isn’t addressed to me, I’m happy to give a some good reasons.

1) The tikz package lets you reuse existing macro definitions from within your TeX source. The asymptote program, though nice, is an external program which is unaware of these definitions.

2) Tikz has styles.