1
\documentclass[a4paper,12pt]{report}

\usepackage{graphicx,rotating}
\usepackage{multirow}
\usepackage{siunitx,booktabs}%for table decimals number
\sisetup{separate-uncertainty}%
\usepackage[export]{adjustbox}


\usepackage[left=3.5cm,right=3.0cm,top=3.0cm,bottom=4cm,headheight=1cm]{geometry}
\usepackage{wrapfig} 
\usepackage{nccmath}
\usepackage{tabularx,ragged2e,booktabs,caption}
\usepackage[section]{placeins}
\usepackage[textfont=normalfont]{subcaption}
\usepackage{url}
\urlstyle{same}
\newcommand\apj{1925ApJ....61...38R}  % Journal abbreviations 
\addtolength{\topmargin}{.25in}  %topmargin control

\begin{document}

\begin{table}
\begin{tabular}{>{}l 
                *{2}S[table-format=-1.2(2)] 
                *{2}S[table-format=-5.0] } 
\toprule & {$\textbf{Resonance 1}$} &{$\textbf{Resonance 4}$} & {$\textbf{Resonance 1}$} &{$\textbf{Resonance 4}$}\\
    \cmidrule(lr){2-2} \cmidrule(lr){3-3}  \cmidrule(lr){4-4}  \cmidrule(lr){5-5}
  {\textbf{Approach}} & $\boldsymbol{\beta}$ & $\boldsymbol{\beta}$ & $\boldsymbol{\chi^{2}}$ &$\boldsymbol{\chi^{2}}$ \\
   \midrule
1   & -0.31(9)          & 1.99(60)      & 475       & 11681\\
2   & -0.30(16)         & 2.00(35)      & 1453      & 8946\\
3   &  0.94(19)         & 2.00(63)      & -8289     & 13691\\
4   & -0.93(24)         & 2.00(36)      & -14394    & 8102\\ 
\bottomrule
\end{tabular}
  \caption[]{}
\end{table}

\end{document}
1

This solution focuses more on how the information is organized in the table. If the author intends to show the values of β and χ² in cases of Resonance 1 and 4 using four approaches, then the first table below seems appropriate. If, on the other hand, the author intends to show that two different cases of Resonance are being studied and lists the obtained parameters (β and χ²) using different approaches, then the second table seems appropriate.

enter image description here

\documentclass[a4paper,12pt]{report}
\usepackage[left=3.5cm,right=3.0cm,top=3.0cm,bottom=4cm,headheight=1cm]{geometry}
\usepackage{nccmath}
\usepackage{tabularx,ragged2e,booktabs,caption}

\usepackage[tight-spacing=true]{siunitx} %<--- added
\sisetup{separate-uncertainty}%
\begin{document}

\begin{table}\centering
    \begin{tabularx}{\textwidth}{X
                    S[table-format=-1.2(2)]
                    S[table-format= 1.2(2)]
                    S[table-format=-5.0]
                    S[table-format= 5.0]} 
    \toprule & \multicolumn{2}{c}{$\boldsymbol{\beta}$} & \multicolumn{2}{c}{$\boldsymbol{\chi^{2}}$} \\
    \cmidrule(lr){2-3}  \cmidrule(lr){4-5}
    {\textbf{Approach}} & {\textbf{Resonance 1}} &{\textbf{Resonance 4}} & {\textbf{Resonance 1}} & {\textbf{Resonance 4}} \\
    \midrule
    1   & -0.31(9)          & 1.99(60)      & 475       & 11681\\
    2   & -0.30(16)         & 2.00(35)      & 1453      & 8946\\
    3   &  0.94(19)         & 2.00(63)      & -8289     & 13691\\
    4   & -0.93(24)         & 2.00(36)      & -14394    & 8102\\ 
    \bottomrule
    \end{tabularx}
    \caption{Combine $\beta$ and $\chi^2$.}
