The dot lanquage from graphviz is a great for drawing commutative diagrams as you can see here : commutative diagram
One can use dot language from graphviz, the Python script dot2tex to convert into LaTeX and the dot2texi.sty package to include the dot code into a LaTeX document.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\usepackage{dot2texi}
\usepackage{amsmath,amssymb}
\begin{document}
\begin{dot2tex}[dot]
digraph T
{rankdir=TB;
ranksep=.2;
nodesep=.1 ;
node [shape=none];
1 -> 4 [dir=backward xlabel="q "];
1 -> 5 [label="stretch" constraint=false];
1 -> 6 [label="respect equiv. ~ " texlbl="respect equiv. $\sim$" tailport=e headport=no constraint=false];
4 -> 9 [constraint=false label="∃!m" texlbl="$\exists!m$"];
5 -> 6 [constraint=false label="μ " texlbl="$\bar\mu$"] ;
6 -> 9 [dir=back label="∩_M " texlbl="$\cap_M$"];
1 [label="I x I" texlbl="$I\times I$"];
{rankdir=LR ; rank=same
4 [label="M*"];
5 [label="[0,2Π]✕[-1,1]" texlbl="$[0,2\pi]\times[-1,1]$"];
6 [label= "R^3" texlbl="$\mathbb{R}^3$"]; }
9 [label="M"]; }
\end{dot2tex}
\end{document}
my emacs source filemy emacs source file
The tikzpicture environment created
dot2texi is a great package and can be used to produce very quickly a lot of diagrams in a declarative style.