What part of my code is causing the misalignment of the first column? The extra space seems to increase with the number of rows. (Part of my code is from How do I use the ampersand (&) inside a foreach or conditional (or other group/environment) when building tables?)
Code:
\documentclass{article}
\makeatletter
\newtoks\@tabtoks
\newcommand\addtabtoks[1]{\global\@tabtoks\expandafter{\the\@tabtoks#1}}
\newcommand\eaddtabtoks[1]{\edef\mytmp{#1}\expandafter\addtabtoks\expandafter{\mytmp}}
\newcommand*\resettabtoks{\global\@tabtoks{}}
\newcommand*\printtabtoks{\the\@tabtoks}
\makeatother
\newcommand{\topic}[2]{%
\eaddtabtoks{Col 1 & Col 2 & Col 3 & #1 & #2}
\addtabtoks{\\}
}
\newenvironment{mytabular}{%
\resettabtoks
\tabular{llrrl}
}{%
\printtabtoks
\endtabular
}
\begin{document}
\begin{mytabular}
\topic{1.1}{LaTeX}
\topic{1.2}{causes}
\topic{1.3}{me}
\topic{1.4}{lots}
\topic{1.5}{of}
\topic{1.6}{frustration}
\end{mytabular}
\end{document}
Output:

