如何调整 siunitx 包中的列宽?

如何调整 siunitx 包中的列宽?
\documentclass[5p,times,sort&compress]{elsarticle}
\usepackage{amsmath,amssymb}
\usepackage{multirow, graphicx}
\usepackage{float}

\usepackage{array}
\usepackage{booktabs}
\usepackage{threeparttable}
\usepackage[input-ignore={,},input-decimal-markers={.},group-separator={,}]{siunitx}

\usepackage{caption}
\captionsetup[table]{labelfont=bf,labelsep=newline,skip=.1cm}
\captionsetup{labelsep=space,justification=justified,singlelinecheck=off}

\newcommand{\expo}[1]{$^{#1}$}
\newcommand{\indic}[1]{$_{#1}$}

\begin{document}

\begin{table*}[!t]
\begin{threeparttable}
\caption{Experimental and calculated crystal-field energy levels}
    \begin{tabular*}{\textwidth}{
        l@{\extracolsep{\fill}}
        l
        S[table-format=5.0]
        S[table-format=5.0]
        S[table-format=5.0]
        S[table-format=5.0]
        }
        \toprule
        \multirow{2}*{Multiplet} & \multirow{2}*{Stark energy levels} & %
        \multicolumn{3}{c}{Experimental Values} & \text{Calculated values} \\
        \cmidrule{3-6}
         & & \text{Matrix host name epilayers} & \text{Matrix host name Nanorods} & \text{Matrix host name} \\
        \midrule
        \multirow{3}*{\expo{2}F\indic{5/2}} & F\indic{7} & 10,000 & 10,000 & 10,000 & 10,000 \\
         & F\indic{6} & 10,000 & 10,000 & 10,000 & 10,000 \\
         & F\indic{5} & 10,000 & 10,000 & 10,000 & 10,000 \\
        \multirow{4}*{\expo{2}F\indic{7/2}} & F\indic{4} & 333 & 333 & 333 & 333 \\
         & F\indic{3} & 111 & 111 & 111 & 111 \\
         & F\indic{2} & 222 & 222 & 222 & 222 \\
         & F\indic{1} & 0 & 0 & 0 & 0 \\
        \bottomrule
    \end{tabular*}
\end{threeparttable}
\end{table*}

\end{document}

在此处输入图片描述

如您所见,列标题与表格不匹配。我应该如何修复此问题?

答案1

这是你想要的嗎?

\documentclass[5p,times,sort&compress]{elsarticle}
\usepackage{amsmath,amssymb}
\usepackage{multirow, graphicx}
\usepackage{float}

\usepackage{showframe} %
\renewcommand\ShowFrameLinethickness{0.3pt}%
\usepackage{makecell}%
\usepackage{array}
\usepackage{booktabs}
\usepackage{threeparttable}
\usepackage[input-ignore={,},input-decimal-markers={.},group-separator={,}]{siunitx}

\usepackage{caption}
\captionsetup[table]{labelfont=bf,labelsep=newline,skip=.1cm}
\captionsetup{labelsep=space,justification=justified,singlelinecheck=off}

\newcommand{\expo}[1]{$^{#1}$}
\newcommand{\indic}[1]{$_{#1}$}

\begin{document}

\begin{table*}[!t]
\begin{threeparttable}
\caption{Experimental and calculated crystal-field energy levels}
    \begin{tabular*}{\textwidth}{
        l@{\extracolsep{\fill}}
       c
        S[table-format=5.0]
        S[table-format=5.0]
        S[table-format=5.0]
        S[table-format=5.0]
        }
        \toprule
        \multirow{3}*{Multiplet} & \multirowcell{3}{Stark\\ energy levels} & %
        \multicolumn{3}{c}{Experimental Values} & \text{Calculated values} \\
        \cmidrule{3-5}\cmidrule{6-6}
         & & {\makecell{Matrix host name\\ epilayers}} & {\makecell{Matrix host name\\ Nanorods}} & \text{Matrix host name} \\
        \midrule
        \multirow{3}*{\expo{2}F\indic{5/2}} & F\indic{7} & 10,000 & 10,000 & 10,000 & 10,000 \\
         & F\indic{6} & 10,000 & 10,000 & 10,000 & 10,000 \\
         & F\indic{5} & 10,000 & 10,000 & 10,000 & 10,000 \\
        \multirow{4}*{\expo{2}F\indic{7/2}} & F\indic{4} & 333 & 333 & 333 & 333 \\
         & F\indic{3} & 111 & 111 & 111 & 111 \\
         & F\indic{2} & 222 & 222 & 222 & 222 \\
         & F\indic{1} & 0 & 0 & 0 & 0 \\
        \bottomrule
    \end{tabular*}
\end{threeparttable}
\end{table*}

\end{document} 

在此处输入图片描述

相关内容