2

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}
  • How is \MC defined? – Mico May 9 '16 at 15:30
  • \MC works without threepartable, however if i use threeparttable code doesn't execute. – Rizwan May 9 '16 at 15:38
  • Well, how is \MC defined? – Mico May 9 '16 at 15:45
  • i used \MC option following this post..tex.stackexchange.com/questions/37248/… – Rizwan May 9 '16 at 16:00
  • 1
    @Rizwan : Welcome to TeX.SX! Note that it would help us help you if you provide a full-but-minimal working example (MWE). For example, we need here the definition of your \MC macro (\def\MC#1{\multicolumn{1}{c}{#1}}) to be able to compile your example. Thus your MWE should be completed with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. (A tip: You can use backticks ` to mark your inline code - even in comments) – ebosi May 9 '16 at 16:19
3

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} 

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.