I'm using the
\input
command to insert table contents into my LaTeX document, but if I begin the inputted file with \hline
or \midrule
(when using booktabs), I get the following error message: Code: Select all
! Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet...
l.1 \hline
Main file:
Code: Select all
\documentclass{article}
\begin{document}
\begin{table}
\begin{tabular}{lcc}
\input{./table}
\end{tabular}
\end{table}
\end{document}
Code: Select all
\hline
Variable & 5.73 & 3.4 \\
\input
, it works. Also, if i remove \hline
from table.tex, it works. This is a problem for me as i'm using
\input
to retrieve table contents exported from Stata.I'm using MikTex 2.7 and LEd 0.52.
Any help would be greatly appreciated!