I need this code to be compilable without errors:
\documentclass{article}
\usepackage{tabularx}
\usepackage{amsmath, mathdots, paralist}
\usepackage{ltablex} % uncommenting this line will work
\begin{document}
\begin{tabularx}{\textwidth}{lX}
% & influential variables &
\textbf{Setting 1:} & This is my description $X_{\text{bla}} \in \{1, \hdots , 20\}$.\\
\textbf{Setting 2:} & This splits into
\begin{compactitem}
\item First item
\item Second item
\end{compactitem} \\
\end{tabularx}
\end{document}
I am getting the error Something's wrong--perhaps a missing \item. \end{tabularx}
. If I remove the line \usepackage{ltablex}
it will work.
However, I need the ltablex package and therefore I am looking for a possibility to let the code above be compilable. Any suggestions?
Best Answer
ltablex
changes too much really, if you must mergelongtable
andtabularx
I'd probably useltxtable
, but 99% of the time that i see tables set with{lX}
they would be better set as a list, which naturally expands to full width and naturally breaks over a page, without any of the contortions thattabularx
andlongtable
do.However
ltablex
has a\keepXColumns
to make it be a bit more compatible: