I want to make the table fit into one column in a two column page.
Also, I need it to look like this:
Here’s my code
\documentclass[twocolumn]{article}
\usepackage{adjustbox}
\begin{document}
\begin{table}[t]
\centering
\adjustbox{max height=\dimexpr\textheight-3cm\relax,
max width=0.4\textwidth}{
\begin{tabular}{|rr|rrrrrrrr|}
\hline
& & & & & Wrist & & & & \\
& & {\bf 1} & {\bf } & {\bf 2} & {\bf } & {\bf 3} & {\bf } & {\bf 4} & {\bf } \\
\hline
\multicolumn{ 1}{|c|}{Upper Arm} & \multicolumn{ 1}{|c|}{Lower Arm} & \multicolumn{ 2}{|c}{Wrist Twist} & \multicolumn{ 2}{|c}{Wrist Twist} & \multicolumn{ 2}{|c}{Wrist Twist} & \multicolumn{ 2}{|c|}{Wrist Twist} \\
\multicolumn{ 1}{|c|}{} & \multicolumn{ 1}{|c|}{} & 1 & 2 & 1 & 2 & 1 & 2 & 1 & 2 \\
\hline
& 1 & 1 & 2 & 2 & 2 & 2 & 3 & 3 & 3 \\
1 & 2 & 2 & 2 & 2 & 2 & 3 & 3 & 3 & 3 \\
& 3 & 2 & 3 & 3 & 3 & 3 & 3 & 4 & 4 \\
\hline
& 1 & 2 & 3 & 3 & 3 & 3 & 4 & 4 & 4 \\
2 & 2 & 3 & 3 & 3 & 3 & 3 & 4 & 4 & 4 \\
& 3 & 3 & 4 & 4 & 4 & 4 & 4 & 5 & 5 \\
\hline
& 1 & 3 & 3 & 4 & 4 & 4 & 4 & 5 & 5 \\
3 & 2 & 3 & 4 & 4 & 4 & 4 & 4 & 5 & 5 \\
& 3 & 4 & 4 & 4 & 4 & 4 & 5 & 5 & 5 \\
\hline
& 1 & 4 & 4 & 4 & 4 & 4 & 5 & 5 & 5 \\
4 & 2 & 4 & 4 & 4 & 4 & 4 & 5 & 5 & 5 \\
& 3 & 4 & 4 & 4 & 5 & 5 & 5 & 6 & 6 \\
\hline
& 1 & 5 & 5 & 5 & 5 & 5 & 6 & 6 & 7 \\
5 & 2 & 5 & 6 & 6 & 6 & 6 & 6 & 7 & 7 \\
& 3 & 6 & 6 & 6 & 7 & 7 & 7 & 7 & 8 \\
\hline
& 1 & 7 & 7 & 7 & 7 & 7 & 8 & 8 & 9 \\
6 & 2 & 8 & 8 & 8 & 8 & 8 & 9 & 9 & 9 \\
& 3 & 9 & 9 & 9 & 9 & 9 & 9 & 9 & 9 \\
\hline
\end{tabular}}
\caption{Wrist and arms scores table}
\end{table}
\end{document}
which results in
Can you please make me this 2 tables 1st table 2nd tablealso as I need them urgently? Many Thanks for your kind consideration and assistance, I really appreciate it
12%20at%207.26.10%20PM.png
Best Answer
The
tabularx
package is good to fit a tabular to a specified width. Here it’s the current\linewidth
(→ Difference between \textwidth, \linewidth and \hsize).I guessed that the two most left columns should be twice as wide as the other ones. According to this I have set
\hsize
. (The sum of all\hsize
still have to be the number ofX
columns.)I have also reduced the horizontal space between columns:
With the
\cline{2-10}
you can specify a\hline
that only goes from the second to the tenth column.Code
Output