I have multiple tables that need to be formatted exactly the same. Titles and such will need to update, but I think I can handle that. What I'm stumbling on is that \input isn't working how I want it to. Here's my main file MWE:
\documentclass[]{article}
\usepackage{tabularx}
\usepackage{multicol}
\begin{document}
\section{}
\input{tablebegin}
\input{tableend}
\end{document}
Here's my tablebegin.tex file:
\begin{table}[ht]
\centering
% \begin{threeparttable}
\caption{Table Caption}
\scriptsize% to fit on page
\begin{tabularx}{5in}{ cccccccccccc }
\multicolumn{12}{ c }{\textbf{Table Title}}\\ \hline
&1&2&3&4&56&7&8&9&10&11&12\\
And here's the table end file:
\end{tabularx}
\end{table}
In TexStudio I'm getting the following error:
File ended while scanning use of \TX@get@body. \input{tablebegin}
This is probably bad practice, but I'm trying to keep the table formatting separate from the tables. My goal is to have about 20 tablemid files that will be encapsulated by tablebegin and tableend. That way if I want to adjust the table formatting I can do it in one place. I am probably approaching this completely wrong, so I'm open to any suggestions.
tabularxwithout at leas one flexible widthXtype column does not really make sense. – leandriis Jan 19 '21 at 20:45