I would like to use pgf's math operations to refer to matrix coodinates in tikz. This works for the second coordinate, but apparently miraculously:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix,arrows}
\begin{document}
\begin{equation}
\begin{tikzpicture}
[description/.style={fill=white,inner sep=2pt},baseline=(current bounding box.center)]
\matrix (m) [matrix of math nodes, row sep=1em, column sep=1.5em, text height=1.5ex, text depth=0.25ex]
{
0 & \Omega^k_X & Z k k & Z k {k-1} & \cdots & Z k 1 & Z k 0 & 0\phantom .\\
0 & \Lambda^k \mathcal E^\vee & Z k k & Z k {k-1} & \cdots & Z k 1 & Z k 0 & 0.\\
};
\foreach \a in {2,3,...,8} {
\pgfmathsetmacro{\myresult}{\a-1}
\draw[->] (m-1-\myresult) -- (m-1-\a);
\draw[->] (m-2-\myresult) -- (m-2-\a);
};
\end{tikzpicture}
\end{equation}
\end{document}
The following, however, fails spectacularly.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix,arrows}
\begin{document}
\begin{equation}
\begin{tikzpicture}
[description/.style={fill=white,inner sep=2pt},baseline=(current bounding box.center)]
\matrix (m) [matrix of math nodes, row sep=1em, column sep=1.5em, text height=1.5ex, text depth=0.25ex]
{
0 \\
\Omega^k_X \\
Z k k \\
Z k {k-1} \\
cdots \\
Z k 1 \\
Z k 0 \\
};
\foreach \a in {2,3,...,7} {
\pgfmathsetmacro{\myresult}{\a-1}
\draw[->] (m-\myresult-1) -- (m-\a-1);
};
\end{tikzpicture}
\end{equation}
\end{document}
Apparently, this is because \myresult is 1.0, 2.0, etc, and tikz does not like. An otherwise fruitless google search turned up \pgfmathfloatint, but tikz barfs on \usetikzlibrary{fpu}. Is there any way to turn 1.0 into 1?