![删除 siunitx 表格中小数点前的“0”](https://linux22.com/image/403416/%E5%88%A0%E9%99%A4%20siunitx%20%E8%A1%A8%E6%A0%BC%E4%B8%AD%E5%B0%8F%E6%95%B0%E7%82%B9%E5%89%8D%E7%9A%84%E2%80%9C0%E2%80%9D.png)
使用“siunitx”包删除表格中小数点前的“0”,请参考突出显示的部分以及我的 MWE 文件,如下所示:
\documentclass{article}
\usepackage{booktabs}
\usepackage{siunitx}
\begin{document}
\begin{table}
\centering
\begin{tabular}{@{}S[table-format=1.2,group-four-digits=false,
round-integer-to-decimal=false,]
*{4}{S[table-format=2.2]}
*{2}{S[table-format=3.2]}@{}}
\toprule
$\varphi$ & a & $\xi$ & $\alpha$ & $\beta$ & ${\dot{W}}^{M1}$ & ${\dot{W}}^{M2}$ \\
\midrule
{Abcde} & .00 & .48 & .02 & .17 & 250.00 & 250.00 \\
.10 & .50 & .21 & .82 & .39 & 236.86 & 236.72000 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
答案1
在上一栏的帮助add-integer-zero=false
和校正下:table-format
\documentclass{article}
\usepackage{booktabs}
\usepackage{siunitx}
\begin{document}
\begin{table}
\centering
\sisetup{add-integer-zero=false}
\begin{tabular}{@{}S[table-format=1.2]
*{4}{S[table-format=2.2]}
S[table-format=3.2]
S[table-format=3.5]@{}}
\toprule
$\varphi$ & a & $\xi$ & $\alpha$ & $\beta$ & ${\dot{W}}^{M1}$ & ${\dot{W}}^{M2}$ \\
\midrule
{Abcde} & .00 & .48 & .02 & .17 & 250.00 & 250.00 \\
.10 & .50 & .21 & .82 & .39 & 236.86 & 236.72000 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}