\end{table}
%
\begin{table}[h]\centering
    \begin{tabular}{l
                    S[table-format=-1.2(2)]
                    S[table-format=-5.0]
                    S[table-format= 1.2(2)]                 
                    S[table-format= 5.0]} 
    \toprule & \multicolumn{2}{c}{\textbf{Resonance 1}} & \multicolumn{2}{c}{\textbf{Resonance 4}} \\
    \cmidrule(lr){2-3}  \cmidrule(lr){4-5}
    {\textbf{Approach}} & {$\boldsymbol{\beta}$} &{$\boldsymbol{\chi^{2}}$} & {$\boldsymbol{\beta}$}& {$\boldsymbol{\chi^{2}}$} \\
    \midrule
    1   & -0.31(9)      & 475        & 1.99(60)     & 11681 \\
    2   & -0.30(16)     & 1453       & 2.00(35)     & 8946  \\
    3   &  0.94(19)     & -8289      & 2.00(63)     & 13691 \\
    4   & -0.93(24)     & -14394     & 2.00(36)     & 8102  \\ 
    \bottomrule
    \end{tabular}
    \caption{Combining Resonance 1 and Resonance 4}
\end{table}

\end{document}
1

It seems the main problem came from the default table-number-alignment, which is center-decimal-marker. Setting it to center solves the problem. To exactly fit matrgins, the best is to use tabularx, and change the first column specifier to X:

\documentclass[a4paper,12pt]{report}

\usepackage{graphicx,rotating}
\usepackage{multirow}
\usepackage{siunitx,booktabs}%for table decimals number
\sisetup{separate-uncertainty}%
\usepackage[export]{adjustbox}


\usepackage[left=3.5cm,right=3.0cm,top=3.0cm,bottom=4cm,headheight=1cm, showframe]{geometry}
\usepackage{wrapfig}
\usepackage{nccmath}
\usepackage{tabularx,ragged2e,booktabs,caption}
\usepackage[section]{placeins}
\usepackage[textfont=normalfont]{subcaption}
\usepackage{url}
\urlstyle{same}
\newcommand\apj{1925ApJ....61...38R} % Journal abbreviations
\addtolength{\topmargin}{.25in} %topmargin control

\begin{document}

\begin{table}
  \sisetup{table-number-alignment=center}
  \begin{tabularx}{\linewidth}{X
    S[table-format=-1.2(2)]S[table-format=1.2(2)]
    *{2}{S[table-format=-5.0]}}
    \toprule & {\textbf{Resonance 1}} & {\textbf{Resonance 4}} & {\textbf{Resonance 1}} & {\textbf{Resonance 4}} \\
    \cmidrule(lr){2-2} \cmidrule(lr){3-3} \cmidrule(lr){4-4} \cmidrule(lr){5-5}
    {\textbf{Approach}} & $\boldsymbol{β}$ & $\boldsymbol{β}$ & $\boldsymbol{\chi^{2}}$ & $\boldsymbol{\chi^{2}}$ \\
    \midrule
    1 & -3.31(09) & 1.99(60) & 475 & 11681 \\
    2 & -0.30(16) & 2.00(35) & 1453 & 8946 \\
    3 & 0.94(19) & 2.00(63) & -8289 & 13691 \\
    4 & -0.93(24) & 2.00(36) & -14394 & 8102 \\
    \bottomrule
  \end{tabularx}
  \caption[]{}
\end{table}

\end{document}

enter image description here

0

enter image description here

I only slightly change column definition and add curly braces to all column headers. MWE load only necessary packages:

\documentclass[a4paper,12pt]{report}
\usepackage[left=3.5cm,right=3.0cm,
            top=3.0cm,bottom=4cm,headheight=1cm]{geometry}

\usepackage{siunitx}%for table decimals number
\usepackage{nccmath}
\usepackage{booktabs, multirow, tabularx}
\usepackage{caption}

\begin{document}

\begin{table}
\sisetup{separate-uncertainty,
         group-four-digits}%

