[Tex/LaTex] How to deal with a long table

longtabletables

I have a very long horizontal table. I rotated it to a vertical one, and would like it to be in the same page of the Appendix. However, it was still so long that it was automatically moved to the next page, and left one blank page. Is there any idea how to deal with this table? Thanks in advance.

\documentclass[12pt]{report}

\usepackage{booktabs}
\usepackage{rotating}
\usepackage{lipsum}

\begin{document}
\section*{Appendix I: Tables}
\lipsum

\begin{sidewaystable}\hspace*{1cm}
\footnotesize\setlength{\tabcolsep}{0.01pt}
\begin{tabular}{l@{\hspace{0.05pt}} *{18}{c}}
\toprule
\bfseries Model & \multicolumn{18}{c}{\bfseries Parameters} \\
\cmidrule(l){2-18}
& $\omega$ & $\phi$ & $\alpha$ & $\beta$ & $\gamma_1$ & $\gamma_2$ &     $\gamma_3$ & 
$\gamma_4$ & $\gamma_5$ & $\gamma_6$ & $\theta_1$  & $\theta_2$ & $\theta_3$ & $\theta_4$ 
& $\varphi_1$ & $\varphi_2$ & $\varphi_3$ \\
\misrule
\bfseries 1
& 0.235 & 0.766 & 0.0114 & 0.0028 & 0.172 & - & - & - & - & - & -
& - & -  & - & - & -  & -  \\
\bfseries 2
& - & 0.998  & 0.0032 & 0.0002 &  -0.0058 & -0.1887& - & - & - & - & 0.593 &
0.232 & - & - &  0.1476 & -0.1377 & -0.0288 \\
\bfseries 3
& - & 0.892 & 0.0662  & -0.0028 &  -0.0020 & -0.0452 &-0.2072& - & - & - &      0.0389 & 0.6374 & -  & -  & 0.661 & -0.204 & -0.073 \\
\bfseries 4
& 1 & - & - & - & 0.0003 & -0.0006 &  -0.0005 & 0.0002
-&-& &  0.823 & - & - & - & 0.0454 & -0.1384 \\
\bfseries 5
& 1 & - &  0.0054 & - & 0.0010 & -0.0002 & 0.0006 & -0.0020 & 0.0003 & -0.0007     & 0.8524 & 0.2764 & -0.2393& 0.0348 & 0.0395 & -0.4177&- \\
\midrule
\bfseries 6
& 0 & 0.42 & 0.0093& 0.0012 & 0.0052 & - & - & - & - & - & -
& - & - & - & - & - & -  \\
\bfseries 7
& 1 & 0.869  & -0.0238 & 0.0138 & -0.0055 & -0.1819 & - & - & - & - & -0.0055
& -0.1810 & - & - & -0.249 & 0.734 & - \\
\bfseries 8
& - & 0.944  & 0.0241 & 0.0010 & 0.0276 & -0.0508 & -0.2321 & - & - & - & 0.8437
& -0.0006 & - & - & -0.2746 & -0.1223 & 0.0077 & - \\
\bfseries 9
& 1 & 0.856 & -0.115 & 0.0207 & 0.0005 & -0.0010 & 0.0037 & 0.0005 & - & - & 0.893
& - & - & - & -0.1 & -0.184 & - \\
\bfseries 10
& 1 & 1 & -0.0069 & 0.0002 & -0.0002 & -0.0007 & -0.0001 & -0.0001 & -0.0001 &     -0.0010 & 0.831 & -0.131 & - & - & - & -0.131 & -0.218  \\
\bottomrule
\addlinespace
\multicolumn{18}{l}{1: DSHW(7, 364) ; 2: BATS(7, 365); 3: BATS(7, 91, 365); 4:     TBATS(7, 365); 5: TBATS(7, 91, 365)} \\
\multicolumn{18}{l}{6: LR+DSHW(7, 364) ; 7: LR+BATS(7, 365); 8:LR+BATS(7, 91, 365); 9: LR+TBATS(7, 365); 10: LR+TBATS(7, 91, 365)} \\
\end{tabular}
\caption{Parameters chosen for all models}\label{tab:Hparameters}
\end{sidewaystable}

\lipsum

\end{document}

enter image description here

Best Answer

You don't need a sideways table, if you swap rows and columns and reduce the value of \tabcolsep. Here is how I would do it:

\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}%
 \usepackage{geometry}%
 \usepackage{array, booktabs}
\usepackage{siunitx}%
\usepackage[inline]{  enumitem} 
 \usepackage{graphicx, rotating}
\usepackage{lipsum}
\sisetup{table-number-alignment=center}

\begin{document}


\begin{table}[!ht]
\footnotesize\setlength{\tabcolsep}{4pt}%
\renewcommand\arraystretch{1.3}
\begin{tabular}{@{}l S[table-format=1.4]*{4}{S[table-format=-1.4]} S[table-format=1.4]*{4}{S[table-format=-1.4]}@{}}
\toprule
 & \multicolumn{10}{c}{\bfseries Model } \\
 & \bfseries 1 &{\bfseries 2} & {\bfseries 3} & {\bfseries 4} & {\bfseries 5} & {\bfseries 6} & {\bfseries 7} & {\bfseries 8} & {\bfseries 9} & {\bfseries 10} \\
 \midrule
 $\omega$ &0.2350 & {–} & {–} & 1 & 1 & 0 & 1 & {–} & 1 & 1 \\
 $\phi$ & 0.766 & 0.998 &0.892 & {–} & {–} & 0.42 & 0.869 & 0.944 & 0.856 & 1 \\
 $\alpha$ & 0.0114 & 0.0032 & 0.0662 & {–} & 0.0054 & 0.0093 & -0.0238 & 0.0241 & -0.115 & -0.0069\\
 $\beta$ & 0.0028 & 0.0002 & -0.0028 & {–} & {–} & 0.0012 & 0.0138 & 0.0010 & 0.0207 & 0.0002 \\
 \addlinespace
 $\gamma_1$ & 0.172 & -0.0058 & -0.0020 & 0.0003 & 0.0010 &0.0052 & -0.0055 & 0.0276 & 0.0005 & -0.0002 \\
 $\gamma_2$ & {–} & -0.1887 & -0.0452 & -0.0006 & -0.0002 & {–} & -0.1819 & -0.0508 &-0.0010 & -0.0007\\
 $\gamma_3$ & {–} & {–} & -0.2072 & -0.0005 & 0.0006 & {–} & {–} & -0.2321 &0.0037 & -0.0001\\
$\gamma_4$ & {–} & {–} & {–} & 0.0002 & -0.0020 & {–} & {–} & {–} & 0.0005 & -0.0001 \\
\llap{\smash{\rotatebox[origin=c]{90}{\bfseries Paramètres}}\quad} $\gamma_5$ & {–} & {–} & {–} & {–} & 0.0003 & {–} & {–} & {–} & {–} & -0.0001 \\
 $\gamma_6$ & {–} & {–} & {–} & {–} & -0.0007 & {–} & {–} & {–} & {–} & -0.0010 \\
 \addlinespace
$\theta_1$ & {–} & 0.593 & 0.0389 & 0.823 & 0.8524 & {–} & -0.0055 & 0.8437 & 0.893 & 0.831 \\
 $\theta_2$ & {–} & 0.232 & 0.6374 & {–} & 0.2764 & {–} & -0.1810 & -0.0006 & {–} & -0.131 \\
$\theta_3$ & {–} & {–} & {–} & {–} & -0.2393 & {–} & {–} & {–} & {–} & {–} \\
$\theta_4$ & {–} & {–} & {–} & {–} & 0.0348 & {–} & {–} & {–} & {–} & {–} \\
\addlinespace
$\varphi_1$ & {–} & 0.1476 & 0.661 & 0.0454& 0.0395 & {–} & -0.249 & -0.2746 & -0.1 & {–} \\%?
$\varphi_2$ & {–} & -0.1377 & -0.204 & -0.1384 & -0.4177 & {–} & 0.734 & -0.1223 & -0.184 & -0.131 \\
$\varphi_3$ & {–} & -0.0288 & -0.073 & {–} & {–} & {–} & {–} & 0.0077 & {–} & -0.218\\
\bottomrule
\addlinespace
\multicolumn{11}{p{\linewidth}}{
\begin{enumerate*}[label =\arabic*: , itemjoin =\enspace]
  \item DSHW(7, 364)\,;
  \item BATS(7, 365)\,;
  \item BATS(7, 91, 365)\,;
  \item TBATS(7, 365)\,;\newline
  \item TBATS(7, 91, 365)\,;
  \item LR+DSHW(7, 364)\,;
  \item LR+BATS(7, 365)\,;
  \item LR+BATS(7, 91, 365)\,;\newline
  \item LR+TBATS(7, 365)\,;
  \item LR+TBATS(7, 91, 365).
\end{enumerate*}}
\end{tabular}
\caption{Parameters chosen for all models}\label{tab:Hparameters}
\end{table}

\lipsum

\end{document} 

enter image description here

Related Question