I need to have a table which 1) is sideways 2) is rescaled to fit the page 3) has tablenotes
. I'm trying to combine sidewaystable
, adjustbox
and threeparttablex
to do so, but I encounter three problems:
- I don't know where/how to include the table caption. I tried several positions within the environments but I keep getting compilation errors.
- The width of the
tablenotes
is not correct, not even after including\renewcommand\TPTminimum{\linewidth}
- Labels "b" and "c" overlap in the third cell of the first row.
This is what my current MWE attempt looks like (the actual table is much larger, hence the sidewaystable/adjustbox combination):
\documentclass[]{article}
\usepackage{adjustbox}
\usepackage{caption}
\usepackage{multirow}
\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
\usepackage{rotating}
\usepackage{longtable}
\usepackage{threeparttablex}
\begin{document}
\begin{sidewaystable}
\begin{adjustbox}{width=\linewidth}
\begin{ThreePartTable}
\renewcommand{\TPTminimum}{\linewidth}
\begin{TableNotes}
\small
\item [a] Note note note note note note note note note note note note note note note note note note note note note note note note note note
\item [b] Note note note note note note note note note note note note note note note note note note note note note note note note note note
\item [c] Note note note note note note note note note note note note note note note note note note note note note note note note note note
\end{TableNotes}
\begin{tabular}{lllllll}
%\caption{My table caption.} \\
\hline
\multirow{2}{*}{Model} & \multirow{2}{*}{Specification\tnote{a}} & \multirow{2}{*}{Covariance structure\tnote{a}\tnote{b}} & \multicolumn{2}{l}{Number of fixed effects\tnote{c}} & \multicolumn{2}{l}{Number of variance components\tnote{c}} \\ \cline{4-7}
& & & ES approach & RD approach & ES approach & RD approach \\ \hline
$1$ & Model 1 & Covariance 1 & $1$ & $2$ & $2$ & $7$ \\
$2$ & Model 2 & Covariance 2 & $2$ & $4$ & $6$ & $21$ \\
$3 $ & Model 3 & Covariance 3 & $3$ & $6$ & $12$ & $43$ \\ \hline
\insertTableNotes
\end{tabular}
\end{ThreePartTable}
\end{adjustbox}
\end{sidewaystable}
\end{document}