I am trying to create a table using tabularx to stretch a table to over the full page width. Usually, it would not need the full width but I like it better if it's like this. In my table, I have some multirow cells, therefore I use \cline{2-9}
instead of \hline at some points. Finally, I would like to have the content of my cells centered. However, I seem to be unable to combine all these aspects.
If I use \begin{tabularx}{\textwidth}{llXXXXXXX} %\textwidth or \linewith leads to the same result
stretching works but centering of the cell values does not as can be seen in this example
If I try \begin{tabularx}{\textwidth}{llccccccc}
centering works but the something is off with the \cline's and \hline's
Condensed code:
\begin{table}[H] \centering\begin{threeparttable} %because I'm using footnotes\caption{some caption}\label{tab:some table}\begin{tabularx}{\textwidth}{llccccccc}\toprule& &\multicolumn{7}{c}{some ID} \\& &1 &2 &3 &4 &5 &6 &7 \\ \midrule\multirow{2}{*}{This is} &a test &$\sim$ &2 &+&+&+&+&+ \\ \cline{2-9}¬ a test &+&10 &+&+&+&+&-- \\ \hline\end{tabularx}\end{threeparttable}\end{table}
Can anybody help me fix this? This would be great!
PS: I posted this question also on reddit but haven't received an answer yet. If a working solution is found there, I'll let you know.