1

I have looked around to find examples of title and a wide table in landscape mode without using sidewaystable. The table I compile needs to be resizes, so I use \footnotesize. However, the resizing causes the table to move to a new page.

\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{lscape}
\usepackage{booktabs}

\begin{document}
\begin{landscape}
\section{Introduction}
\begin{table}[ht]
\centering
\footnotesize
\caption{Descriptive Statistics - All Davis Cup Groups}\label{desc_davis_all}
\begin{tabular}{lrrrrr|rrrrr|rrrrr} \toprule
& \multicolumn{5}{c}{Favorite's team Lagging} & \multicolumn{5}{c}{Favorite's team Even} & \multicolumn{5}{c}{Favorite's team Leading}\\
\cmidrule{2-6} \cmidrule{7-11} \cmidrule{12-16}
 & Count & Min & Max & Mean & Stdev & Count & Min & Max & Mean & Stdev & Count & Min & Max & Mean & Stdev \\
\midrule
Total Obs. & 646 & 0 & 0 & 0 & 0 & 1037 & 0 & 0 & 0 & 0 & 764 & 0 & 0 & 0 & 0 \\ 
  Treatment Dummy & 343 & 0 & 1 & 0.531 & 0.499 & 563 & 0 & 1 & 0.543 & 0.498 & 425 & 0 & 1 & 0.556 & 0.497 \\ 
  \\
  \textit{Davis Cup Groups} &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  \\ 
  World Group & 233 & 0 & 1 & 0.361 & 0.481 & 370 & 0 & 1 & 0.357 & 0.479 & 258 & 0 & 1 & 0.338 & 0.473 \\ 
  Group 1 & 188 & 0 & 1 & 0.291 & 0.455 & 323 & 0 & 1 & 0.311 & 0.463 & 241 & 0 & 1 & 0.315 & 0.465 \\ 
  Group 2 & 225 & 0 & 1 & 0.348 & 0.477 & 344 & 0 & 1 & 0.332 & 0.471 & 265 & 0 & 1 & 0.347 & 0.476 \\ 
  \\
  \textit{Tournament Rounds} &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  \\ 
  Round of 16 & 80 & 0 & 1 & 0.124 & 0.33 & 126 & 0 & 1 & 0.122 & 0.327 & 84 & 0 & 1 & 0.11 & 0.313 \\ 
  Quarter Finals & 131 & 0 & 1 & 0.203 & 0.402 & 209 & 0 & 1 & 0.202 & 0.401 & 157 & 0 & 1 & 0.205 & 0.404 \\ 
  Semi Finals & 149 & 0 & 1 & 0.231 & 0.422 & 232 & 0 & 1 & 0.224 & 0.417 & 160 & 0 & 1 & 0.209 & 0.407 \\ 
  Finals & 100 & 0 & 1 & 0.155 & 0.362 & 186 & 0 & 1 & 0.179 & 0.384 & 150 & 0 & 1 & 0.196 & 0.397 \\ 
  Playoffs & 149 & 0 & 1 & 0.231 & 0.422 & 230 & 0 & 1 & 0.222 & 0.416 & 180 & 0 & 1 & 0.236 & 0.425 \\ 
  Playoffs - Round 2 & 37 & 0 & 1 & 0.057 & 0.233 & 54 & 0 & 1 & 0.052 & 0.222 & 33 & 0 & 1 & 0.043 & 0.203 \\ 
  \\
  \textit{Favorite \& Underdog} &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  \\ 
  Favorite wins & 440 & 0 & 1 & 0.681 & 0.466 & 768 & 0 & 1 & 0.741 & 0.439 & 615 & 0 & 1 & 0.805 & 0.396 \\ 
  Favorite Log Rank & 3964.02 & 0 & 10.576 & 6.136 & 2.259 & 6680.796 & 0 & 10.727 & 6.442 & 2.14 & 4639.54 & 0 & 10.886 & 6.073 & 2.315 \\ 
  Favorite Head 2 Head & 428 & 0 & 17 & 0.663 & 1.413 & 515 & 0 & 9 & 0.497 & 1.024 & 489 & 0 & 12 & 0.64 & 1.306 \\ 
  Favorite Home Adv. & 282 & 0 & 1 & 0.437 & 0.496 & 530 & 0 & 1 & 0.511 & 0.5 & 451 & 0 & 1 & 0.59 & 0.492 \\ 
  Underdog Log Rank & 4959.01 & 2.322 & 10.937 & 7.676 & 1.845 & 8430.42 & 3.17 & 11.037 & 8.13 & 1.621 & 6050.523 & 1.585 & 10.979 & 7.92 & 1.806 \\ 
  Underdog Head 2 Head & 296 & 0 & 8 & 0.458 & 0.995 & 364 & 0 & 6 & 0.351 & 0.817 & 258 & 0 & 5 & 0.338 & 0.77 \\ 
  Underdog Home Adv. & 364 & 0 & 1 & 0.563 & 0.496 & 507 & 0 & 1 & 0.489 & 0.5 & 313 & 0 & 1 & 0.41 & 0.492 \\ 
  Head 2 head diff & 132 & -7 & 12 & 0.204 & 1.286 & 151 & -5 & 8 & 0.146 & 0.993 & 231 & -4 & 10 & 0.302 & 1.128 \\ 
  Log rank diff & -994.99 & -6.977 & 0 & -1.54 & 1.308 & -1749.624 & -8.033 & 0 & -1.687 & 1.427 & -1410.984 & -8.836 & 0 & -1.847 & 1.476 \\ 
\bottomrule
\end{tabular}
\end{table}
\end{landscape}
\end{document}

When I run a small table, I get the desired effect:

\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{lscape}
\usepackage{booktabs}

\begin{document}
\begin{landscape}
\section{Introduction}
\begin{table}[ht]
\centering
\footnotesize
\caption{Descriptive Statistics - All Davis Cup Groups}\label{desc_davis_all}
\begin{tabular}{lrrrrr|rrrrr|rrrrr} \toprule
& \multicolumn{5}{c}{Favorite's team Lagging} & \multicolumn{5}{c}{Favorite's team Even} & \multicolumn{5}{c}{Favorite's team Leading}\\
\cmidrule{2-6} \cmidrule{7-11} \cmidrule{12-16}
 & Count & Min & Max & Mean & Stdev & Count & Min & Max & Mean & Stdev & Count & Min & Max & Mean & Stdev \\
\midrule
Total Obs. & 646 & 0 & 0 & 0 & 0 & 1037 & 0 & 0 & 0 & 0 & 764 & 0 & 0 & 0 & 0 \\ 
  Treatment Dummy & 343 & 0 & 1 & 0.531 & 0.499 & 563 & 0 & 1 & 0.543 & 0.498 & 425 & 0 & 1 & 0.556 & 0.497 \\ 
  \\
  \textit{Davis Cup Groups} &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  \\ 
  World Group & 233 & 0 & 1 & 0.361 & 0.481 & 370 & 0 & 1 & 0.357 & 0.479 & 258 & 0 & 1 & 0.338 & 0.473 \\ 
  Group 1 & 188 & 0 & 1 & 0.291 & 0.455 & 323 & 0 & 1 & 0.311 & 0.463 & 241 & 0 & 1 & 0.315 & 0.465 \\ 
  Group 2 & 225 & 0 & 1 & 0.348 & 0.477 & 344 & 0 & 1 & 0.332 & 0.471 & 265 & 0 & 1 & 0.347 & 0.476 \\ 
\bottomrule
\end{tabular}
\end{table}
\end{landscape}
\end{document}

Any recommendations on how to overcome this problem? I would really prefer having the title and table in the same landscape orientation

1 Answer 1

2

Here is a (partial) solution, playing with \tabcolsep. I removed the ugly vertical rules, separating the groups with shorter \cmidrules with the (l) option. Nevertheless there still remains an overfull \hbox, which you can remove changing the vertical margins in you document.

\documentclass[10pt]{article}%
\usepackage[utf8]{inputenc}
\usepackage[showframe]{geometry}
\usepackage{amsmath}
\usepackage{lscape}
\usepackage{array, booktabs, caption}

\begin{document}

\begin{landscape}
\section{Introduction}
\begin{table}[ht]
\centering\setlength{\tabcolsep}{3pt}
\setlength\cmidrulekern{1em}
\renewcommand\arraystretch{1.12}
\footnotesize
\caption{Descriptive Statistics - All Davis Cup Groups}\label{desc_davis_all}
\begin{tabular}{l*{15} {>{$}r<{$}}} \toprule
& \multicolumn{5}{c}{Favorite's team Lagging} & \multicolumn{5}{c}{Favorite's team Even} & \multicolumn{5}{c}{Favorite's team Leading}\\
\cmidrule(l{0.25em}){2-6} \cmidrule(l){7-11} \cmidrule(l){12-16}
 & \text{Count} & \text{Min} & \text{Max} & \text{Mean} & \text{Stdev} & \text{Count} & \text{Min} & \text{Max} & \text{Mean} & \text{Stdev} & \text{Count} & \text{Min} & \text{Max} & \text{Mean} & \text{Stdev}\\
\midrule
Total Obs. & 646 & 0 & 0 & 0 & 0 & 1037 & 0 & 0 & 0 & 0 & 764 & 0 & 0 & 0 & 0 \\
  Treatment Dummy & 343 & 0 & 1 & 0.531 & 0.499 & 563 & 0 & 1 & 0.543 & 0.498 & 425 & 0 & 1 & 0.556 & 0.497 \\
\addlinespace
   \textit{Davis Cup Groups} & & & & & & & & & & & & & & & \\
  World Group & 233 & 0 & 1 & 0.361 & 0.481 & 370 & 0 & 1 & 0.357 & 0.479 & 258 & 0 & 1 & 0.338 & 0.473 \\
  Group 1 & 188 & 0 & 1 & 0.291 & 0.455 & 323 & 0 & 1 & 0.311 & 0.463 & 241 & 0 & 1 & 0.315 & 0.465 \\
  Group 2 & 225 & 0 & 1 & 0.348 & 0.477 & 344 & 0 & 1 & 0.332 & 0.471 & 265 & 0 & 1 & 0.347 & 0.476 \\
\addlinespace
  \textit{Tournament Rounds} & & & & & & & & & & & & & & & \\
  Round of 16 & 80 & 0 & 1 & 0.124 & 0.33 & 126 & 0 & 1 & 0.122 & 0.327 & 84 & 0 & 1 & 0.11 & 0.313 \\
  Quarter Finals & 131 & 0 & 1 & 0.203 & 0.402 & 209 & 0 & 1 & 0.202 & 0.401 & 157 & 0 & 1 & 0.205 & 0.404 \\
  Semi Finals & 149 & 0 & 1 & 0.231 & 0.422 & 232 & 0 & 1 & 0.224 & 0.417 & 160 & 0 & 1 & 0.209 & 0.407 \\
  Finals & 100 & 0 & 1 & 0.155 & 0.362 & 186 & 0 & 1 & 0.179 & 0.384 & 150 & 0 & 1 & 0.196 & 0.397 \\
  Playoffs & 149 & 0 & 1 & 0.231 & 0.422 & 230 & 0 & 1 & 0.222 & 0.416 & 180 & 0 & 1 & 0.236 & 0.425 \\
  Playoffs - Round 2 & 37 & 0 & 1 & 0.057 & 0.233 & 54 & 0 & 1 & 0.052 & 0.222 & 33 & 0 & 1 & 0.043 & 0.203 \\
\addlinespace
  \textit{Favorite \& Underdog} & & & & & & & & & & & & & & & \\
  Favorite wins & 440 & 0 & 1 & 0.681 & 0.466 & 768 & 0 & 1 & 0.741 & 0.439 & 615 & 0 & 1 & 0.805 & 0.396 \\
  Favorite Log Rank & 3964.02 & 0 & 10.576 & 6.136 & 2.259 & 6680.796 & 0 & 10.727 & 6.442 & 2.14 & 4639.54 & 0 & 10.886 & 6.073 & 2.315 \\
  Favorite Head 2 Head & 428 & 0 & 17 & 0.663 & 1.413 & 515 & 0 & 9 & 0.497 & 1.024 & 489 & 0 & 12 & 0.64 & 1.306 \\
  Favorite Home Adv. & 282 & 0 & 1 & 0.437 & 0.496 & 530 & 0 & 1 & 0.511 & 0.5 & 451 & 0 & 1 & 0.59 & 0.492 \\
\addlinespace
  Underdog Log Rank & 4959.01 & 2.322 & 10.937 & 7.676 & 1.845 & 8430.42 & 3.17 & 11.037 & 8.13 & 1.621 & 6050.523 & 1.585 & 10.979 & 7.92 & 1.806 \\
  Underdog Head 2 Head & 296 & 0 & 8 & 0.458 & 0.995 & 364 & 0 & 6 & 0.351 & 0.817 & 258 & 0 & 5 & 0.338 & 0.77 \\
  Underdog Home Adv. & 364 & 0 & 1 & 0.563 & 0.496 & 507 & 0 & 1 & 0.489 & 0.5 & 313 & 0 & 1 & 0.41 & 0.492 \\
\addlinespace
  Head 2 head diff & 132 & -7 & 12 & 0.204 & 1.286 & 151 & -5 & 8 & 0.146 & 0.993 & 231 & -4 & 10 & 0.302 & 1.128 \\
  Log rank diff & -994.99 & -6.977 & 0 & -1.54 & 1.308 & -1749.624 & -8.033 & 0 & -1.687 & 1.427 & -1410.984 & -8.836 & 0 & -1.847 & 1.476 \\
\bottomrule
\end{tabular}
\end{table}
\end{landscape}

\end{document} 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .