jeffgerickson / algorithms

Bug-tracking for Jeff's algorithms book, notes, etc.
7.92k stars 1.02k forks source link

Sharing franction of latex code for graphs/figures #105

Closed antoniocaruso closed 5 years ago

antoniocaruso commented 5 years ago

This is not really a issue, but just a polite request. The book is really nice, and I've used part of it in a course on Complexity for master degree students of Math. I really like the section of graphs and NP-hardness, and expecially the figures. Could you share with us, the latex code of some of them, or the way they was created? Accurate figures, expecially of data structures and algorithmic steps, or the diagrams of reductions, are really amazing and not so simple to realize in latex.

Thanks.

echuber2 commented 5 years ago

I think it states in the colophon at the end of the book that Prof. Erickson made most of the diagrams in OmniGraffle Pro rather than using LaTeX. (You could do similarly in various vector graphics design software programs or toolkits; Dia, Graphviz, Inkscape, Adobe Illustrator, Affinity Designer, etc.)

But if you really want, there are quite a few LaTeX packages based on tikz for generating different kinds of diagrams. Sometimes it's amusing to see what people are able to do, e.g.: https://tex.stackexchange.com/questions/478856/how-to-draw-cubes-in-a-3-dimensional-plane https://tex.stackexchange.com/questions/477890/levi-civita-symbol-3d-matrix/ You can also generate things procedurally this way, as a plus: https://tex.stackexchange.com/questions/347601/tikz-lebesgue-curve-z-curve