I want to draw a commutative diagram with TikZ
as follows:
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{tikzpicture}[auto]
\node (S1) {$\sigmaSet \cap X_N$};
\node (S2) [below= 2cm and 4cm of S1] {$\sigmaSet \cap X_N$};
\node (S3) [below= 2cm and 4cm of S2] {$\discreteSigmaSet$};
\node (U1) [right= 2cm and 4cm of S1] {$\potentialSpace$};
\node (U2) [below= 2cm and 4cm of U1] {$Y_M$};
\node (U3) [below= 2cm and 4cm of U2] {$\R^M$};
\draw[->] (S1) to node {$F_f$} (U1);
\draw[->] (S2) to node {$\widetilde{F}_f$} (U2);
\draw[->] (S3) to node {$\widehat{F}_f$} (U3);
\draw[->] (S1) to node [swap] {$I$} (S2);
\draw[->] (S2) to node [swap] {$\theta_{B_N}$} (S3);
\draw[->] (U1) to node {$P^{\psprod{E}{\cdot}{\cdot}}_{Y_M}$} (U2);
\draw[->] (U2) to node {$\theta_{C_M}$} (U3);
\end{tikzpicture}
which looks like this:
Note how the horizontal arrows are not straight, but end too high on the right side.
Now my question is how I can make TikZ draw the horizontal arrows as straight lines. Is there a way to accomplish this without having to use the matrix library? I want to keep the code above as simple as possible.
tikz-cd
too)? Theon grid
option does help here too (as it uses thecenter
anchor for both nodes: the one that is referenced and the one that is placed)) but has other disadvantages (overlapping nodes).on grid
option looks pretty good to me.