# Reading Table Body from file (Problem with KoMa Script?)

Alexander Krumeich alexander.krumeich at gmail.com
Mon Jan 6 13:54:31 CET 2020

I have quite a few instances where I read the table body from a file
(see MWE below). This used to work well up until before Christmas, but
as of today LuaTeX crashes with:

! Misplaced \noalign.
\bottomrule ->\noalign
{\ifnum 0=}\fi \@aboverulesep =\aboverulesep \global...

l.19 \end{tabularx}

When I don't read the table body from a separate file it works
alright. Please take a look at the following example:

\documentclass[a4paper]{scrartcl}
\usepackage{tabularx}
\usepackage{booktabs}

\begin{filecontents}{tablebody.tex}
abc & 123 \\
def & 456 \\
\end{filecontents}

\begin{document}

\begin{tabularx}{1\linewidth}{XX}
\toprule
Col 1 & Col 2 \\
\midrule
\input{tablebody}
\bottomrule
\end{tabularx}

\end{document}

Further experiments show that if I replace the "scrartcl" class with
"article", LuaTeX does not crash. So it seems that something might be
wrong after the KoMa Script update of December 23rd?

I'd be glad if somebody could look into this.

Thanks

Alexander
`