\begin{table}[htbp]
\scriptsize
\centering
\caption{Table}
\begin{tabular}{ccccccccccccccccccccc}
\toprule
\multirow{2}{*}{Status} & \multicolumn{2}{c}{Jan} & \multicolumn{2}{c}{Feb} & \multicolumn{2}{c}{Mar} & \multicolumn{2}{c}{Apr} & \multicolumn{2}{c}{Jun} & \multicolumn{2}{c}{Jul} & \multicolumn{2}{c}{Aug} & \multicolumn{2}{c}{Sep} & \multicolumn{2}{c}{Oct} \\
\cmidrule(r){2-3}\cmidrule(r){4-5}\cmidrule(r){6-7}\cmidrule(r){8-9}\cmidrule(r){10-11}\cmidrule(r){12-13}\cmidrule(r){14-15}\cmidrule(r){16-17}\cmidrule(r){18-19}\cmidrule(r){20-21}
& CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) \\
\midrule
A & 3516 & 14.88 & 2270 & 14.17 & 2605 & 15.40 & 3668 & 15.53 & 3277 & 15.21 & 2917 & 15.30 & 4444 & 14.40 & 3321 & 13.87 & 2704 & 14.41 & 4441 & 0.13376 \\
A & 1 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 7 & 0.03 & 11 & 0.06 & 38 & 0.12 & 30 & 0.13 & 325 & 1.73 & 5056 & 0.15228 \\
A & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 1 & 0.01 & 7 & 0.02 & 8 & 0.03 & 1 & 0.01 & 8 & 0.00024 \\
A & 20115 & 85.12 & 13753 & 85.83 & 14306 & 84.58 & 19947 & 84.45 & 18245 & 84.71 & 16116 & 84.54 & 26301 & 85.21 & 20465 & 85.49 & 15569 & 82.96 & 23233 & 0.69975 \\
A & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 4 & 0.02 & 5 & 0.02 & 6 & 0.03 & 20 & 0.11 & 148 & 0.00446 \\
A & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 3 & 0.01 & 1 & 0.01 & 4 & 0.01 & 9 & 0.04 & 30 & 0.16 & 73 & 0.0022 \\
A & 0 & 0.00 & 0 & 0.00 & 3 & 0.02 & 4 & 0.02 & 7 & 0.03 & 14 & 0.07 & 67 & 0.22 & 100 & 0.42 & 118 & 0.63 & 243 & 0.00732 \\
\bottomrule
\end{tabular}%
\end{table}%
Asked
Active
Viewed 1,452 times
3
AboAmmar
- 46,352
- 4
- 58
- 127
Xinyuan Wei
- 33
2 Answers
3
My suggestion would be to not make the font size unreadable small, but to continue the table in the next line:
\documentclass{article}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{tabularx}
\begin{document}
\begin{table}[htbp]
%\small
\centering
\caption{Table}
\begin{tabularx}{\linewidth}{@{}XXXXXXXXX@{}}
\toprule
\multirow{2}{*}{Status} & \multicolumn{2}{c}{Jan} & \multicolumn{2}{c}{Feb} & \multicolumn{2}{c}{Mar} & \multicolumn{2}{c}{Apr}\\ \cmidrule(r){2-3}\cmidrule(r){4-5}\cmidrule(r){6-7}\cmidrule(r){8-9}
& CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) \\
\midrule
A & 3516 & 14.88 & 2270 & 14.17 & 2605 & 15.40 & 3668 & 15.53\\
A & 1 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 \\
A & 1 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 \\
A & 1 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 \\
A & 1 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 \\
A & 1 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 \\
\bottomrule
\end{tabularx}%
\bigskip
\begin{tabularx}{\linewidth}{@{}XXXXXXXXXX@{}}
\toprule
\multicolumn{2}{c}{Mai} & \multicolumn{2}{c}{Jun} & \multicolumn{2}{c}{Jul} & \multicolumn{2}{c}{Aug} & \multicolumn{2}{c}{Sep}\\ \cmidrule(r){1-2}\cmidrule(r){3-4}\cmidrule(r){5-6}\cmidrule(r){7-8}\cmidrule(r){9-10}
CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%)\\
\midrule
3516 & 14.88 & 2270 & 14.17 & 2605 & 15.40 & 3668 & 15.53& 3668 & 15.53\\
1 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00\\
1 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00\\
1 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00\\
1 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00\\
\bottomrule
\end{tabularx}%
\end{table}%
\end{document}
samcarter_is_at_topanswers.xyz
- 158,329
-
how do you make sure that the two tables stay right next to each other? wouldn't this design be subject to being split apart by LaTeX's placement choices? e.g. when the upper half fits before a page break, but not the whole construct. – thymaro Dec 17 '18 at 14:02
-
@thymaro I place them all in the same
tableenvironment, so no splitting will take place. Worst case will be that all tables will together end up on the next page. (but this could also happen to the "monster" table from the question.) – samcarter_is_at_topanswers.xyz Dec 17 '18 at 14:04 -
Ahh, yes, didn't look through the code closely. Of course, that solves it. – thymaro Dec 17 '18 at 14:14
1
\begin{table}[htbp]
\scriptsize
\centering
\caption{Table}
\resizebox{\columnwidth}{!}{
\begin{adjustbox}{angle=55}
\begin{tabular}{ccccccccccccccccccccc}
\toprule
\multirow{2}{*}{Status} & \multicolumn{2}{c}{Jan} & \multicolumn{2}{c}{Feb} & \multicolumn{2}{c}{Mar} & \multicolumn{2}{c}{Apr} & \multicolumn{2}{c}{Jun} & \multicolumn{2}{c}{Jul} & \multicolumn{2}{c}{Aug} & \multicolumn{2}{c}{Sep} & \multicolumn{2}{c}{Oct} \\
\cmidrule(r){2-3}\cmidrule(r){4-5}\cmidrule(r){6-7}\cmidrule(r){8-9}\cmidrule(r){10-11}\cmidrule(r){12-13}\cmidrule(r){14-15}\cmidrule(r){16-17}\cmidrule(r){18-19}\cmidrule(r){20-21}
& CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) & CNT & PCT (\%) \\
\midrule
A & 3516 & 14.88 & 2270 & 14.17 & 2605 & 15.40 & 3668 & 15.53 & 3277 & 15.21 & 2917 & 15.30 & 4444 & 14.40 & 3321 & 13.87 & 2704 & 14.41 & 4441 & 0.13376 \\
A & 1 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 7 & 0.03 & 11 & 0.06 & 38 & 0.12 & 30 & 0.13 & 325 & 1.73 & 5056 & 0.15228 \\
A & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 1 & 0.01 & 7 & 0.02 & 8 & 0.03 & 1 & 0.01 & 8 & 0.00024 \\
A & 20115 & 85.12 & 13753 & 85.83 & 14306 & 84.58 & 19947 & 84.45 & 18245 & 84.71 & 16116 & 84.54 & 26301 & 85.21 & 20465 & 85.49 & 15569 & 82.96 & 23233 & 0.69975 \\
A & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 4 & 0.02 & 5 & 0.02 & 6 & 0.03 & 20 & 0.11 & 148 & 0.00446 \\
A & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 0 & 0.00 & 3 & 0.01 & 1 & 0.01 & 4 & 0.01 & 9 & 0.04 & 30 & 0.16 & 73 & 0.0022 \\
A & 0 & 0.00 & 0 & 0.00 & 3 & 0.02 & 4 & 0.02 & 7 & 0.03 & 14 & 0.07 & 67 & 0.22 & 100 & 0.42 & 118 & 0.63 & 243 & 0.00732 \\
\bottomrule
\end{tabular}%
\end{adjustbox}}
\end{table}
You can resize it using \resizebox{<width>}{<height>} from the graphics package.
\usepackage{adjustbox} used to rotate table
Samjith
- 490
-
1Please don't use
\resizeboxfor elements that contain text. This will result in a suboptimal choice of character shapes, see also https://tex.stackexchange.com/questions/425453/why-not-scale-elements-that-contain-text – samcarter_is_at_topanswers.xyz Dec 17 '18 at 14:05

siunitxpackage. It would allow you to align your numbers by their decimal marker. – samcarter_is_at_topanswers.xyz Dec 17 '18 at 13:44