\begin{table}
\setlength\tabcolsep{0pt}
\caption{\textbf{Organizational Association}}
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
1
*{2}{S[table-format=2.0]
S[table-format=2.2]
S[table-format=2.0]}
}
\toprule
\multicolumn{1}{c}{\textbf{} }
& \multicolumn{2}{c}{\textbf{Jagatsinghpur}}
& \multicolumn{2}{c}{\textbf{Baripada} } \\
\cmidrule{2-3}\cmidrule{4-5}
& {{BJD}}
& {{Congress}}
& {{BJD}}
& {{BJP}}
\\
\midrule
\midrule
1-4 Year& 3.9 &12.7& 16.7& 8.9\\
5-10 Year &18.9& 21.1& 42.2& 32.2\\
11-15 year& 22.8 &24.4 &20 &24.4\\
16- 20 year& 54.4& 41.8 &21.1& 34.4\\
\midrule
\midrule
\end{tabular*}
\\
{\raggedright \textit{Note: f= Figure in parentheses are in percentage.} \par}
{\raggedright \textit{ N= 90 From each party .} \par}
\end{table}
答案1
除了修復明顯的拼字錯誤(使用l
(“ell”)而不是1
(“one”)作為左對齊列的符號)以及用作S[table-format=2.1]
所有四個資料列的公共列類型之外,您可能還需要在第一列的字串中使用短破折號而不是短破折號。
單獨評論:你似乎很喜歡使用粗體字和斜體“裝飾”桌子的各種元素。我的建議是:不要過度。事實上,一定要考慮從桌子上去掉這兩種類型的裝飾——你會驚訝地發現桌子看起來更加精簡和吸引人。
\documentclass{article}
\usepackage{booktabs,siunitx}
\usepackage[textfont=bf,skip=0.333\baselineskip]{caption}
\begin{document}
\begin{table}
\setlength\tabcolsep{0pt}
\caption{Organizational Association}
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}} l *{4}{S[table-format=2.1]} }
\toprule
& \multicolumn{2}{c}{\textbf{Jagatsinghpur}}
& \multicolumn{2}{c@{}}{\textbf{Baripada}} \\
\cmidrule{2-3}\cmidrule{4-5}
& {BJD} & {Congress} & {BJD} & {BJP} \\
\midrule
1--4 year & 3.9 & 12.7 & 16.7 & 8.9 \\
5--10 year & 18.9 & 21.1 & 42.2 & 32.2 \\
11--15 year & 22.8 & 24.4 & 20 & 24.4 \\
16--20 year & 54.4 & 41.8 & 21.1 & 34.4 \\
\bottomrule
\end{tabular*}
\medskip
\textit{Note: Figures in parentheses are in percentage.} \par
\textit{$N= 90$ from each party.}
\end{table}
\end{document}