[Tex/LaTex] Sidewaystable+threeparttable

resizerotatingthreeparttablex

I want to add tablenotes at the end of a rotated table using sidewaystable and threepart table, i expermented with the solution provided already on stackexchange but couldn't succeed. Here is code for my table…

\documentclass[12pt,a4paper]{article}
\usepackage{threeparttable}
\def\MC#1{\multicolumn{1}{c}{#1}}
\usepackage{rotating}


\begin{document}

\begin{sidewaystable}
\begin{threeparttable}  
\centering 
\caption{Table-1}
\medskip
\resizebox{\linewidth}{!}{%
\tabcolsep=2pt  
\begin{tabular}{l@{}*{13}c@{}}\toprule

\MC{VARIABLES} &\MC{1} &\MC{2} &\MC{2}  &\MC{4}  &\MC{5}  & \MC{6} &\MC{7}  &\MC{8}  &\MC{9}&\MC{10}&\MC{11} &\MC{12} \\ \hline

row1 & -2.059{*}{*}{*} & -3.016{*}{*}{*} & -4.794{*}{*}{*} & -7.238{*}{*}{*} & -6.207{*}{*}{*} & -0.918{*}{*}{*} & 7.0569{*}{*} & 0.7439{*} & 0.158{*}{*}{*} &  &  &\\
& (-9.030) & (-9.781) & (-5.819) & (-8.572) & (-9.567) & (-6.068) & (2.330) & (1.945) & (4.404) &  &  &\\
row2 & -2.059{*}{*}{*} & -3.016{*}{*}{*} & -4.794{*}{*}{*} & -7.238{*}{*}{*} & -6.207{*}{*}{*} & -0.918{*}{*}{*} & 7.0569{*}{*} & 0.7439{*} & 0.158{*}{*}{*} &  &  &\\
& (-9.030) & (-9.781) & (-5.819) & (-8.572) & (-9.567) & (-6.068) & (2.330) & (1.945) & (4.404) &  &  &\\
 row3 & -2.059{*}{*}{*} & -3.016{*}{*}{*} & -4.794{*}{*}{*} & -7.238{*}{*}{*} & -6.207{*}{*}{*} & -0.918{*}{*}{*} & 7.0569{*}{*} & 0.7439{*} & 0.158{*}{*}{*} &  &  &\\
& (-9.030) & (-9.781) & (-5.819) & (-8.572) & (-9.567) & (-6.068) & (2.330) & (1.945) & (4.404) &  &  &\\

\bottomrule 
\end{tabular}}
\begin{tablenotes}
\small
\item This is where authors provide additional information about the data, including whatever notes are needed.
\end{tablenotes}
\end{threeparttable}  
\end{sidewaystable} 

    \end{document}

Best Answer

The following solution sets the table in landscape mode, sets the relative font size to \small, uses a tabular* environment to assure that the table occupies the available text width, and uses the dcolumn package to align the numbers in columns 2 thru 13 on their respective decimal markers. It also uses the line-drawing macros of the booktabs package.

\documentclass{article}
\usepackage{rotating,threeparttable,booktabs,caption,dcolumn}
\newcolumntype{d}[1]{D..{#1}}
\newcommand\MC[1]{\multicolumn{1}{c}{#1}} 

\begin{document}
\begin{sidewaystable}
\small
\setlength{\tabcolsep}{0pt}
\begin{threeparttable}
\caption{Table-1}
\begin{tabular*}{\textwidth}{ l @{\extracolsep{\fill}} *{12}{d{2.6}} }
\toprule
Variables &\MC{1} &\MC{2} &\MC{3} &\MC{4} &\MC{5}  &\MC{6}
          &\MC{7} &\MC{8} &\MC{9} &\MC{10}&\MC{11} &\MC{12} \\
\midrule
row1 & -2.059^{***} & -3.016^{***} & -4.794^{***} & -7.238^{***} & -6.207^{***} & -0.918^{***} & 7.0569^{**} & 0.7439^{*} & 0.158^{***} &  &  &\\
     & (-9.030) & (-9.781) & (-5.819) & (-8.572) & (-9.567) & (-6.068) & (2.330) & (1.945) & (4.404) &  &  &\\
\addlinespace
row2 & -2.059^{***} & -3.016^{***} & -4.794^{***} & -7.238^{***} & -6.207^{***} & -0.918^{***} & 7.0569^{**} & 0.7439^{*} & 0.158^{***} &  &  &\\
     & (-9.030) & (-9.781) & (-5.819) & (-8.572) & (-9.567) & (-6.068) & (2.330) & (1.945) & (4.404) &  &  &\\
\addlinespace
row3 & -2.059^{***} & -3.016^{***} & -4.794^{***} & -7.238^{***} & -6.207^{***} & -0.918^{***} & 7.0569^{**} & 0.7439^{*} & 0.158^{***} &  &  &\\
     & (-9.030) & (-9.781) & (-5.819) & (-8.572) & (-9.567) & (-6.068) & (2.330) & (1.945) & (4.404) &  &  &\\
\bottomrule
\end{tabular*}
\begin{tablenotes}
\item This is where authors provide additional information about the data, including whatever notes are needed.
\end{tablenotes}
\end{threeparttable}
\end{sidewaystable} 
\end{document} 
Related Question