I am trying to build a table using longtable and tabularx
with the ltxtable.
For some weird reason, unwanted vertical lines appear on the first row.
This is my main.tex
:
\documentclass[12pt,twoside]{report}
\usepackage{multirow}
\usepackage{tabularx}
\usepackage{longtable}
\usepackage{ltxtable}
\begin{document}
\LTXtable{\linewidth}{table.tex}
\end{document}
This is table.tex
:
\small
\begin{longtable}{| p{0.7cm} | X |}\label{tab:evaluation_survey}
\\ \hline
\multirow{2}{*}{e.1)} & \textbf{Question}:\\
\cline{2-2}
& \textbf{Answers}: \\ \hline
\hline
\multirow{2}{*}{e.2)} & \textbf{Question}: \\
\cline{2-2}
& \textbf{Answers}: \\ \hline
\hline
\multirow{2}{*}{e.3)} & \textbf{Question}: \\
\cline{2-2}
& \textbf{Answers}: \\ \hline
\hline
\multirow{2}{*}{e.4)} & \textbf{Question}:\\
\cline{2-2}
& \textbf{Answers}: \\ \hline
\end{longtable}
Edit: if I remove the \\
before the first \hline
I receive \noalign
and \omit
errors
\\
before\hline
.ltxtable
needs the table in an extra file. So the document is complete with the two files. The user could usefilecontents
to generate it frommain.tex
. Or you could copy both files. But you cannot replace\LTXtable{…}{…}
by the code fromtable.tex
.ltxtable
...