I have a bizarre problem with a customised table wrapper in conjunction with booktabs and svn-multi. The MWE below illustrates the issue.
The wrapper myTable works fine if:
- either
booktabsis not used (comment\bottomrule) - or the options
table,subgroups,groupsof svn-multi are not activated
But if both are used, I get the error:
Misplaced \noalign.
\bottomrule ->\noalign
{\ifnum 0=`}\fi \@aboverulesep =\aboverulesep \global...
\myTable{\input{tabletest.tex}}{4}{c}
To add to the confusion, if you just include all the information from the \myTable wrapper into the document and include the table content manually (and not via \input) everything works fine, with both booktabs and the svn-multi options.
Is something wrong with the \myTable command, or is that a bug in booktabs/svn-multi?
\documentclass{article}
\usepackage{booktabs}
\usepackage[%
table,subgroups,groups% Either one this together with booktabs breaks my custom-table command
]{svn-multi}
\begin{filecontents}{tabletest.tex}
label 1 & label 2 & label 3 & label 4 \\
item 1 & item 2 & item 3 & item 4 \\
\end{filecontents}
\DeclareRobustCommand{\myTable}[3]{%
\begin{tabular}{l*{#2}{#3}}
#1%
\bottomrule%
\end{tabular}}%
\begin{document}
%This breaks if something from booktabs is included together with either one of the svn-multi options "table", "subgroups" or "groups"
\myTable{\input{tabletest.tex}}{4}{c}
%This compiles fine although the content is identical to the one above.
\begin{tabular*}{\textwidth}{@{\hskip\tabcolsep\extracolsep\fill}l*{4}{c}}%
label 1 & label 2 & label 3 & label 4 \\
item 1 & item 2 & item 3 & item 4 \\
\bottomrule%
\end{tabular*}%
\end{document}