0

I don't use LaTeX that often, and I'm currently trying to reformat a paper that I originally wrote over a year ago. The new format specification has tighter margins than the the old, so I have this

\begin{table}[h!]
\scriptsize
\centering
\caption{Performance Summary}
\label{PerfSummary}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\cline{1-4} \cline{6-9}
\multicolumn{3}{|c|}{Method} & \multicolumn{1}{l|}{Average} & \multicolumn{1}{l|}{} & \multicolumn{3}{c|}{Method} & \multicolumn{1}{l|}{Maximum} \\ \cline{1-4} \cline{6-9} 
Triage++ & Reactive & $\alpha_{++}$ Begins High & 10.21 &  & Triage++ & Schedule & $\alpha_{++}$ Begins High & 10.94 \\ \cline{1-4} \cline{6-9} 
Triage++ & Schedule & $\alpha_{++}$ Begins High & 10.05 &  & Triage++ & Fixed $\alpha_{++}$ &  & 10.7 \\ \cline{1-4} \cline{6-9} 
Triage++ & Fixed $\alpha_{++}$ &  & 9.81 &  & Triage++ & Reactive & $\alpha_{++}$ Begins High & 10.68 \\ \cline{1-4} \cline{6-9} 
Triage++ & Schedule & $\alpha_{++}$ Begins Low & 9.46 &  & Triage++ & Schedule & $\alpha_{++}$ Begins Low & 10.49 \\ \cline{1-4} \cline{6-9} 
Triage+ & Reactive & $\alpha_{+}$ Begins Low & 9.35 &  & Triage+ & Fixed $\alpha_{+}$ &  & 10.11 \\ \cline{1-4} \cline{6-9} 
Triage++ & Reactive & $\alpha_{++}$ Begins Low & 8.27 &  & Triage+ & Reactive & $\alpha_{+}$ Begins Low & 9.92 \\ \cline{1-4} \cline{6-9} 
Triage+ & Schedule & $\alpha_{+}$ Begins Low & 6.23 &  & Triage+ & Schedule & $\alpha_{+}$ Begins Low & 9.83 \\ \cline{1-4} \cline{6-9} 
Triage+ & Schedule & $\alpha_{+}$ Begins High & 5.56 &  & Triage+ & Schedule & $\alpha_{+}$ Begins High & 9.74 \\ \cline{1-4} \cline{6-9} 
Triage+ & Fixed $\alpha_{+}$ &  & 4.6 &  & Triage++ & Reactive & $\alpha_{++}$ Begins Low & 9.14 \\ \cline{1-4} \cline{6-9} 
Triage+ & Reactive & $\alpha_{+}$ Begins High & 1.3 &  & Triage+ & Reactive & $\alpha_{+}$ Begins High & 2.38 \\ \cline{1-4} \cline{6-9} 
\end{tabular}
\end{table}

Which produces this table

enter image description here

Which you can see is now too wide. I'd like to "stack" the two portions within a single table but am not sure how to go about that. Alternatively I could separate them into two tables with distinct numbers...I can handle that.

So I guess I'm asking for a) aesthetic advice, do you think they read better as unique tables or "stacked" and b) how to stack them, if necessary....

  • 4
    I would recommend: 1. Create two tables, one on top of the other (two tabulars in a single table environment). 2. Use the booktabs package and eliminate all the horizontal and vertical lines, except the one under the title line. Also, while code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. – Peter Grill Mar 21 '17 at 0:33
2

As Peter suggested, the tables look better when you remove the rules. Using booktabs, the table(s) will turn out better looking :-)

I have used the data you have given and made it into two tabulars withing a single table.

\documentclass[11pt]{article}
%
\usepackage{siunitx}
\usepackage{booktabs}

\begin{document}

\begin{table}[h!]
\scriptsize
\centering
\caption{Performance Summary}
\label{PerfSummary}
\begin{tabular}{lllS}
\toprule
\multicolumn{3}{c}{Method} & \multicolumn{1}{l}{Average}          \\
\midrule
  Triage++ & Reactive            & $\alpha_{++}$ Begins High & 10.21 \\
  Triage++ & Schedule            & $\alpha_{++}$ Begins High & 10.05 \\
  Triage++ & Fixed $\alpha_{++}$ &                           & 9.81  \\
  Triage++ & Schedule            & $\alpha_{++}$ Begins Low  & 9.46  \\
  Triage+  & Reactive            & $\alpha_{+}$ Begins Low   & 9.35  \\
  Triage++ & Reactive            & $\alpha_{++}$ Begins Low  & 8.27  \\
  Triage+  & Schedule            & $\alpha_{+}$ Begins Low   & 6.23  \\
  Triage+  & Schedule            & $\alpha_{+}$ Begins High  & 5.56  \\
  Triage+  & Fixed $\alpha_{+}$  &                           & 4.6   \\
  Triage+  & Reactive            & $\alpha_{+}$ Begins High  & 1.3   \\
