[Tex/LaTex] Commutative diagram generating app

diagramsonlinetools

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?

Best Answer

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

\newcommand{\commsquare}[8]
{
\xymatrix
{
#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:

\commsquare{M_1}{d}{f_1}{M_0}{f_0}{N_1}{d'}{N_0}
Related Question