0
\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}

enter image description here

As you can see the column's headings does not fit to the table. What should I fix to solve this issue?

1
  • With \multirow it's not at all clear what rows the two items in the first column refer to. If they were aligned with the first referenced row, it would be much clearer.
    – egreg
    Dec 1, 2016 at 20:47

1 Answer 1

3

Is is this you want?

\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} 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .