Below code compiles as-is but fails when commenting out the \input statement. Why, and how to fix this?
\documentclass{article}
\usepackage{booktabs}
\begin{filecontents}{mwe-bottomrule}
abc \
\end{filecontents}
\begin{document}
\begin{tabular}{l}
abc \
%\input{mwe-bottomrule}
\bottomrule
\end{tabular}
\end{document}
Replacing \\ with \tabularnewline has no effect. Latest TeXlive on macOS.
\begin{filecontents*}{mwe-bottomrule}with\begin{filecontents*}[overwrite]{mwebottomrule.tex}and\input{mwe-bottomrule}with\input mwebottomrule. – Mico Nov 02 '20 at 17:19\inputfixes the problem). – mrupp Nov 06 '20 at 16:08