I'm new at using the TikZ package to make commutative diagrams. I'm trying to draw a triangle with an arrow between each pair of objects. Here's the code I'm using now:
\documentclass{article}
\usepackage{amsmath,amssymb,tikz}
\newcommand{\QQ}{\mathbb{Q}}
\begin{document}
\begin{tikzpicture}
\node (Q) {$\QQ$};
\node (tQ) [below of=Q] {$\QQ\otimes\QQ$};
\node (cQ) [right of=tQ] {$\QQ\times\QQ$};
\draw[->] (Q) to node {$i$} (cQ);
\draw[->] (tQ) to node [swap] {$m$} (Q);
\draw[<-] (cQ) to node [swap] {$\iota$} (tQ);
\end{tikzpicture}
\end{document}
(\QQ is a command I've defined to produce \mathbb{Q}, since it saves me typing.) The diagram compiles fine, but the objects and arrows overlap quite badly on the bottom line: the right- and left-most \mathbb{Q} in the nodes on the bottom line touch, and the arrow is superimposed over them. How can I fix this so that the diagram can be more readable?
\begin{tikzpicture}[node distance=2cm]. But this would affect all nodes in that particular TikZ picture placed bytocommand. See thepositioninglibrary in the manual. – percusse Feb 19 '12 at 20:22