[Tex/LaTex] itemize within tabularx does not work when ltablex is loaded

#enumerateitemizeltablextablestabularx

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 merge longtable and tabularx I'd probably use ltxtable, 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 that tabularx and longtable do.

However ltablex has a \keepXColumns to make it be a bit more compatible:

\documentclass{article}
\usepackage{tabularx}
\usepackage{amsmath, mathdots, paralist}
\usepackage{ltablex} % uncommenting this line will work

\keepXColumns
\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}