我正在运行此代码。它格式化第二页而不是第一页。我该如何将第一页调整为第二页。请帮忙!
\begin{supertabular}{|p{7.215em}|r|r|r|r|r|r|}
\toprule
\rowcolor[rgb]{ 1, .8, .565} \multicolumn{7}{|p{46.93em}|}{\textcolor[rgb]{ .188, .392, .376}{\textbf{State-wise Storage Capacity and Number of }}} \\
\rowcolor[rgb]{ 1, .8, .565} \multicolumn{7}{|p{46.93em}|}{\textcolor[rgb]{ .188, .392, .376}{\textbf{Godowns Available with FCI in India}}} \\
\rowcolor[rgb]{ 1, .8, .565} \multicolumn{7}{|p{46.93em}|}{\textcolor[rgb]{ .188, .392, .376}{\textbf{(As on 30.06.2009)}}} \\
\midrule
\rowcolor[rgb]{ .647, .89, .906} \textcolor[rgb]{ .188, .392, .376}{\textbf{States/UTs}} & \multicolumn{1}{p{8.93em}|}{\textcolor[rgb]{ .188, .392, .376}{\textbf{No. of Godowns (Covered)}}} & \multicolumn{1}{p{6.5em}|}{\textcolor[rgb]{ .188, .392, .376}{\textbf{Storage Capacity (Covered) (Fig. in Lakh MTs)}}} & \multicolumn{1}{p{7.5em}|}{\textcolor[rgb]{ .188, .392, .376}{\textbf{No. of Godowns (CAP)}}} & \multicolumn{1}{p{6.285em}|}{\textcolor[rgb]{ .188, .392, .376}{\textbf{Storage Capacity (CAP) (Fig. in Lakh MTs)}}} & \multicolumn{1}{p{5.715em}|}{\textcolor[rgb]{ .188, .392, .376}{\textbf{Total Number of Godowns (Covered and CAP (Provisional)}}} & \multicolumn{1}{p{4.785em}|}{\textcolor[rgb]{ .188, .392, .376}{\textbf{Total Capacity (Covered and CAP (Fig. in Lakh MTs)}}} \\
\midrule
Bihar & \cellcolor[rgb]{ 1, .847, .659}50 & 5.65 & \cellcolor[rgb]{ 1, .847, .659}3 & 0.43 & \cellcolor[rgb]{ 1, .847, .659}53 & 6.08 \\
\midrule
Jharkhand & \cellcolor[rgb]{ 1, .847, .659}19 & 1.16 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}19 & 1.16 \\
\midrule
Orissa & \cellcolor[rgb]{ 1, .847, .659}77 & 6.58 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}77 & 6.58 \\
\midrule
West Bengal & \cellcolor[rgb]{ 1, .847, .659}43 & 10.57 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}43 & 10.57 \\
\midrule
Sikkim & \cellcolor[rgb]{ 1, .847, .659}2 & 0.11 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}2 & 0.11 \\
\midrule
Assam & \cellcolor[rgb]{ 1, .847, .659}33 & 2.74 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}33 & 2.74 \\
\midrule
Arunachal Pradesh & \cellcolor[rgb]{ 1, .847, .659}10 & 0.21 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}10 & 0.21 \\
\midrule
Meghalaya & \cellcolor[rgb]{ 1, .847, .659}6 & 0.26 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}6 & 0.26 \\
\midrule
Mizoram & \cellcolor[rgb]{ 1, .847, .659}6 & 0.23 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}6 & 0.23 \\
\midrule
Tripura & \cellcolor[rgb]{ 1, .847, .659}7 & 0.49 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}7 & 0.49 \\
\midrule
Manipur & \cellcolor[rgb]{ 1, .847, .659}3 & 0.2 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}3 & 0.2 \\
\midrule
Nagaland & \cellcolor[rgb]{ 1, .847, .659}5 & 0.32 & \cellcolor[rgb]{ 1, .847, .659}0 & 0.32 & \cellcolor[rgb]{ 1, .847, .659}5 & 0.32 \\
\midrule
Delhi & \cellcolor[rgb]{ 1, .847, .659}6 & 3.36 & \cellcolor[rgb]{ 1, .847, .659}4 & 0.34 & \cellcolor[rgb]{ 1, .847, .659}10 & 3.4 \\
\midrule
Haryana & \cellcolor[rgb]{ 1, .847, .659}115 & 19.91 & \cellcolor[rgb]{ 1, .847, .659}30 & 3.28 & \cellcolor[rgb]{ 1, .847, .659}145 & 23.19 \\
\midrule
Himachal Pradesh & \cellcolor[rgb]{ 1, .847, .659}17 & 0.25 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}17 & 0.25 \\
\midrule
Jammu and Kashmir & \cellcolor[rgb]{ 1, .847, .659}26 & 1.29 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}26 & 1.29 \\
\midrule
Punjab & \cellcolor[rgb]{ 1, .847, .659}259 & 60.56 & \cellcolor[rgb]{ 1, .847, .659}113 & 9.89 & \cellcolor[rgb]{ 1, .847, .659}372 & 70.45 \\
\midrule
Chandigarh & \cellcolor[rgb]{ 1, .847, .659}11 & 1.06 & \cellcolor[rgb]{ 1, .847, .659}9 & 0.22 & \cellcolor[rgb]{ 1, .847, .659}20 & 1.28 \\
\midrule
Rajasthan & \cellcolor[rgb]{ 1, .847, .659}104 & 13.35 & \cellcolor[rgb]{ 1, .847, .659}21 & 3.22 & \cellcolor[rgb]{ 1, .847, .659}125 & 16.57 \\
\midrule
Uttar Pradesh & \cellcolor[rgb]{ 1, .847, .659}115 & 21.99 & \cellcolor[rgb]{ 1, .847, .659}30 & 4.89 & \cellcolor[rgb]{ 1, .847, .659}145 & 26.78 \\
\midrule
Uttranchal & \cellcolor[rgb]{ 1, .847, .659}20 & 2.07 & \cellcolor[rgb]{ 1, .847, .659}4 & 0.3 & \cellcolor[rgb]{ 1, .847, .659}24 & 2.37 \\
\midrule
Andhra Pradesh & \cellcolor[rgb]{ 1, .847, .659}168 & 34.48 & \cellcolor[rgb]{ 1, .847, .659}7 & 2.62 & \cellcolor[rgb]{ 1, .847, .659}175 & 37.1 \\
\midrule
Andaman and Nicobar Islands & \cellcolor[rgb]{ 1, .847, .659}1 & 0.07 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}1 & 0.07 \\
\midrule
Kerala & \cellcolor[rgb]{ 1, .847, .659}23 & 5.17 & \cellcolor[rgb]{ 1, .847, .659}5 & 0.2 & \cellcolor[rgb]{ 1, .847, .659}28 & 5.37 \\
\midrule
Karnataka & \cellcolor[rgb]{ 1, .847, .659}64 & 6.16 & \cellcolor[rgb]{ 1, .847, .659}9 & 1.36 & \cellcolor[rgb]{ 1, .847, .659}73 & 7.52 \\
\midrule
Tamil Nadu & \cellcolor[rgb]{ 1, .847, .659}28 & 9.04 & \cellcolor[rgb]{ 1, .847, .659}4 & 0.53 & \cellcolor[rgb]{ 1, .847, .659}32 & 9.57 \\
\midrule
Pondicherry & \cellcolor[rgb]{ 1, .847, .659}6 & 0.51 & \cellcolor[rgb]{ 1, .847, .659}2 & 0.05 & \cellcolor[rgb]{ 1, .847, .659}8 & 0.56 \\
\midrule
Gujarat & \cellcolor[rgb]{ 1, .847, .659}27 & 5.86 & \cellcolor[rgb]{ 1, .847, .659}6 & 0.27 & \cellcolor[rgb]{ 1, .847, .659}33 & 6.13 \\
\midrule
Maharashtra & \cellcolor[rgb]{ 1, .847, .659}67 & 17.19 & \cellcolor[rgb]{ 1, .847, .659}4 & 0.92 & \cellcolor[rgb]{ 1, .847, .659}71 & 18.11 \\
\midrule
Goa & \cellcolor[rgb]{ 1, .847, .659}1 & 0.15 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}1 & 0.15 \\
\midrule
Madhya Pradesh & \cellcolor[rgb]{ 1, .847, .659}121 & 8.39 & \cellcolor[rgb]{ 1, .847, .659}4 & 0.35 & \cellcolor[rgb]{ 1, .847, .659}125 & 8.74 \\
\midrule
Chhattisgarh & \cellcolor[rgb]{ 1, .847, .659}61 & 7.44 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}61 & 7.44 \\
\midrule
\textbf{India} & \cellcolor[rgb]{ 1, .847, .659}\textbf{1501} & \textbf{246.82} & \cellcolor[rgb]{ 1, .847, .659}\textbf{255} & \textbf{28.77} & \cellcolor[rgb]{ 1, .847, .659}\textbf{1756} & \textbf{275.59} \\
\bottomrule
\end{supertabular}%
提前致谢!
答案1
这是一个 MWE,它可以纠正您的代码,使表格自动适应当前文本宽度。
与原始代码相比的变化:
- 删除了
multicolumn
表格第一行多余的命令。 - 在和
A
包的帮助下引入了一种新的列类型。这些列的宽度是相对于当前的(等于在每列左右添加的填充, 等于垂直线的宽度)计算的。calc
ragged2e
linewidth
\tabcolsep
\arrayrulewidth
- 从切换
supertabular
到,longtable
因为前者似乎不允许计算列宽。
请注意,由于原始问题中没有指定文档类,我只是选择了一个可能不符合您的要求的文档类。
\documentclass{scrartcl}
\usepackage{booktabs}
\usepackage[table]{xcolor}
\usepackage{longtable}
\usepackage{calc}
\usepackage{ragged2e}
\newcolumntype{A}{>{\RaggedRight\arraybackslash}p{(\linewidth-7.215em-14\tabcolsep-(8\arrayrulewidth))/6}}
\begin{document}
\begin{longtable}{|p{7.215em}|r|r|r|r|r|r|}
\toprule
\rowcolor[rgb]{ 1, .8, .565} \multicolumn{7}{|p{\linewidth-2\tabcolsep-2\arrayrulewidth}|}{\textcolor[rgb]{ .188, .392, .376}{\textbf{State-wise Storage Capacity and Number of Godowns Available with FCI in India (As on 30.06.2009)}}} \\
\midrule
\rowcolor[rgb]{ .647, .89, .906} \textcolor[rgb]{ .188, .392, .376}{\textbf{States/UTs}} &
\multicolumn{1}{A|}{\textcolor[rgb]{ .188, .392, .376}{\textbf{No. of Godowns (Covered)}}} &
\multicolumn{1}{A|}{\textcolor[rgb]{ .188, .392, .376}{\textbf{Storage Capacity (Covered) (Fig. in Lakh MTs)}}} &
\multicolumn{1}{A|}{\textcolor[rgb]{ .188, .392, .376}{\textbf{No. of Godowns (CAP)}}} &
\multicolumn{1}{A|}{\textcolor[rgb]{ .188, .392, .376}{\textbf{Storage Capacity (CAP) (Fig. in Lakh MTs)}}} &
\multicolumn{1}{A|}{\textcolor[rgb]{ .188, .392, .376}{\textbf{Total Number of Godowns (Covered and CAP (Provisional)}}} &
\multicolumn{1}{A|}{\textcolor[rgb]{ .188, .392, .376}{\textbf{Total Capacity (Covered and CAP (Fig. in Lakh MTs)}}} \\
\midrule
Bihar & \cellcolor[rgb]{ 1, .847, .659}50 & 5.65 & \cellcolor[rgb]{ 1, .847, .659}3 & 0.43 & \cellcolor[rgb]{ 1, .847, .659}53 & 6.08 \\
\midrule
Jharkhand & \cellcolor[rgb]{ 1, .847, .659}19 & 1.16 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}19 & 1.16 \\
\midrule
Orissa & \cellcolor[rgb]{ 1, .847, .659}77 & 6.58 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}77 & 6.58 \\
\midrule
West Bengal & \cellcolor[rgb]{ 1, .847, .659}43 & 10.57 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}43 & 10.57 \\
\midrule
Sikkim & \cellcolor[rgb]{ 1, .847, .659}2 & 0.11 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}2 & 0.11 \\
\midrule
Assam & \cellcolor[rgb]{ 1, .847, .659}33 & 2.74 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}33 & 2.74 \\
\midrule
Arunachal Pradesh & \cellcolor[rgb]{ 1, .847, .659}10 & 0.21 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}10 & 0.21 \\
\midrule
Meghalaya & \cellcolor[rgb]{ 1, .847, .659}6 & 0.26 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}6 & 0.26 \\
\midrule
Mizoram & \cellcolor[rgb]{ 1, .847, .659}6 & 0.23 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}6 & 0.23 \\
\midrule
Tripura & \cellcolor[rgb]{ 1, .847, .659}7 & 0.49 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}7 & 0.49 \\
\midrule
Manipur & \cellcolor[rgb]{ 1, .847, .659}3 & 0.2 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}3 & 0.2 \\
\midrule
Nagaland & \cellcolor[rgb]{ 1, .847, .659}5 & 0.32 & \cellcolor[rgb]{ 1, .847, .659}0 & 0.32 & \cellcolor[rgb]{ 1, .847, .659}5 & 0.32 \\
\midrule
Delhi & \cellcolor[rgb]{ 1, .847, .659}6 & 3.36 & \cellcolor[rgb]{ 1, .847, .659}4 & 0.34 & \cellcolor[rgb]{ 1, .847, .659}10 & 3.4 \\
\midrule
Haryana & \cellcolor[rgb]{ 1, .847, .659}115 & 19.91 & \cellcolor[rgb]{ 1, .847, .659}30 & 3.28 & \cellcolor[rgb]{ 1, .847, .659}145 & 23.19 \\
\midrule
Himachal Pradesh & \cellcolor[rgb]{ 1, .847, .659}17 & 0.25 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}17 & 0.25 \\
\midrule
Jammu and Kashmir & \cellcolor[rgb]{ 1, .847, .659}26 & 1.29 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}26 & 1.29 \\
\midrule
Punjab & \cellcolor[rgb]{ 1, .847, .659}259 & 60.56 & \cellcolor[rgb]{ 1, .847, .659}113 & 9.89 & \cellcolor[rgb]{ 1, .847, .659}372 & 70.45 \\
\midrule
Chandigarh & \cellcolor[rgb]{ 1, .847, .659}11 & 1.06 & \cellcolor[rgb]{ 1, .847, .659}9 & 0.22 & \cellcolor[rgb]{ 1, .847, .659}20 & 1.28 \\
\midrule
Rajasthan & \cellcolor[rgb]{ 1, .847, .659}104 & 13.35 & \cellcolor[rgb]{ 1, .847, .659}21 & 3.22 & \cellcolor[rgb]{ 1, .847, .659}125 & 16.57 \\
\midrule
Uttar Pradesh & \cellcolor[rgb]{ 1, .847, .659}115 & 21.99 & \cellcolor[rgb]{ 1, .847, .659}30 & 4.89 & \cellcolor[rgb]{ 1, .847, .659}145 & 26.78 \\
\midrule
Uttranchal & \cellcolor[rgb]{ 1, .847, .659}20 & 2.07 & \cellcolor[rgb]{ 1, .847, .659}4 & 0.3 & \cellcolor[rgb]{ 1, .847, .659}24 & 2.37 \\
\midrule
Andhra Pradesh & \cellcolor[rgb]{ 1, .847, .659}168 & 34.48 & \cellcolor[rgb]{ 1, .847, .659}7 & 2.62 & \cellcolor[rgb]{ 1, .847, .659}175 & 37.1 \\
\midrule
Andaman and Nicobar Islands & \cellcolor[rgb]{ 1, .847, .659}1 & 0.07 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}1 & 0.07 \\
\midrule
Kerala & \cellcolor[rgb]{ 1, .847, .659}23 & 5.17 & \cellcolor[rgb]{ 1, .847, .659}5 & 0.2 & \cellcolor[rgb]{ 1, .847, .659}28 & 5.37 \\
\midrule
Karnataka & \cellcolor[rgb]{ 1, .847, .659}64 & 6.16 & \cellcolor[rgb]{ 1, .847, .659}9 & 1.36 & \cellcolor[rgb]{ 1, .847, .659}73 & 7.52 \\
\midrule
Tamil Nadu & \cellcolor[rgb]{ 1, .847, .659}28 & 9.04 & \cellcolor[rgb]{ 1, .847, .659}4 & 0.53 & \cellcolor[rgb]{ 1, .847, .659}32 & 9.57 \\
\midrule
Pondicherry & \cellcolor[rgb]{ 1, .847, .659}6 & 0.51 & \cellcolor[rgb]{ 1, .847, .659}2 & 0.05 & \cellcolor[rgb]{ 1, .847, .659}8 & 0.56 \\
\midrule
Gujarat & \cellcolor[rgb]{ 1, .847, .659}27 & 5.86 & \cellcolor[rgb]{ 1, .847, .659}6 & 0.27 & \cellcolor[rgb]{ 1, .847, .659}33 & 6.13 \\
\midrule
Maharashtra & \cellcolor[rgb]{ 1, .847, .659}67 & 17.19 & \cellcolor[rgb]{ 1, .847, .659}4 & 0.92 & \cellcolor[rgb]{ 1, .847, .659}71 & 18.11 \\
\midrule
Goa & \cellcolor[rgb]{ 1, .847, .659}1 & 0.15 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}1 & 0.15 \\
\midrule
Madhya Pradesh & \cellcolor[rgb]{ 1, .847, .659}121 & 8.39 & \cellcolor[rgb]{ 1, .847, .659}4 & 0.35 & \cellcolor[rgb]{ 1, .847, .659}125 & 8.74 \\
\midrule
Chhattisgarh & \cellcolor[rgb]{ 1, .847, .659}61 & 7.44 & \cellcolor[rgb]{ 1, .847, .659}0 & 0 & \cellcolor[rgb]{ 1, .847, .659}61 & 7.44 \\
\midrule
\textbf{India} & \cellcolor[rgb]{ 1, .847, .659}\textbf{1501} & \textbf{246.82} & \cellcolor[rgb]{ 1, .847, .659}\textbf{255} & \textbf{28.77} & \cellcolor[rgb]{ 1, .847, .659}\textbf{1756} & \textbf{275.59} \\
\bottomrule
\end{longtable}%
\end{document}
尽管表格水平适合页面,但仍然存在booktabs
与垂直规则(中断)和彩色单元格(周围有额外的空白)不兼容的问题。因此,我建议采用以下更简约的布局:
\documentclass{scrartcl}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{ragged2e}
\usepackage{threeparttablex}
\usepackage{calc}
\usepackage{etoolbox}
\robustify\bfseries
\newcolumntype{R}[1]{>{\RaggedRight\arraybackslash}m{#1}}
\newcolumntype{P}{>{\RaggedRight\arraybackslash}p{(\linewidth-2.2cm-14\tabcolsep)/6}}
\renewcommand{\arraystretch}{1.2}
\begin{document}
\begin{ThreePartTable}
\begin{TableNotes}
\item[*] Fig. in Lakh MTs
\end{TableNotes}
\begin{longtable}{R{2.2cm}
S[detect-weight,table-format=4]
S[detect-weight,table-format=3.2]
S[detect-weight,table-format=3]
S[detect-weight,table-format=2.2]
S[detect-weight,table-format=4]
S[detect-weight,table-format=3.2]}
\caption{State-wise Storage Capacity and Number of Godowns Available with FCI in India (As on 30.06.2009)}\\
\toprule
&
\multicolumn{2}{c}{Covered}&
\multicolumn{2}{c}{CAP}&
\multicolumn{2}{c}{Covered and CAP}\\
\cmidrule(lr){2-3} \cmidrule(lr){4-5} \cmidrule(lr){6-7}
States/UTs &
\multicolumn{1}{P}{No. of Godowns} &
\multicolumn{1}{P}{Storage Capacity\tnote{*}} &
\multicolumn{1}{P}{No. of Godowns} &
\multicolumn{1}{P}{Storage Capacity\tnote{*}} &
\multicolumn{1}{P}{Total No. of Godowns } &
\multicolumn{1}{P}{Total Capacity\tnote{*}} \\
\midrule
\endfirsthead%\\
\toprule
&
\multicolumn{2}{c}{Covered}&
\multicolumn{2}{c}{CAP}&
\multicolumn{2}{c}{Covered and CAP}\\
\cmidrule(lr){2-3} \cmidrule(lr){4-5} \cmidrule(lr){6-7}
States/UTs &
\multicolumn{1}{P}{No. of Godowns} &
\multicolumn{1}{P}{Storage Capacity\tnote{*}} &
\multicolumn{1}{P}{No. of Godowns} &
\multicolumn{1}{P}{Storage Capacity\tnote{*}} &
\multicolumn{1}{P}{Total No. of Godowns } &
\multicolumn{1}{P}{Total Capacity\tnote{*}} \\
\midrule
\endhead
\bottomrule
\insertTableNotes
\endfoot
Bihar & 50 & 5.65 & 3 & 0.43 & 53 & 6.08 \\
Jharkhand & 19 & 1.16 & 0 & 0 & 19 & 1.16 \\
Orissa & 77 & 6.58 & 0 & 0 & 77 & 6.58 \\
West Bengal & 43 & 10.57 & 0 & 0 & 43 & 10.57 \\
\midrule
Sikkim & 2 & 0.11 & 0 & 0 & 2 & 0.11 \\
Assam & 33 & 2.74 & 0 & 0 & 33 & 2.74 \\
Arunachal Pradesh & 10 & 0.21 & 0 & 0 & 10 & 0.21 \\
Meghalaya & 6 & 0.26 & 0 & 0 & 6 & 0.26 \\
\midrule
Mizoram & 6 & 0.23 & 0 & 0 & 6 & 0.23 \\
Tripura & 7 & 0.49 & 0 & 0 & 7 & 0.49 \\
Manipur & 3 & 0.2 & 0 & 0 & 3 & 0.2 \\
Nagaland & 5 & 0.32 & 0 & 0.32 & 5 & 0.32 \\
\midrule
Delhi & 6 & 3.36 & 4 & 0.34 & 10 & 3.4 \\
Haryana & 115 & 19.91 & 30 & 3.28 & 145 & 23.19 \\
Himachal Pradesh & 17 & 0.25 & 0 & 0 & 17 & 0.25 \\
Jammu and Kashmir & 26 & 1.29 & 0 & 0 & 26 & 1.29 \\
\midrule
Punjab & 259 & 60.56 & 113 & 9.89 & 372 & 70.45 \\
Chandigarh & 11 & 1.06 & 9 & 0.22 & 20 & 1.28 \\
Rajasthan & 104 & 13.35 & 21 & 3.22 & 125 & 16.57 \\
Uttar Pradesh & 115 & 21.99 & 30 & 4.89 & 145 & 26.78 \\
\midrule
Uttranchal & 20 & 2.07 & 4 & 0.3 & 24 & 2.37 \\
Andhra Pradesh & 168 & 34.48 & 7 & 2.62 & 175 & 37.1 \\
Andaman and Nicobar Islands & 1 & 0.07 & 0 & 0 & 1 & 0.07 \\
Kerala & 23 & 5.17 & 5 & 0.2 & 28 & 5.37 \\
\midrule
Karnataka & 64 & 6.16 & 9 & 1.36 & 73 & 7.52 \\
Tamil Nadu & 28 & 9.04 & 4 & 0.53 & 32 & 9.57 \\
Pondicherry & 6 & 0.51 & 2 & 0.05 & 8 & 0.56 \\
Gujarat & 27 & 5.86 & 6 & 0.27 & 33 & 6.13 \\
\midrule
Maharashtra & 67 & 17.19 & 4 & 0.92 & 71 & 18.11 \\
Goa & 1 & 0.15 & 0 & 0 & 1 & 0.15 \\
Madhya Pradesh & 121 & 8.39 & 4 & 0.35 & 125 & 8.74 \\
Chhattisgarh & 61 & 7.44 & 0 & 0 & 61 & 7.44 \\
\midrule
\bfseries India & \bfseries 1501 & \bfseries 246.82 & \bfseries 255 & \bfseries 28.77 & \bfseries 1756 & \bfseries 275.59 \\
\end{longtable}%
\end{ThreePartTable}
\end{document}
上述 MWE 包含以下额外变化:
- 删除所有颜色(单元格背景和文本)以及所有垂直线和大部分水平线。
- 添加了一些垂直空白(
\renewcommand{\arraystretch}{1.2}
)和一些水平线作为眼睛的引导。 - 使用该
siunitx
包将数字与小数分隔符对齐。 - 结合使用
etoolbox
命令和应用粗体数字对齐的选项。\robustify
detect-weight
- 为了避免表格标题行中的信息重复,我将这些信息移到了第二行,并用 隔开
\cmidrules
。 \tnote
从threeparttablex
包中与ThreePartTable
环境和命令一起使用\insertTableNotes
以进一步缩短表头行。- 用 替换第一个
\multicolumn
命令\caption
。 - 使用包中的
\endhead
和命令,我在第二页重复了标题行,并在第一页和第二页的表格底部插入了脚注。\endfoot
longtable
- ...