I'm a bit of a noob to Latex. I'm using tabularx to create a table of many rows, for which I'm also using ltablex to extend over multiple pages. The below code represents the issue I'm facing, where the column containing the consistently largest amounts of text should expand and force the rest to fit around it is actually being rendered as the narrowest! Any help is appreciated.
\usepackage{ltablex}
\begin{tabularx}{\textwidth}{|l|X|l|l|l|}
\hline
& & \multicolumn{3}{c|}{\textbf{TEST}}\\\hline
\textbf{ID} & \textbf{CRITERIA} & \textbf{(A)} & \textbf{(B)} & \textbf{(C)} \\ \hline
\multicolumn{5}{|c|}{\cellcolor[HTML]{FFFFFF}{\color[HTML]{000000} \textbf{Category}}} \\ \hline
\#1 & Very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very long text
& Not so long text & Bit longer text than was before, but still short & Usually empty \\ \hline
\end{tabularx}
The closest I've been able to get is:
begin{tabularx}{\textwidth}{|l|L|X|X|X|}
where L is from \newcolumntype{L}{>{\raggedright\arraybackslash}X}. Source. Could this declaration involving X be causing this issue?


lso they are set their natural width on one line with no linebreaking, then any remaining space is allocated to the Xcolumns (or column here) if there is not much space left, it will be narrow. As you have not provided a usable example we can not test this or see how wide is the spae text width so hard to make any real suggestions for change. – David Carlisle Jan 31 '21 at 22:57