1

I provided the source code and screenshot of the table I am trying to generate. The table is very wide, and I'm constrained to pretty wide horizontal margins. So I'm considering transposing the table. I am wondering if there is an easy way to do this? I have many of these tables, and it would take me a very long time to go through all of them.

Source code:

\begin{table}[hbt!]
\centering
\begin{tabular}{lrrrrrrrrrr}
    \hline
    \hline
    &\multicolumn{2}{c}{\textbf{Nominal}}&\multicolumn{2}{c}{\textbf{1.20}}&\multicolumn{2}{c}{\textbf{SG Case 1}}&\multicolumn{2}{c}{\textbf{SG Case 2}}&\multicolumn{2}{c}{\textbf{SG Case 4}}
    \\\cmidrule(r){2-3}\cmidrule(r){4-5}\cmidrule(r){6-7}\cmidrule(r){8-9}\cmidrule(r){10-11}
    &H&T&H&T&H&T&H&T&H&T\\\midrule
    0.1in.& 1.4e-03 & 1.6e-03 & 
    3.4e-05 & 1.0e-04 &
    7.2e-05 & 1.6e-04 &
    5.6e-05 & 1.3e-04 &
    4.4e-05 & 1.1e-04
\\
    0.3in.& 3.1e-04 & 1.3e-03 &
    5.0e-04 & 8.8e-04 &
    4.7e-04 & 1.1e-03 &
    5.1e-04 & 1.1e-03 &
    5.3e-04 & 1.0e-03
\\
    0.4in.& 3.1e-04 & 1.5e-03 &
    9.1e-04 & 1.4e-03 &
    8.4e-04 & 1.6e-03 &
    9.1e-04 & 1.7e-03 &
    9.6e-04 & 1.6e-03
\\
\hline
\hline
\end{tabular}
\end{table}

enter image description here

1 Answers1

0

If you remove repeated information, you can quite easily reduce the table significantly. With this approach, the table should easily fit into the quite narrow textwidth of a standard article.

enter image description here

\documentclass{article}
\usepackage{booktabs}
\begin{document}

\begin{table}[hbt!] \centering \begin{tabular}{lrrrrrrrrrr} \toprule & & & & & \multicolumn{6}{c}{\textbf{SG Case}}\ \cmidrule{6-11} &\multicolumn{2}{c}{\textbf{Nominal}}&\multicolumn{2}{c}{\textbf{1.20}}&\multicolumn{2}{c}{\textbf{1}}&\multicolumn{2}{c}{\textbf{2}}&\multicolumn{2}{c}{\textbf{4}} \\cmidrule(r){2-3}\cmidrule(r){4-5}\cmidrule(r){6-7}\cmidrule(r){8-9}\cmidrule(r){10-11} &H&T&H&T&H&T&H&T&H&T\ & e-04 & e-03 & e-05 & e-04 & e-05 & e-04 & e-05 & e-04 & e-05 & e-04\ \midrule 0.1in.& 14 & 1.6 & 3.4 & 1.0 & 7.2 & 1.6 & 5.6 & 1.3 & 4.4 & 1.1 \ 0.3in.& 3.1 & 1.3 & 50 & 88 & 47 & 11 & 51 & 11 & 53 & 1.0 \ 0.4in.& 3.1 & 1.5 & 91 & 14 & 84 & 16 & 91 & 17 & 96 & 16 \ \bottomrule \end{tabular} \end{table}

\end{document}

leandriis
  • 62,593