I have reduced my code to the following lines:
\documentclass[9pt,letterpaper,oneside]{amsart}
\usepackage{graphicx}
\usepackage[table, dvipsnames]{xcolor}
\usepackage{longtable}
\usepackage[top=0.2in, bottom=0in, left=1in, right=1in]{geometry}
\usepackage[labelformat=empty]{caption}
\begin{document}
\renewcommand*\rmdefault{ppl}
\textrm{%
\begin{table}[ht]
\centering
\caption{Blabla}
{\tiny
\begin{tabular}{llrrr}
\hline
\rowcolor[gray]{0.65} A & B & C & D & E \\
\hline
\emph{ }
\end{tabular}
}
\end{table}}
\end{document}
This code does exactly what I want, but when I replace the line
\rowcolor[gray]{0.65} A & B & C & D & E \\
(which resembles a bigger table) with
\include{TableTest}
where TableTest.tex only contains
\rowcolor[gray]{0.65} A & B & C & D & E \\
I get an error message:
! Misplaced \noalign.
\rowcolor ->\noalign
{\ifnum 0=`}\fi \global \let \CT@do@color \CT@@do@color...
l.3 \rowcolor
[gray]{0.65} A & B & C & D &
I use R/Sweave and xtable to make this table, and a similar problem (+ solution) is found here. Only this solution (i.e. replace \input with \expandableinput) does not work for me! That is
\documentclass[9pt,letterpaper,oneside]{amsart}
\usepackage{graphicx}
\usepackage[table, dvipsnames]{xcolor}
\usepackage{longtable}
\usepackage[top=0.2in, bottom=0in, left=1in, right=1in]{geometry}
\usepackage[labelformat=empty]{caption}
\usepackage{booktabs}
\begin{document}
\renewcommand*\rmdefault{ppl}
\textrm{%
\begin{table}[ht]
\centering
\caption{Blabla}
{\tiny
\begin{tabular}{llrrr}
\hline
\expandableinput TableTest.tex
\hline
\emph{ }
\end{tabular}
}
\end{table}}
\end{document}
gives error message
! Undefined control sequence.
<recently read> \expandableinput
l.25 \end{table}}
Question: how can I overcome the problem of importing the table from TableTest.tex into the LaTeX code?
\makeatletter\let\expandableinput\@@input\makeatother– David Carlisle Feb 25 '14 at 13:45\renewcommand{\rmdefault}{ppl}, but rather\usepackage{mathpazo}– egreg Feb 25 '14 at 13:47\inputor\include? The title says\input, while the question says\include. – Martin Schröder Feb 25 '14 at 15:28