2

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.

mrupp
  • 155
  • 1
    See https://tex.stackexchange.com/a/567988/2388 – Ulrike Fischer Nov 02 '20 at 17:03
  • 2
    Your code complies fine if I replace \begin{filecontents*}{mwe-bottomrule} with \begin{filecontents*}[overwrite]{mwebottomrule.tex} and \input{mwe-bottomrule} with \input mwebottomrule. – Mico Nov 02 '20 at 17:19
  • 1
    @Mico This is also effectively the solution in the linked question (the primitive TeX \input fixes the problem). – mrupp Nov 06 '20 at 16:08

0 Answers0