1

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} 
  • 1
    Are all those packages really necessary in your minimal working example? – totera Jan 5 '17 at 20:59
  • Sorry, my bad. I forgot to delete the ones that are not relevant anymore. I edited my MWE. – peter Jan 5 '17 at 21:38
  • sorry, where the section title should be? now it is in landscape orientation on the left top page corner. do you like that it is at right page corner, or that it stay in place where it is in portrait orientation? if latter is the case, than page should stay in portrait orientation and be only table rotated. – Zarko Jan 5 '17 at 22:47
  • can you show a hand drawn sketch, which show page layout , table position on section title position? – Zarko Jan 5 '17 at 22:49
  • Yes it is what you referred to as the latter. So, I would like to have the titles (section and subsection) on the right page corner (which is the same as on the top corner in portrait mode). I have tried to do this with the rotate environment. However, the titles than do not fit on the page and the table is not centered. Especially the first is important. – peter Jan 6 '17 at 0:39
2

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.

| improve this answer | |
  • For caption in threeparttable should be caption sufficient . From OP comment I understand, that the table should be vertical and horizontal centered. Horizontal centering can be achieved by adding of \hfil after first \vfill . – Zarko Jan 6 '17 at 2:52
  • @Zarko Thanks :-). I didn't know that about threeparttable. Seems odd to me, but handy, perhaps. I would just use \centering for the horizontal centring, if that's needed, but you're obviously right that \hfill would work. – cfr Jan 6 '17 at 23:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.