\bottomrule
\end{tabular}

\bigskip
\begin{tabular}{lllS}
\toprule
\multicolumn{3}{c}{Method} & \multicolumn{1}{l}{Maximum}          \\
\midrule
  Triage++ & Schedule            & $\alpha_{++}$ Begins High & 10.94 \\
  Triage++ & Fixed $\alpha_{++}$ &                           & 10.7 \\ 
  Triage++ & Reactive            & $\alpha_{++}$ Begins High & 10.68 \\
  Triage++ & Schedule            & $\alpha_{++}$ Begins Low  & 10.49 \\
  Triage+  & Fixed $\alpha_{+}$  &                           & 10.11 \\
  Triage+  & Reactive            & $\alpha_{+}$ Begins Low   & 9.92 \\ 
  Triage+  & Schedule            & $\alpha_{+}$ Begins Low   & 9.83 \\ 
  Triage+  & Schedule            & $\alpha_{+}$ Begins High  & 9.74 \\ 
  Triage++ & Reactive            & $\alpha_{++}$ Begins Low  & 9.14 \\ 
  Triage+  & Reactive            & $\alpha_{+}$ Begins High  & 2.38 \\ 
\bottomrule
\end{tabular}

\end{table}

\end{document}

The output is as shown below: enter image description here

1

Your two tables can fit on a single horizontal block if you use geometry, which defines more sensible margins if you don't have marginal notes. You even can use footnote size. I use theS` columntype for the numeracil column s, to have an alignment on the decimal dot:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{array, caption, booktabs, siunitx}
\usepackage[showframe]{geometry}

\begin{document}

\begin{table}[h!]
  \footnotesize
  \setlength{\tabcolsep}{4pt}\captionsetup{font =footnotesize}
  \centering\sisetup{table-format =2.2, table-number-alignment=center}
  \caption{Performance Summary}
  \label{PerfSummary}
  \begin{tabular}{lllSclllS}
    \cmidrule[\heavyrulewidth]{1-4} \cmidrule[\heavyrulewidth]{6-9}
    \cmidrule(lr){1-3} \cmidrule(lr){4-4}\cmidrule(lr){6-8}\cmidrule(lr){9-9}
    \multicolumn{3}{c}{Method} &{Average} & & \multicolumn{3}{c}{Method} & {Maximum} \\
    \cmidrule(lr){1-3} \cmidrule{4-4}\cmidrule(lr){6-8}\cmidrule{9-9}
    Triage++ & Reactive & $\alpha_{++}$ Begins High & 10.21 & & Triage++ & Schedule & $\alpha_{++}$ Begins High & 10.94 \\
    Triage++ & Schedule & $\alpha_{++}$ Begins High & 10.05 & & Triage++ & Fixed $\alpha_{++}$ & & 10.7 \\
    Triage++ & Fixed $\alpha_{++}$ & & 9.81 & & Triage++ & Reactive & $\alpha_{++}$ Begins High & 10.68 \\
    Triage++ & Schedule & $\alpha_{++}$ Begins Low & 9.46 & & Triage++ & Schedule & $\alpha_{++}$ Begins Low & 10.49 \\
    Triage+ & Reactive & $\alpha_{+}$ Begins Low & 9.35 & & Triage+ & Fixed $\alpha_{+}$ & & 10.11 \\
    Triage++ & Reactive & $\alpha_{++}$ Begins Low & 8.27 & & Triage+ & Reactive & $\alpha_{+}$ Begins Low & 9.92 \\
    Triage+ & Schedule & $\alpha_{+}$ Begins Low & 6.23 & & Triage+ & Schedule & $\alpha_{+}$ Begins Low & 9.83 \\
    Triage+ & Schedule & $\alpha_{+}$ Begins High & 5.56 & & Triage+ & Schedule & $\alpha_{+}$ Begins High & 9.74 \\
    Triage+ & Fixed $\alpha_{+}$ & & 4.6 & & Triage++ & Reactive & $\alpha_{++}$ Begins Low & 9.14 \\
    Triage+ & Reactive & $\alpha_{+}$ Begins High & 1.3 & & Triage+ & Reactive & $\alpha_{+}$ Begins High & 2.38 \\
    \cmidrule[\heavyrulewidth]{1-4} \cmidrule[\heavyrulewidth]{6-9}
  \end{tabular}
\end{table}

\end{document} 

enter image description here

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.