# Filling matrix rows with a user defined key-value macro


To exemplify, I use the keycommand interface and a tabular, because that's the shortest combination:

\documentclass{standalone}
\usepackage{keycommand}

\newkeycommand{\myrow}[keyA=defaultA, keyB=defaultB]{%
\commandkey{keyA} & \commandkey{keyB} \\
}

\begin{document}
\begin{tabular}[t]{ll}
\myrow[keyA=this, keyB=that]
\myrow[keyA=see,  keyB=me]
\end{tabular}
\end{document}

Which gives:

I would be grateful for an explanation of what's going on and how to get past this. The example only shows what I consider my root problem, but please keep in mind that suggestions should also be compatible with a TikZ matrix of nodes.

FWIW, I've ended up giving up on \matrix{} and use handmade positioning:

\documentclass{standalone}
\usepackage{keycommand}
\usepackage{tikz}
\usetikzlibrary{positioning,calc}

\newkeycommand{\myrow}[keyA=defaultA, keyB=defaultB, keyC=defaultC]{%
\node (A) at ($(0, 0) - (pos)$)  [anchor=east]{\commandkey{keyA}};
\node (B) at ($(4, 0) - (pos)$)  [anchor=west]{\commandkey{keyB}};
\node (C) at ($(40, 0) - (pos)$)  [anchor=west]{\commandkey{keyC}};
\coordinate (pos) at ($(pos) + (0, 18)$);
}

\begin{document}
\begin{tikzpicture}[node distance=0cm,inner xsep=0pt,x=1pt,y=1pt]
\tikzstyle{every node}+=[text height=0.6em,text depth=0.1em]
\coordinate (pos) at (0, 0);
\myrow[keyA=this, keyB=that]
\myrow[keyA=see,  keyB=me]
\end{tikzpicture}
\end{document}

It works with many key-value-pairs. I've tried 18.