[Tex/LaTex] Section title above table in landscape mode

landscape

Like in this post (here) I would like to put the name of the appendix on the top of the page which is in landscape mode. In deviation of the one who started that topic, I would like to have the title of the page at the shortest side of the paper (so, at your right side if it is in landscape mode). I tried something similar as the one who answered that topic, but that does not work.

\documentclass[11pt]{article}
\usepackage[textwidth=155mm,top=23.5mm,bottom=23.5mm,
     footskip=40pt,heightrounded, showframe]{geometry}
\usepackage[skip=0.33\baselineskip]{caption}
\usepackage[table,xcdraw]{xcolor}
\usepackage[flushleft]{threeparttable}
\usepackage{booktabs, makecell}
\usepackage{pdflscape}
\usepackage{appendix}
\begin{document}
\newgeometry{left=3cm,bottom=0.1cm, top=1cm}
\begin{landscape} \section{Appendix}
    \setcounter{table}{0}
    \renewcommand*\thetable{\Alph{section}.\arabic{table}} \subsection{Unit root tests}
    \leavevmode\vfill
    \begin{table}[ht]
        \centering\setlength{\tabcolsep}{3pt}
        \begin{threeparttable}
            \caption{P-values of Augmented Dickey-Fuller Test}
            \label{my-label}
            \begin{tabular}{@{}llllllllllllll@{}}
                \toprule
                Variable & Austria & Belgium & Finland & France & Germany & Netherl. & Greece & Italy & Ireland & Portugal & Spain & All eurozone & US \\ \midrule
                \textit{Yield-OIS (10y)} & 0.1807 & 0.1912 & 0.1255 & 0.3142 & 0.1641 & 0.1995 & 0.4182 & 0.4180 & 0.5964 & 0.6333 & 0.4743 & & \textbf{0.0437} \\
                \textit{CDS } & 0.0779 & 0.2706 & 0.3143 & 0.2230 & 0.0938 & 0.2775 & 0.7790 & 0.1399 & 0.2852 & 0.3403 & 0.2272 & & \\
                \textit{Redom} & \textbf{0.0005} & 0.1273 & \textbf{0.0001} & \textbf{0.0287} & & 0.0718 & 0.6975 & 0.2210 & 0.6008 & 0.5033 & 0.4064 & & \\
                \textit{BAS }& \textbf{0.0000} & \textbf{0.0111} & \textbf{0.0012} & \textbf{0.0000} & \textbf{0.0000} & 0.0021 & \textbf{0.0026} & 0.0000 & 0.3094 & 0.4802 & 0.0000 & & \\
                \textit{OIS rate (10y)} & \multicolumn{1}{c}{} & & & & & & & & & & & 0.8880 & 0.0907 \\
                \textit{VSTOXX} & \multicolumn{1}{c}{\textbf{}} & & & & & & & & & & & \textbf{0.0009} & \\
                \textit{CESI} & \multicolumn{1}{c}{\textbf{}} & & & & & & & & & & & \textbf{0.0246} & \textbf{0.0146} \\ \bottomrule
            \end{tabular}
            \begin{tablenotes}[para,flushleft]   \footnotesize{
                    \item \textbf{Notes}: This table shows the p-values of the Augmented Dickey-Fuller (ADF) test. The null hypothesis is that the variable has a unit root. This hypothesis is rejected when the p-value < 0.05 (highlighted in bold). The ADF with trend and intercept has been performed if variables have a clear trend. The column ''All eurozone'' shows the p-values for the time series observations. All variables in this test are measured in level values.}
            \end{tablenotes}
        \end{threeparttable}
    \end{table}
    \vfill
\end{landscape}
\restoregeometry
\end{document} 

Best Answer

Do you want this?

sideways tabular

Note that you should not use ' for an opening quotation mark. Use ` instead.

\documentclass[11pt]{article}
\usepackage[textwidth=155mm,top=23.5mm,bottom=23.5mm,footskip=40pt,heightrounded, showframe]{geometry}
\usepackage[skip=0.33\baselineskip]{caption}
\usepackage[flushleft]{threeparttable}
\usepackage{booktabs,rotating}
\begin{document}
\newgeometry{left=3cm,bottom=0.1cm, top=1cm}
\section{Appendix}
\setcounter{table}{0}
\renewcommand*\thetable{\Alph{section}.\arabic{table}}
\subsection{Unit root tests}
\begingroup
\vfill
%\centering % uncomment to centre the table horizontally as well as vertically
\begin{sideways}
  \setlength{\tabcolsep}{3pt}
  \begin{threeparttable}
    \caption{P-values of Augmented Dickey-Fuller Test}
    \label{my-label}
    \begin{tabular}{@{}llllllllllllll@{}}
      \toprule
      Variable & Austria & Belgium & Finland & France & Germany & Netherl. & Greece & Italy & Ireland & Portugal & Spain & All eurozone & US \\ \midrule
      \textit{Yield-OIS (10y)} & 0.1807 & 0.1912 & 0.1255 & 0.3142 & 0.1641 & 0.1995 & 0.4182 & 0.4180 & 0.5964 & 0.6333 & 0.4743 & & \textbf{0.0437} \\
      \textit{CDS } & 0.0779 & 0.2706 & 0.3143 & 0.2230 & 0.0938 & 0.2775 & 0.7790 & 0.1399 & 0.2852 & 0.3403 & 0.2272 & & \\
      \textit{Redom} & \textbf{0.0005} & 0.1273 & \textbf{0.0001} & \textbf{0.0287} & & 0.0718 & 0.6975 & 0.2210 & 0.6008 & 0.5033 & 0.4064 & & \\
      \textit{BAS }& \textbf{0.0000} & \textbf{0.0111} & \textbf{0.0012} & \textbf{0.0000} & \textbf{0.0000} & 0.0021 & \textbf{0.0026} & 0.0000 & 0.3094 & 0.4802 & 0.0000 & & \\
      \textit{OIS rate (10y)} & \multicolumn{1}{c}{} & & & & & & & & & & & 0.8880 & 0.0907 \\
      \textit{VSTOXX} & \multicolumn{1}{c}{\textbf{}} & & & & & & & & & & & \textbf{0.0009} & \\
      \textit{CESI} & \multicolumn{1}{c}{\textbf{}} & & & & & & & & & & & \textbf{0.0246} & \textbf{0.0146} \\ \bottomrule
    \end{tabular}
    \begin{tablenotes}[para,flushleft]
      \footnotesize
        \item \textbf{Notes}: This table shows the p-values of the Augmented Dickey-Fuller (ADF) test. The null hypothesis is that the variable has a unit root. This hypothesis is rejected when the p-value < 0.05 (highlighted in bold). The ADF with trend and intercept has been performed if variables have a clear trend. The column ``All eurozone'' shows the p-values for the time series observations. All variables in this test are measured in level values.
    \end{tablenotes}
  \end{threeparttable}
\end{sideways}
\vfill
\restoregeometry
\endgroup
\end{document}

If you want the table centred horizontally, as Zarko suggests, simply uncomment the line indicated:

table centred both ways

EDITED in light of Zarko's suggestions/corrections.

Related Question