我遇到了一点问题,我的表有点大,我使用了命令
\resizebox{\columnwidth}{!}
为了使其适合纸张,但这会导致行高不正确,那么我该如何解决这个问题呢?
这是代码
\begin{table}[H]
\caption{Reduct size}
\resizebox{\columnwidth}{!}{
\centering
\begin{tabular}{|l|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
Data&\multicolumn{6}{c|}{NRB}&\multicolumn{3}{c|} {PCA}&Correlation&Consistency&MrMr\\
\cline{2-11}
&\multicolumn{3}{c|}{$\delta = $0.1}&\multicolumn{3}{c|}{$\delta = $0.2}&$variance = $0.75&$variance = $0.85&$variance = $0.95&&&\\
\cline{2-7}
&$\epsilon = $0.2&$\epsilon = $0.4&$\epsilon = $0.6&$\epsilon = $0.2&$\epsilon = $0.4&$\epsilon = $0.6&&&&&&\\\hline
Horse&8(2)&9(3)&8(2)&13(5)&13(5)&8(2)&13(5)&17(6)&23(7)&3(1)&10(4)&3(1)\\
\hline
Ionosphere&10(4)&8(3)&1(1)&12(6)&11(5)&1(1)&11(5)&17(9)&26(10)&14(7)&5(2)&16(8)\\\hline
Band&6(2)&5(1)&12(5)&6(2)&12(5)&14(7)&10(4)&13(6)&15(8)&5(1)&9(3)&9(3)\\
\hline
Australian&4(1)&4(1)&4(1)&4(1)&4(1)&4(1)&9(3)&11(4)&13(5)&7(2)&9(3)&7(2)\\
\hline
Hepatitis&8(4)&6(3)&4(1)&9(5)&6(3)&4(1)&9(5)&12(6)&16(7)&4(1)&5(2)&9(5)\\\hline
Credit&11(4)&11(4)&11(4)&13(5)&15(6)&11(4)&9(2)&11(4)&13(5)&7(1)&10(3)&7(1)\\\hline
Wine&7(5)&5(3)&1(1)&6(4)&2(2)&2(2)&5(3)&8(6)&10(7)&8(6)&8(6)&13(7)\\\hline
Anneal&33(9)&31(8)&6(1)&33(9)&29(7)&6(1)&15(4)&19(5)&24(6)&6(1)&8(2)&10(3)\\\hline
Arrhythmia&3(1)&4(2)&5(3)&3(1)&4(2)&12(6)&57(9)&82(10)&130(11)&20(7)&20(7)&21(8)\\\hline
Echocardiogram&1(1)&1(1)&1(1)&1(1)&1(1)&1(1)&7(5)&8(6)&10(7)&4(3)&3(2)&5(4)\\\hline
Diabetic&16(6)&17(7)&13(5)&19(8)&19(8)&13(5)&5(1)&7(3)&9(4)&6(2)&9(4)&6(2)\\
\hline
\end{tabular}
}
\label{tab:subset_trad}
\end{table}
答案1
无需应用缩放,只需选择合适的字体大小,而且由于数学模式使用不一致,= 周围的间距也不正确
\arraystretch
您可以使用或像这里使用array
包一样增加行大小\extrarowheight
。
\documentclass[a4paper,dvipsnames]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx,color,caption}
\usepackage{array}
\usepackage[left=2cm,right=2cm,top=1.5cm,bottom=1.5cm]{geometry}
\captionsetup{justification=centering}
\begin{document}
\begin{table}
\caption{Reduct size}
\setlength\tabcolsep{3pt}
\setlength\extrarowheight{2pt}
\centering\footnotesize
\begin{tabular}{@{}|l|c|c|c|c|c|c|c|c|c|c|c|c|@{}}
\hline
Data&\multicolumn{6}{c|}{NRB}&\multicolumn{3}{c|} {PCA}&Correlation&Consistency&MrMr\\
\cline{2-11}
&\multicolumn{3}{c|}{$\delta = 0.1$}&
\multicolumn{3}{c|}{$\delta = 0.2$}&
\multicolumn{3}{c|}{variance}&&&\\
\cline{2-10}
&$\epsilon = 0.2$&$\epsilon = 0.4$&$\epsilon = 0.6$&$\epsilon = 0.2$&$\epsilon = 0.4$&$\epsilon = 0.6$&
0.75&0.85&0.95&&&\\\hline
Horse&8(2)&9(3)&8(2)&13(5)&13(5)&8(2)&13(5)&17(6)&23(7)&3(1)&10(4)&3(1)\\
\hline
Ionosphere&10(4)&8(3)&1(1)&12(6)&11(5)&1(1)&11(5)&17(9)&26(10)&14(7)&5(2)&16(8)\\\hline
Band&6(2)&5(1)&12(5)&6(2)&12(5)&14(7)&10(4)&13(6)&15(8)&5(1)&9(3)&9(3)\\
\hline
Australian&4(1)&4(1)&4(1)&4(1)&4(1)&4(1)&9(3)&11(4)&13(5)&7(2)&9(3)&7(2)\\
\hline
Hepatitis&8(4)&6(3)&4(1)&9(5)&6(3)&4(1)&9(5)&12(6)&16(7)&4(1)&5(2)&9(5)\\\hline
Credit&11(4)&11(4)&11(4)&13(5)&15(6)&11(4)&9(2)&11(4)&13(5)&7(1)&10(3)&7(1)\\\hline
Wine&7(5)&5(3)&1(1)&6(4)&2(2)&2(2)&5(3)&8(6)&10(7)&8(6)&8(6)&13(7)\\\hline
Anneal&33(9)&31(8)&6(1)&33(9)&29(7)&6(1)&15(4)&19(5)&24(6)&6(1)&8(2)&10(3)\\\hline
Arrhythmia&3(1)&4(2)&5(3)&3(1)&4(2)&12(6)&57(9)&82(10)&130(11)&20(7)&20(7)&21(8)\\\hline
Echocardiogram&1(1)&1(1)&1(1)&1(1)&1(1)&1(1)&7(5)&8(6)&10(7)&4(3)&3(2)&5(4)\\\hline
Diabetic&16(6)&17(7)&13(5)&19(8)&19(8)&13(5)&5(1)&7(3)&9(4)&6(2)&9(4)&6(2)\\
\hline
\end{tabular}
\label{tab:subset_trad}
\end{table}
\end{document}