I am having problems making a table fit my page. I have used the tabularx
environment and the \linewidth
parameter, which successfully shortens the width of the \cline
, but doesn't force the text to wrap so the table still falls off the page. Ideally, I'd like the headings '(t, n, d)-RTS' and 'Underlying (m, d, 1)-Schemes' to wrap and make the table slightly slimmer. Please see below for an example.
Any help would be appreciated. I've never had any issues with making tabularx
and \linewidth
work, but don't tend to use \multicolumn
that often... is tabularx
conflicting with \multicolumn
somehow?
Thank you in advance.
\documentclass{article}
\usepackage{tabularx}
\begin{document}
\begin{table}[]
\centering
\begin{tabularx}{\linewidth}{l | l l | l l l | l l l | }
\cline{2-9}
& \multicolumn{5}{l|}{Combinatorial Schemes [1] } & \multicolumn{3}{ l | }{MBR Schemes [2]} \\ \hline
\multicolumn{1}{|l|}{$(t, n, d)-$RTS } &Underlying $(m, d, 1)-$ Schemes & $n$ & $x$ & $y$ & $z$ & $x$ & $y$ & $z$ \\ \cline{1-9}
\multicolumn{1}{|l|}{$(2, n, 3)$} & $(9, 3, 1)$ & $6 \le n \le 12$ & $1/2$ & $3/2$ & $0.1111$ & $2/3$ & $3/2$ & $1$ \\
\multicolumn{1}{|l|}{$(2, n, 3)$} & $(15, 3, 1)$ & $10 \le n \le 35$ & $1/2$ & $3/2$ & $0.2222$ & $2/3$ & $3/2$ & $1$ \\
\multicolumn{1}{|l|}{$(2, n, 3)$} & $(21, 3, 1)$ & $14 \le n \le 70$ & $1/2$ & $3/2$ & $0.3333$ & $2/3$ & $3/2$ & $1$ \\
\hline
\end{tabularx}
\end{table}
\end{document}
tabularx
has noX
columns, so can not work. But you do npt want line breaking here so you would be better to usetabular
thantabularx
tabularx
existed? The only featuretabularx
adds is a new column typeX
for variable width columns, so any documentation that tells you abouttabularx
should have mentionedX
. (seetexdoc tabularx
for the main package documentation.)