\begin{tabular}{l
                S[table-format=-1.2(2)]
                S[table-format= 1.2(2)]
                S[table-format=-5.0]
                S[table-format= 5.0] }
\toprule 
    &   {\textbf{Resonance 1}}
        &   {\textbf{Resonance 4}}
            &   {\textbf{Resonance 1}}
                &   {\textbf{Resonance 4}}\\
    \cmidrule(lr){2-2} \cmidrule(lr){3-3}
    \cmidrule(lr){4-4} \cmidrule(lr){5-5}
\textbf{Approach} 
    &   {$\boldsymbol{\beta}$} 
        &   {$\boldsymbol{\beta}$} 
            &   {$\boldsymbol{\chi^{2}}$} 
                &   {$\boldsymbol{\chi^{2}}$}   \\
   \midrule
1   & -0.31(9)          & 1.99(60)      & 475       & 11681\\
2   & -0.30(16)         & 2.00(35)      & 1453      & 8946\\
3   &  0.94(19)         & 2.00(63)      & -8289     & 13691\\
4   & -0.93(24)         & 2.00(36)      & -14394    & 8102\\
\bottomrule
\end{tabular}
  \caption[$\beta$ and $\chi^{2}$ parameters values measured in this work for $Mg^{+}$ 3s in the $hv$ range between 54.50 and 55.52 eV]{The $\beta$ and $\chi^{2}$ parameters values measured in this work for $Mg^{+}$ 3s.}\label{table:betaSCALEFACTOR}
\end{table}

\end{document}
0

An alternative could be the following modifications.

  • You can use the tabularx package to set the a \textwidth table. It also provides the X column type( fills rest of the table space).

  • With the option [tight-spacing = true] you will get tighter spacing. See siunitx package doc­u­men­ta­tion 5.6 Printing numbers p.28.

[tight-spacing = true]: Under some circumstances is may be desirable to ‘squeeze’ the output spacing. This is turned on using the tight-spacing switch, which compresses spacing where possible.

  • To reduce/increase the spaces between columns in a table set \tabcolsep to 0.4em/0.6em with \setlength{\tabcolsep}{0.6em}. (Default value is printed with \the\tabcolsep)

  • showframe package : \usepackage{showframe} makes page margins visible.

enter image description here

MWE:

\documentclass[a4paper,12pt]{report}
\usepackage[left=3.5cm,right=3.0cm,top=3.0cm,bottom=4cm,headheight=1cm]{geometry}
\usepackage{nccmath}
\usepackage{tabularx,ragged2e,booktabs,caption}

\usepackage{showframe} %<--- added
\usepackage[tight-spacing=true]{siunitx} %<--- added
\sisetup{separate-uncertainty}%
\setlength{\tabcolsep}{0.6em} %<--- added
\begin{document}
\begin{table}
\begin{tabularx}{\textwidth}{>{}X
                S[table-format=-1.2(2)]
                S[table-format= 1.2(2)]
                S[table-format=-5.0]
                S[table-format= 5.0]} 
\toprule & {$\textbf{Resonance 1}$} &{$\textbf{Resonance 4}$} & {$\textbf{Resonance 1}$} &{$\textbf{Resonance 4}$}\\
    \cmidrule(lr){2-2} \cmidrule(lr){3-3}  \cmidrule(lr){4-4}  \cmidrule(lr){5-5}
  {\textbf{Approach}} & $\boldsymbol{\beta}$ & $\boldsymbol{\beta}$ & $\boldsymbol{\chi^{2}}$ &$\boldsymbol{\chi^{2}}$ \\
   \midrule
1   & -0.31(9)          & 1.99(60)      & 475       & 11681\\
2   & -0.30(16)         & 2.00(35)      & 1453      & 8946\\
3   &  0.94(19)         & 2.00(63)      & -8289     & 13691\\
4   & -0.93(24)         & 2.00(36)      & -14394    & 8102\\ 
\bottomrule
\end{tabularx}
  \caption[]{}
\end{table}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.