3 ms·
I use this for many of my conference presentations, and I've used it for published papers as well as my dissertation. I love that I can build up a diagram from
by JoshTriplett 5y ago
I use this for many of my conference presentations, and I've used it for published papers as well as my dissertation.
I love that I can build up a diagram from specific constructs using macros. For instance, if I'm expressing a lot of linked lists, I can define a single macro for how I want to express "route the next pointer from the previous element around this element to the following element by arcing over this element", and do that consistently throughout the document.
I love that I can easily express "draw a line from 30° above the axis on this object to 150° around the axis on this object", and TikZ will connect those in a smooth way no matter where the objects are placed.
I love that I can express "create a point at the intersection of this line and this curve, and let me reference that point by name later".
It's a programming language, and a powerful one. I recommend it for any non-trivial diagramming or schematic task.
All that said, for cases where you need to express semantics and not worry as much about how the result looks, and you want the simplest possible way to express "connect a to b to c, and b to d, and d to c and back", and not worry about where the nodes are placed, I recommend graphviz. Graphviz is great for "let me dump the structure of this program's data structures out as text and turn it into a diagram". The biggest distinguishing factor between graphviz and TikZ, for me, is node placement and style: if you care how it looks and where nodes are placed, use TikZ; if you don't, use graphviz.
- asddubs 5y agoI've used tikz a bit, and the results do look very good, but it sure takes a lot longer than just whipping up a graphic in any other graphics software
- sdenton4 5y agoYeah, I tried to get into tikz in grad school, and found myself baaasically relearning it from scratch every time I wanted to do something. A 'bicycle of the mind' it is not.
- leephillips 5y agoYou can also use a syntax similar to Graphviz' dot language within TikZ, and either position the nodes manually or, as with Graphviz, let TikZ position them automatically with a choice of layout algorithms. You use LuaTeX, and the layout is calculated by a Lua program: https://lwn.net/Articles/640302/ https://lwn.net/Articles/640302/ So you can get the best of both worlds, doing everything within TikZ/LuaLaTeX.
- JoshTriplett 5y agoInteresting! I've seen things like that before with TikZ, but they required enabling \write18, which I didn't want to do. Using LuaTex support sounds much more appealing. I'll have to give that a try next time I build a diagram.
- andrepd 5y ago> you want the simplest possible way to express "connect a to b to c, and b to d, and d to c and back", TikZ has an easy to use DSL for expressing graphs :) you can write \graph a -> {b, c} -> d; and it will produce something like a –– b -- d \ / \ c /