4

I want to increase the spacing between columns in two places. There should be some more space between the DIRINT and DISC columnset and between the DISC and Erbs columnset, to make the table more readable. The difference between DIRINT MBE and DISC MAE is smaller than between DISC MAE and DISC MBE. The difference should be bigger.

enter image description here

My code is:

\documentclass[11pt, twoside, a4paper]{report}
\usepackage[inner = 30mm, outer = 20mm,  top = 30mm, bottom = 20mm, headheight = 13.6pt]{geometry}
\usepackage[pdfpagelayout=TwoPageRight]{hyperref}
\usepackage{booktabs, siunitx}

\begin{document}

\begin{table}[h]
\centering
\caption{MAE and MBE for 48 irradiance transposition pathways}
\label{tab:MAE MBE results}
\begin{tabular}{l*{6}{S[table-format=2.2]}}
    \toprule
                                           &                     \multicolumn{6}{c}{Transposition models}                     \\
    \cmidrule(l){2-7}                      & \multicolumn{2}{c}{DIRINT} & \multicolumn{2}{c}{DISC} & \multicolumn{2}{c}{Erbs} \\ \cmidrule(l){2-3} \cmidrule(l){4-5} \cmidrule(l){6-7}
    Decomposition models                   & {MAE} & {MBE}              & {MAE} & {MBE}            & {MAE} & {MBE}            \\ \midrule
    Reindl                                 & \color{green!40!black}8.11& 0.22               & 16.79 & 6.10             & 21.79 & 3.16             \\
    Hay \& Davies                          & \color{green!40!black}8.11  & \color{green!40!black}0.12               & 16.75 & 5.99             & 21.75 & 3.06             \\
    Perez: Albuquerque   1988              & 8.33  & 1.47               & 17.39 & 7.30             & 23.34 & 4.10             \\
    Perez: Phoenix 1988                    & 8.34  & 1.54               & 17.39 & 7.37             & 23.22 & 4.29             \\ \addlinespace
    Perez: Sandia composite 1988           & 8.39  & 1.86               & 17.38 & 7.69             & 23.16 & 4.64             \\
    King                                   & 8.41  & \color{green!40!black}0.02               & 16.75 & 5.82             & 20.52 & 2.64             \\
    Perez: Cape Canaveral 1988             & 8.50  & 2.37               & 17.55 & 8.23             & 22.53 & 5.09             \\
    Perez: USA composite 1988              & 8.51  & 2.89               & 17.51 & 8.77             & 22.98 & 5.67             \\\addlinespace
    Perez: Osage 1988                      & 8.55  & 1.28               & 17.87 & 7.12             & \color{red!50!black}24.03 & 4.25             \\
    Perez: All sites composite 1990        & 8.58  & 3.48               & 17.61 & 9.40             & 22.79 & 6.35             \\
    Isotropic sky                          & 8.59  & -2.85              & 16.20 & 2.95             & 20.70 & -0.23            \\
    Perez: Albany 1988                     & 8.65  & 3.62               & 17.54 & 9.50             & 22.72 & 6.38             \\\addlinespace
    Perez: Elmonte 1988                    & 8.65  & 2.48               & 17.61 & 8.29             & 23.26 & 5.18             \\
    Perez: All sites composite 1988        & 8.74  & 3.80               & 17.79 & 9.69             & 23.06 & 6.57             \\
    Perez: France 1988                     & 9.23  & 5.16               & 18.17 & 11.06            & 23.02 & 7.93             \\
    Klucher                                & 10.38 & 8.63               & 20.02 &  \color{red!50!black}14.43            & \color{red!50!black}23.53 &  \color{red!50!black}11.25            \\ \midrule
    \multicolumn{1}{r}{Absolute averages} & 8.63  & 2.61             & 17.52 & 8.11           & 22.65 & 5.05           \\ \bottomrule
\end{tabular}
\end{table}

I can't split the {l*{6}{S[table-format=2.2]}} so that I can add some spacing.

5

Is this like you want? I added the caption package to have a decent vertical spacing between caption and table.

\documentclass[11pt, twoside, a4paper]{report}
\usepackage[inner = 30mm, outer = 20mm, top = 30mm, bottom = 20mm, headheight = 13.6pt, showframe]{geometry}
\usepackage{booktabs, caption, siunitx}
\usepackage[pdfpagelayout=TwoPageRight]{hyperref}

\begin{document}

\begin{table}[h]
\centering
\sisetup{table-format=2.2}
\caption{MAE and MBE for 48 irradiance transposition pathways}
\label{tab:MAE MBE results}
\begin{tabular}{lSS!{\qquad}SS!{\qquad}SS}
    \toprule
                                           & \multicolumn{6}{c}{Transposition models} \\
    \cmidrule(l){2-7} & \multicolumn{2}{c}{DIRINT\hspace*{1.75em}} & \multicolumn{2}{c}{DISC\hspace*{1.75em}} & \multicolumn{2}{c}{Erbs} \\
     \cmidrule(lr{2.4em}){2-3} \cmidrule(lr{2.4em}){4-5} \cmidrule(l){6-7}
    Decomposition models & {MAE} & {MBE} & {MAE} & {MBE} & {MAE} & {MBE} \\ \midrule
    Reindl & \color{green!40!black}8.11& 0.22 & 16.79 & 6.10 & 21.79 & 3.16 \\
    Hay \& Davies & \color{green!40!black}8.11 & \color{green!40!black}0.12 & 16.75 & 5.99 & 21.75 & 3.06 \\
    Perez: Albuquerque 1988 & 8.33 & 1.47 & 17.39 & 7.30 & 23.34 & 4.10 \\
    Perez: Phoenix 1988 & 8.34 & 1.54 & 17.39 & 7.37 & 23.22 & 4.29 \\ \addlinespace
    Perez: Sandia composite 1988 & 8.39 & 1.86 & 17.38 & 7.69 & 23.16 & 4.64 \\
    King & 8.41 & \color{green!40!black}0.02 & 16.75 & 5.82 & 20.52 & 2.64 \\
    Perez: Cape Canaveral 1988 & 8.50 & 2.37 & 17.55 & 8.23 & 22.53 & 5.09 \\
    Perez: USA composite 1988 & 8.51 & 2.89 & 17.51 & 8.77 & 22.98 & 5.67 \\\addlinespace
    Perez: Osage 1988 & 8.55 & 1.28 & 17.87 & 7.12 & \color{red!50!black}24.03 & 4.25 \\
    Perez: All sites composite 1990 & 8.58 & 3.48 & 17.61 & 9.40 & 22.79 & 6.35 \\
    Isotropic sky & 8.59 & -2.85 & 16.20 & 2.95 & 20.70 & -0.23 \\
    Perez: Albany 1988 & 8.65 & 3.62 & 17.54 & 9.50 & 22.72 & 6.38 \\\addlinespace
    Perez: Elmonte 1988 & 8.65 & 2.48 & 17.61 & 8.29 & 23.26 & 5.18 \\
    Perez: All sites composite 1988 & 8.74 & 3.80 & 17.79 & 9.69 & 23.06 & 6.57 \\
    Perez: France 1988 & 9.23 & 5.16 & 18.17 & 11.06 & 23.02 & 7.93 \\
    Klucher & 10.38 & 8.63 & 20.02 & \color{red!50!black}14.43 & \color{red!50!black}23.53 & \color{red!50!black}11.25 \\ \midrule
    \multicolumn{1}{r}{Absolute averages} & 8.63 & 2.61 & 17.52 & 8.11 & 22.65 & 5.05 \\ \bottomrule
\end{tabular}
\end{table}

\end{document} 

enter image description here

|improve this answer|||||
  • May I know why ! should be put before {\qquad} to make it work? – Diaa Dec 21 '19 at 20:05
  • 1
    It is meant to replace | (vertical rule between columns), so the normal spacing between columns is still there, and a space of 2em is added. If you prefer to use `@{\qquad}, the spacing between columns will be replaced with a spacing of 2em. Of course, you choose what you prefer, but anyway, the groups of columns should be made visible in a way or another, in my opinion, for a better legibility of the table. – Bernard Dec 21 '19 at 21:09
  • Thanks for the help. If you don't mind, I would be grateful if you could take a look at my two last asked questions: this and this. – Diaa Dec 21 '19 at 21:20

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.