4

I have a pretty ugly table that I would like to format nicely. I have seen in LaTeX table cell with a diagonal line and 2 sub cells how I can include \slashbox and in Parametrize shading in table through TikZ how I can colour code a table. However, this makes the table look pretty ugly. How can I turn my current table into something as nice and professional looking as Vertical table lines are discontinuous with booktabs, while also implementing conditional formatting?

EDIT:

I now have a nice table thanks to Mico, but I have decided to merge two tables into one. I'm trying to get another multicolumn below DIRINT, DISC and Erbs like so:enter image description here

Edit edit: Fixed it!

6

I doubt that making a table look gaudy -- say, by assigning dominant, bright colors to the table cells -- actually makes the table more readable, as opposed to just making it stand out visually. Providing more structure to the header material and providing some kind of visual rhythm to the body of the table should be at least as successful.

enter image description here

\documentclass{article}
\usepackage{booktabs,siunitx}
\sisetup{output-decimal-marker={,}}
\begin{document}

\begin{table}[h]
\centering
\caption{MAE for 48 irradiance transposition pathways}
\label{tab:MAE results}
\begin{tabular}{@{} l *{3}{S[table-format=2.2]} @{}}
    \toprule
    Decomposition & \multicolumn{3}{c@{}}{Transposition} \\
    \cmidrule(l){2-4}
    & {DIRINT} &  {DISC} &  {Erbs}   \\
    \midrule
    Reindl                  &   8,11 & 16,79 & 21,79   \\
    Hay \& Davies           &   8,11 & 16,75 & 21,75   \\
    P. Albuquerque   1988   &   8,33 & 17,39 & 23,34   \\
    P. Phoenix 1988         &   8,34 & 17,39 & 23,22   \\
    P. Sandia composite 1988&   8,39 & 17,38 & 23,16   \\ \addlinespace
    King                    &   8,41 & 16,75 & 20,52   \\
    P. Cape Canaveral 1988  &   8,50 & 17,55 & 22,53   \\
    P. USA composite 1988   &   8,51 & 17,51 & 22,98   \\
    P. Osage 1988           &   8,55 & 17,87 & 24,03   \\
    P. All sites composite 1990&8,58 & 17,61 & 22,79   \\ \addlinespace
    Isotropic sky           &   8,59 & 16,20 & 20,70   \\
    P. Albany 1988          &   8,65 & 17,54 & 22,72   \\
    P. Elmonte 1988         &   8,65 & 17,61 & 23,26   \\
    P. All sites composite 1988&8,74 & 17,79 & 23,06   \\
    P. France 1988          &   9,23 & 18,17 & 23,02   \\ \addlinespace
    Klucher                 &  10,38 & 20,02 & 23,53   \\
    \midrule
    \multicolumn{1}{r}{Column averages} 
                            &   8,63 & 17,52 & 22,65   \\
    \bottomrule
\end{tabular}
\end{table}
\end{document} 
  • Thanks for your answer and your excellent choice of words. I wanted to highlight the highest and lowest values, but I think I will just use \textcolor for that. Thanks a lot! – Hans Jun 22 '18 at 9:25

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.