表格格式幫助(以破折號為中心)

表格格式幫助(以破折號為中心)

我對這張桌子的外觀不滿意:

在此輸入影像描述

我認為第一列條目中的破折號應該是垂直對齊。我不喜歡第二列中整數百分比後面的額外空間,但又不想將它們全部保留.0

我對美學和技術修復持開放態度。也許第二列的標題應該是Marginal Tax Rate (\%)

微量元素:

\documentclass{article}

\usepackage{booktabs}
\usepackage{siunitx}

\begin{document}
\begin{tabular}{cS[table-format=2.1]}
\toprule
Bracket & {Marginal Tax Rate} \\ 
\midrule
\$0  -  \$9,075 & 10\% \\
\$9,075  -  \$36,900 & 15\% \\
\$36,900  -  \$89,350  & 25\% \\
\$89,350  -  \$186,350 & 28\% \\
\$186,350  -  \$405,100  & 33\% \\
\$405,100 - \$406,750 & 35\%  \\
\$406,750+ & 39.6\%  \\
\bottomrule
\end{tabular}

\end{document}

答案1

在此輸入影像描述

\documentclass{article}

\usepackage{booktabs}
\usepackage{siunitx}

\begin{document}
\begin{tabular}{r@{--}lS[table-format=2.1]}
\toprule
\multicolumn{2}{c}{Bracket (\$)} & {Marginal Tax Rate (\%)} \\ 
\midrule
0  &  9,075 & 10 \\
9,075  &  36,900 & 15 \\
36,900  &  89,350  & 25 \\
89,350  &  186,350 & 28 \\
186,350  &  405,100  & 33 \\
405,100 & 406,750 & 35  \\
\multicolumn{1}{r@{+}}{406,750} && 39.6  \\
\bottomrule
\end{tabular}

\end{document}

或者可能--根據口味在周圍留一些額外的空間。

相關內容