3
\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}%
3
  • reducing the font size tofit this table on a page will make it pretty much unreadable. I suggest to split it in multiple tables, on below the other Commented Dec 17, 2018 at 13:43
  • Unrelated to the question: I suggest to have a look at the siunitx package. It would allow you to align your numbers by their decimal marker. Commented Dec 17, 2018 at 13:44
  • better change the orientation to landscape
    – Samjith
    Commented Dec 17, 2018 at 13:47

2 Answers 2

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}

enter image description here

3
  • 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
    Commented Dec 17, 2018 at 14:02
  • @thymaro I place them all in the same table environment, 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.) Commented Dec 17, 2018 at 14:04
  • Ahh, yes, didn't look through the code closely. Of course, that solves it.
    – thymaro
    Commented Dec 17, 2018 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

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .