0

I am trying to stack several tables one on another. For this I am using xltabular packages. I want to input text from another file. The following code works without problem when removing / commenting out the line:

\input{so_text.txt}

however if I remove / comment out the following lines (and want to input the exact same content with \input{so_text.txt} with the file containing that text:

blasasfd&1&h&bla\\
blasasfd&2&h&bla \\
blasasfd&5&h&bla \\

I get the following error message:


\hline ->\noalign
                  {\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet...
l.14     \end{xltabular}

Here is the code

\documentclass[a4paper, 12pt]{article}
\usepackage{xltabular}
\usepackage{caption}
\begin{document}

{ \begin{xltabular}{\linewidth}{| p{3cm} p{2.4cm} p{2.4cm} p{2.4cm}| } \caption{text} \label{key}\ \endlastfoot \hline \textbf{Bla}&\textbf{ a}&\textbf{b}&\textbf{ c}\ % \input{so_text.txt}

blasasfd&1&h&bla\ blasasfd&2&h&bla \ blasasfd&5&h&bla \ \hline \end{xltabular} } \end{document}

What am I doing wrong?

ecjb
  • 883
  • 3
    This is a well known problem and has been discussed several times on the site. It is not related to xltabular as it also happens in tabular. See for example https://tex.stackexchange.com/a/583939/3929 – daleif Feb 03 '22 at 08:55
  • Many thanks @daleif – ecjb Feb 03 '22 at 09:03

0 Answers0