The code and output shown below are based on the answers to this post .
The problem is that first of the three tables is produced as desired but the second and third have the second column vertically centered which is not desired. This is despite the fact that all three are the same except for the use of macros in the second and third to reduce redundancy. Somehow the introduction of these macros has changed the output. What is going on? How can I fix that?
\documentclass{article}
\usepackage{multicol}
\usepackage{enumitem}
\usepackage{tabu}
\usepackage[table]{xcolor}
\begin{document}
This table just repeats all the required commands
for each row. The output appears as desired.
\begin{center}\small
\setlength{\columnseprule}{.4pt}
\renewcommand\columnseprulecolor{\color{blue}}
\begin{multicols}{2}
\begin{tabu} {>{\bfseries}lX}
\savetabu{mytabu}
Name1 & Value1. \\
\tabucline[blue]-
\end{tabu}
\begin{tabu} {\usetabu{mytabu}}
Name2 & Value2. \\
\tabucline[blue]-
\end{tabu}
\begin{tabu} {\usetabu{mytabu}}
Name3 & Value3. \\
\tabucline[blue]-
\end{tabu}
\end{multicols}
\end{center}
This table uses the RowA macro defined using a \LaTeX{} macro. The second
column of the table is vertically centered which is not desirable.
\newcommand{\RowA}[1]{
\begin{tabu}{\usetabu{mytabu}}
#1 \\
\tabucline[blue]-\end{tabu}
}
\begin{center}\small
\setlength{\columnseprule}{.4pt}
\renewcommand\columnseprulecolor{\color{blue}}
\begin{multicols}{2}
\raggedcolumns
\begin{tabu} {>{\bfseries}lX}\savetabu{mytabu}
Name1 & Value1. \\
\tabucline[blue]-
\end{tabu}
\RowA{Name2 & Value2.}
\RowA{Name3 & Value3.}
\end{multicols}
\end{center}
This table uses the RowB macro defined using a \TeX{} macro. The second
column of the table is vertically centered which is not desirable.
\def\RowB#1{
\begin{tabu} {\usetabu{mytabu}}
#1 \\
\tabucline[blue]-\end{tabu}
}
\begin{center}\small
\setlength{\columnseprule}{.4pt}
\renewcommand\columnseprulecolor{\color{blue}}
\begin{multicols}{2}
\raggedcolumns
\begin{tabu} {>{\bfseries}lX}\savetabu{mytabu}
Name1 & Value1. \\
\tabucline[blue]-
\end{tabu}
\RowB{Name2 & Value2.}
\RowB{Name3 & Value3.}
\end{multicols}
\end{center}
\end{document}
