Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Drawing diagrams in Latex?

  1. Aug 18, 2008 #1


    User Avatar

    How to do that?
  2. jcsd
  3. Aug 19, 2008 #2

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

    what would you like to do?? an example would be helpful in answering the question.
  4. Aug 21, 2008 #3


    User Avatar

    some arrow theoretic diagrams such as in category theory.
  5. Aug 21, 2008 #4
    OK, so you the most basic things you can do with the latex's own picture environment. But there are other, more advanced options. The most popular might be the the http://tug.org/PSTricks/main.cgi/", because it definitely works with pdf output (and, well, I know it better than pstricks ...).

    All of these let you basically draw pictures by describing them. tikz even has a pretty huge library for specific tasks.

    I don't quite know what you mean by "arrow theoretic diagrams", but if you want to connect boxes with arrows, you might want to look at http://www.graphviz.org/" [Broken]. This is a graph visualization tool. It does not use (La)TeX syntax at all, but it can produce eps or pdf output to include in your documents. Good thing about graphviz is that you only need to specify the logical relationships, then graphviz does the whole layout for you.

    hope that helps,
    Last edited by a moderator: May 3, 2017
  6. Sep 12, 2008 #5
    For typesetting diagrams as in category theory, the Xy-pic package is generally the way to go, and it is standard enough that most tex distributions include it (though you could of course download it yourself). The user's guide is well written, and you can usually find an example that does what you want and emulate that.

    For other sorts of diagrams, I second the recommendation of pgf. However, while it is true that Graphviz is able to automate a lot of the work that goes into laying out a diagram (specifically, a graph), it usually is more trouble than it is worth unless you have a lot of nodes, or if you want to automatically generate a diagram from some program's output.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook