0

I need your help.

I am writing my dissertation with LaTeX (I am not a very experienced user), and I am inserting some stuff in the appendix. I have a fairly large and complex table in landscape mode, above which I want to put the section title (in standard orientation).

The problem is this: I can't get both of them to fit on the same page. I know there are other questions similar to this in the forum, but I have looked at them all, and none seem to be 100% right for me.

I enclose the code and an image of the problem.

Thanks to those who will take the time to answer me.

Cheers,

Nico

\section{3rd Tests}
\begingroup
\vspace*{\fill}
\begin{landscape}
\begin{table}[p]
\footnotesize
\centering
\resizebox{\columnwidth}{!}{%
\begin{tabular}{cccccc|c|c|c|cc}
\cline{2-11}
\multicolumn{1}{c|}{} & \multicolumn{1}{c|}{\textsc{trial} \#} & \multicolumn{1}{c|}{\begin{tabular}[c]{@{}c@{}}\textsc{drop}\\ \textsc{height}\\ {\textsc{[}}\textsc{cm}{\textsc{]}}\end{tabular}} & \multicolumn{1}{c|}{\begin{tabular}[c]{@{}c@{}}\textsc{theoretical}\\ \textsc{speed value}\\ $\sqrt{2 \cdot g \cdot \Delta H}$\end{tabular}} & \multicolumn{1}{c|}{\begin{tabular}[c]{@{}c@{}}\textsc{reference}\\ \textsc{speed value}\\ \textsc{(mocap)}\end{tabular}} & \begin{tabular}[c]{@{}c@{}}\textsc{measured}\\ \textsc{speed value}\\ \textsc{(static camera @}90\textsc{°)}\end{tabular} & \textsc{pe} & \begin{tabular}[c]{@{}c@{}}\textsc{measured}\\ \textsc{speed value}\\ \textsc{(static camera @}45\textsc{°)}\end{tabular} & \textsc{pe} & \multicolumn{1}{c|}{\begin{tabular}[c]{@{}c@{}}\textsc{measured}\\ \textsc{speed value}\\ \textsc{(panning camera)}\end{tabular}} & \multicolumn{1}{c|}{\textsc{pe}} \\ \cline{2-11} 
\multicolumn{1}{c|}{} & \multicolumn{1}{c|}{1} & \multicolumn{1}{c|}{100} & \multicolumn{1}{c|}{4.2213} & \multicolumn{1}{c|}{4.3084} & 4.2875 & -0.48 & 4.3117 & 0.07 & \multicolumn{1}{c|}{4.3647} & \multicolumn{1}{c|}{0.88} \\ \cline{2-11} 
\multicolumn{1}{c|}{} & \multicolumn{1}{c|}{4} & \multicolumn{1}{c|}{150} & \multicolumn{1}{c|}{5.1255} & \multicolumn{1}{c|}{5.1224} & 5.3444 & 4.33 & 4.8522 & -5.27 & \multicolumn{1}{c|}{4.7917} & \multicolumn{1}{c|}{-6.45} \\ \cline{2-11} 
\multicolumn{1}{c|}{} & \multicolumn{1}{c|}{7} & \multicolumn{1}{c|}{200} & \multicolumn{1}{c|}{6.2538} & \multicolumn{1}{c|}{6.2497} & 6.1934 & -0.9 & 6.6281 & 0.29 & \multicolumn{1}{c|}{6.2739} & \multicolumn{1}{c|}{0.38} \\ \hline
\multicolumn{1}{|c|}{\textbf{\textsc{ape}}} & \multicolumn{5}{c|}{} & \textbf{0.98} &  & \textbf{-1.63} & \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{\textbf{-1.73}} \\ \hline
\multicolumn{1}{c|}{} & \multicolumn{1}{c|}{2} & \multicolumn{1}{c|}{100} & \multicolumn{1}{c|}{4.4731} & \multicolumn{1}{c|}{4.4725} & 4.6564 & 4.11 & 4.3091 & -3.65 & \multicolumn{1}{c|}{4.1525} & \multicolumn{1}{c|}{-7.15} \\ \cline{2-11} 
\multicolumn{1}{c|}{} & \multicolumn{1}{c|}{5} & \multicolumn{1}{c|}{150} & \multicolumn{1}{c|}{5.2269} & \multicolumn{1}{c|}{5.2162} & 5.3453 & 2.47 & 5.5314 & 6.04 & \multicolumn{1}{c|}{4.6736} & \multicolumn{1}{c|}{-10.4} \\ \cline{2-11} 
\multicolumn{1}{c|}{} & \multicolumn{1}{c|}{8} & \multicolumn{1}{c|}{200} & \multicolumn{1}{c|}{6.3406} & \multicolumn{1}{c|}{6.2688} & 6.3203 & 0.82 & 6.5222 & 4.04 & \multicolumn{1}{c|}{6.1092} & \multicolumn{1}{c|}{-2.54} \\ \hline
\multicolumn{1}{|c|}{\textbf{\textsc{ape}}} & \multicolumn{5}{c|}{} & \textbf{2.46} &  & \textbf{2.14} & \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{\textbf{-6.69}} \\ \hline
\multicolumn{1}{c|}{} & \multicolumn{1}{c|}{3} & \multicolumn{1}{c|}{100} & \multicolumn{1}{c|}{4.3134} & \multicolumn{1}{c|}{4.2894} & 3.9895 & -6.99 & 4.2653 & -0.56 & \multicolumn{1}{c|}{4.2834} & \multicolumn{1}{c|}{-0.13} \\ \cline{2-11} 
\multicolumn{1}{c|}{} & \multicolumn{1}{c|}{6} & \multicolumn{1}{c|}{150} & \multicolumn{1}{c|}{5.3054} & \multicolumn{1}{c|}{5.2752} & 5.1954 & -1.52 & 4.8499 & -8.06 & \multicolumn{1}{c|}{4.3366} & \multicolumn{1}{c|}{-17.79} \\ \cline{2-11} 
\multicolumn{1}{c|}{} & \multicolumn{1}{c|}{9} & \multicolumn{1}{c|}{200} & \multicolumn{1}{c|}{6.3378} & \multicolumn{1}{c|}{6.2622} & 6.1937 & -1.09 & 6.8581 & 9.51 & \multicolumn{1}{c|}{5.8722} & \multicolumn{1}{c|}{-6.22} \\ \hline
\multicolumn{1}{|c|}{\textbf{\textsc{ape}}} & \multicolumn{5}{c|}{} & \textbf{-3.2} &  & \textbf{0.29} & \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{\textbf{-8.04}} \\ \hline
 &  &  &  &  &  & \textbf{0.08} &  & \textbf{0.26} &  &  \\ \cline{7-7} \cline{9-9}
\end{tabular}%
}
\caption{}
\label{tab:res3}
\end{table}
\end{landscape}
\vspace*{\fill}
\restoregeometry
\endgroup

Section in different page

6
  • Welcome. I don't know if it helps, but have you tried \begin{table}[htb!]?
    – Excelsior
    Apr 14, 2021 at 15:06
  • 1
    It seems that you are using the package geometry. Would you please add your preamble to your MWE, at least the minimum to reproduce the issue? Apr 14, 2021 at 15:06
  • @Excelsior when I switch from \begin{table}[p] to \begin{table}[htb!], the table slides towards the left long margin.
    – Nico
    Apr 14, 2021 at 15:13
  • @SimonDispa I am using a Uni template with several cls, and I really don't know where to find these settings or what to paste here, I'm sorry.
    – Nico
    Apr 14, 2021 at 15:20
  • @SimonDispa I give up, I also think that putting everything in landscape is the best solution at this point. I know how to flip everything horizontally, but please enter the code so I can upvote and accept your answer. Thanks again for your help.
    – Nico
    Apr 14, 2021 at 16:02

2 Answers 2

1

If you make the column separation a bit smaller, rearrange the header and stop to use such a wide font then it actually fits in portrait:

You could save some more space by moving the "static camera" text in the footnote and hash from the trial in a new line.

\documentclass[12pt,a4paper]{article}

\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry}

\usepackage{graphicx,lipsum} % added

\usepackage{caption} %for captionof
\begin{document}


\section{3rd Tests}

\begin{minipage}{\textwidth} %
\footnotesize
\centering

\tabcolsep=3pt \let\textsc\textrm %to suppress the smallcaps ...
%\rotatebox{90}
{%
            \begin{tabular}{cccccc|c|c|c|cc}
                \cline{2-11}
                \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{\textsc{trial} \#} & \multicolumn{1}{c|}{\begin{tabular}[c]{@{}c@{}}\textsc{drop}\\ \textsc{height}\\ {\textsc{[}}\textsc{cm}{\textsc{]}}\end{tabular}} & \multicolumn{1}{c|}{\begin{tabular}[c]{@{}c@{}}\textsc{theoretical}\\ \textsc{speed value}\\ $\sqrt{2 \cdot g \cdot \Delta H}$\end{tabular}} & \multicolumn{1}{c|}{\begin{tabular}[c]{@{}c@{}}\textsc{reference}\\ \textsc{speed value}\\ \textsc{(mocap)}\end{tabular}} & \begin{tabular}[c]{@{}c@{}}\textsc{measured}\\ \textsc{speed value}\\ static camera\\@90\textsc{°}\end{tabular} & \textsc{pe} & \begin{tabular}[c]{@{}c@{}}\textsc{measured}\\ \textsc{speed value}\\ static camera\\ @45\textsc{°}\end{tabular} & \textsc{pe} & \multicolumn{1}{c|}{\begin{tabular}[c]{@{}c@{}}\textsc{measured}\\ \textsc{speed value}\\ panning\\ camera\end{tabular}} & \multicolumn{1}{c|}{\textsc{pe}} \\ \cline{2-11}
                \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{1} & \multicolumn{1}{c|}{100} & \multicolumn{1}{c|}{4.2213} & \multicolumn{1}{c|}{4.3084} & 4.2875 & -0.48 & 4.3117 & 0.07 & \multicolumn{1}{c|}{4.3647} & \multicolumn{1}{c|}{0.88} \\ \cline{2-11}
                \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{4} & \multicolumn{1}{c|}{150} & \multicolumn{1}{c|}{5.1255} & \multicolumn{1}{c|}{5.1224} & 5.3444 & 4.33 & 4.8522 & -5.27 & \multicolumn{1}{c|}{4.7917} & \multicolumn{1}{c|}{-6.45} \\ \cline{2-11}
                \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{7} & \multicolumn{1}{c|}{200} & \multicolumn{1}{c|}{6.2538} & \multicolumn{1}{c|}{6.2497} & 6.1934 & -0.9 & 6.6281 & 0.29 & \multicolumn{1}{c|}{6.2739} & \multicolumn{1}{c|}{0.38} \\ \hline
                \multicolumn{1}{|c|}{\textbf{\textsc{ape}}} & \multicolumn{5}{c|}{} & \textbf{0.98} &  & \textbf{-1.63} & \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{\textbf{-1.73}} \\ \hline
                \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{2} & \multicolumn{1}{c|}{100} & \multicolumn{1}{c|}{4.4731} & \multicolumn{1}{c|}{4.4725} & 4.6564 & 4.11 & 4.3091 & -3.65 & \multicolumn{1}{c|}{4.1525} & \multicolumn{1}{c|}{-7.15} \\ \cline{2-11}
                \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{5} & \multicolumn{1}{c|}{150} & \multicolumn{1}{c|}{5.2269} & \multicolumn{1}{c|}{5.2162} & 5.3453 & 2.47 & 5.5314 & 6.04 & \multicolumn{1}{c|}{4.6736} & \multicolumn{1}{c|}{-10.4} \\ \cline{2-11}
                \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{8} & \multicolumn{1}{c|}{200} & \multicolumn{1}{c|}{6.3406} & \multicolumn{1}{c|}{6.2688} & 6.3203 & 0.82 & 6.5222 & 4.04 & \multicolumn{1}{c|}{6.1092} & \multicolumn{1}{c|}{-2.54} \\ \hline
                \multicolumn{1}{|c|}{\textbf{\textsc{ape}}} & \multicolumn{5}{c|}{} & \textbf{2.46} &  & \textbf{2.14} & \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{\textbf{-6.69}} \\ \hline
                \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{3} & \multicolumn{1}{c|}{100} & \multicolumn{1}{c|}{4.3134} & \multicolumn{1}{c|}{4.2894} & 3.9895 & -6.99 & 4.2653 & -0.56 & \multicolumn{1}{c|}{4.2834} & \multicolumn{1}{c|}{-0.13} \\ \cline{2-11}
                \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{6} & \multicolumn{1}{c|}{150} & \multicolumn{1}{c|}{5.3054} & \multicolumn{1}{c|}{5.2752} & 5.1954 & -1.52 & 4.8499 & -8.06 & \multicolumn{1}{c|}{4.3366} & \multicolumn{1}{c|}{-17.79} \\ \cline{2-11}
                \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{9} & \multicolumn{1}{c|}{200} & \multicolumn{1}{c|}{6.3378} & \multicolumn{1}{c|}{6.2622} & 6.1937 & -1.09 & 6.8581 & 9.51 & \multicolumn{1}{c|}{5.8722} & \multicolumn{1}{c|}{-6.22} \\ \hline
                \multicolumn{1}{|c|}{\textbf{\textsc{ape}}} & \multicolumn{5}{c|}{} & \textbf{-3.2} &  & \textbf{0.29} & \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{\textbf{-8.04}} \\ \hline
                &  &  &  &  &  & \textbf{0.08} &  & \textbf{0.26} &  &  \\ \cline{7-7} \cline{9-9}
            \end{tabular}%
    }
        \captionof{table}{}
        \label{tab:res3}
\end{minipage}


Some text \lipsum

\end{document}

enter image description here

1

I propose this solution, based on the sideways environment (from the rotating package). I took the opportunity to simplify your code, reùmoving all unnecessary \multicolumn{1}{c|}{…}.

\documentclass{article}
    \usepackage[T1]{fontenc}
    \usepackage[a4paper, showframe]{geometry}
    \usepackage{array, makecell, caption}
    \usepackage{rotating}

\begin{document}

\section{3rd Tests}%e
    \vspace*{-4ex}

\begin{sideways}
\parbox{\textheight}{\small
\renewcommand{\theadfont}{\small\scshape}
\setlength{\tabcolsep}{4pt}
\centering
\begin{tabular}{*{10}{|c}|}
\cline{1-10}
 \thead{trial\\ \#} & \thead{drop\\height\\ {[cm]}} & \thead{theoretical \\ speed value \\ $\sqrt{2 \cdot g \cdot \Delta H\mathstrut}$ } & \thead{reference \\ speed value\\ (mocap)} & \thead{measured \\ speed value \\(static camera\\ @90°)} & \thead{pe} & \thead{measured \\ speed value \\ (static camera \\ @ 45°)} & \thead{pe} & \thead{measured \\ speed value \\ (panning camera)} & \thead{pe}\\ \cline{1-10}
  1 & 100 & 4.2213 & 4.3084 & 4.2875 & -0.48 & 4.3117 & 0.07 & 4.3647 & 0.88 \\ \cline{1-10}
4 & 150 & 5.1255 & 5.1224 & 5.3444 & 4.33 & 4.8522 & -5.27 & 4.7917 & -6.45 \\ \cline{1-10}
7 & 200 & 6.2538 & 6.2497 & 6.1934 & -0.9 & 6.6281 & 0.29 & 6.2739 & 0.38 \\ \hline
  \multicolumn{5}{l|}{\bfseries\scshape\llap{ape\enspace }} & \textbf{0.98} & & \textbf{-1.63} & & \textbf{-1.73} \\ \hline
2 & 100 & 4.4731 & 4.4725 & 4.6564 & 4.11 & 4.3091 & -3.65 & 4.1525 & -7.15 \\ \cline{1-10}
5 & 150 & 5.2269 & 5.2162 & 5.3453 & 2.47 & 5.5314 & 6.04 & 4.6736 & -10.4 \\ \cline{1-10}
8 & 200 & 6.3406 & 6.2688 & 6.3203 & 0.82 & 6.5222 & 4.04 & 6.1092 & -2.54 \\ \hline
  \multicolumn{5}{l|}{\bfseries\scshape\llap{ape\enspace }} & \textbf{2.46} & & \textbf{2.14} & & \textbf{-6.69} \\ \hline
3 & 100 & 4.3134 & 4.2894 & 3.9895 & -6.99 & 4.2653 & -0.56 & 4.2834 & -0.13 \\ \cline{1-10}
6 & 150 & 5.3054 & 5.2752 & 5.1954 & -1.52 & 4.8499 & -8.06 & 4.3366 & -17.79 \\ \cline{1-10}
9 & 200 & 6.3378 & 6.2622 & 6.1937 & -1.09 & 6.8581 & 9.51 & 5.8722 & -6.22 \\ \hline
 \multicolumn{5}{l|}{\bfseries\scshape\llap{ape\enspace }} & \textbf{-3.2} & & \textbf{0.29} & & \textbf{-8.04} \\ \hline
\multicolumn{4}{c|}{} & \textbf{0.08} & & \textbf{0.26} & \multicolumn{2}{c}{} \\ \cline{5-5} \cline{7-7}
\end{tabular}%
\leavevmode
\captionof{table}{}
\label{tab:res3}}
\end{sideways}

\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 .