TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There are various types of commutative diagrams in mathematics, but several of them are the most common place. For example, a square (with 4 objects), a right triangle (with 3 objects), two adjacent squares (with 6 objects) and so on.

It seems that there are several packages for generating commutative diagrams, but almost none of them are easy, in the sense it's really difficult to remember how to write a code for a commutative diagram. For me, I need to find an example every time and then just substitute things to get my own diagram.

I've always wondered, if there is a web-app, like a webpage, a really user-friendly GUI, where you already have the shape of a comm. diagram, then you just put in objects and different kind of arrows in the boxes, and then finally, the web-app just generate the LaTeX code for the comm. diagram.

Is there such things?

share|improve this question
Not that I know of. Would be a nice weekend project. Maybe if I have some time... – Caramdir Nov 4 '10 at 20:08
I started to code a webapp for commutative diagram creation, but couldn’t come up with a UI that I would actually like to use. So I stopped again. – Caramdir Nov 6 '10 at 16:19
@Caramdir : I have a proposal for a UI, if you are still interested. The simplest possible version would have a few sample templates (visually represented as their output). After choosing the template, clicking on the arrows would allow you to change the length and the description on them and clicking on the objects would allow you to relabel them. Once this was set up, it should be possible to add templates as the user sees fit. I hope this makes sense. – Sam Lisi Jan 11 '12 at 15:26

I just stumbled on this from an answer at MathOverflow. It's not a web-app but designed to run on your own computer. The summary states:

Here is tcl/tk script for visually generating
latex and xypic arrays. 

You can download it from the author's webpage: http://www.math.purdue.edu/~dvb/scripts/arraymaker (the author being Donu Arapura).

I've not tested it so can't speak from experience, but the code looks very nice!

share|improve this answer

It would be super easy to write your own macros so that you didn't have to re-type the code each time:

#1\ar[r]^{#2}\ar[d]_{#3} & #4\ar[d]^{#5}\\
#6\ar[r]_{#7} & #8

And then when you wanted to include the square, you just call:

share|improve this answer

Check out the templates in diagxy.

share|improve this answer
+1, diagxy defines templates for squares and pullbacks, &c. – Charles Stewart Nov 9 '10 at 11:49

Not that I know of. Most people who want to make commutative diagrams are happy to write TeX code. :-) TeXShop for the Mac does have a GUI for matrices, which could possibly be adapted to something for commutative diagrams.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.