[Tex/LaTex] Width of table captions when using threeparttable in memoir

captionsmemoirtablesthreeparttable

In the MWE below, I would like the table caption to be left aligned, and have a maximum width as the width of the table.

\documentclass[a4paper,11pt,oneside,openany,showtrims,strict,extrafontsizes]{memoir}
\usepackage{tabulary,lipsum,threeparttable}
\usepackage[font=small,labelfont=sc]{caption}
\begin{document}

\tableofcontents
\newpage
\listoffigures

\chapter{Chapter one starts here}
\section{Heading}

\lipsum[4]


\begin{table}
\caption{\label{orgspecialblock1}
Average yields and average income, by State, India}
\begin{threeparttable}
{\small
\begin{tabulary}{\textwidth}{Lrr}
State & Average yield & Average income\\
\hline
Madhya Pradesh & 669 & 13000\\
Haryana & 300 & 25000\\
Punjab & 260 & 35000\\
\end{tabulary}}
\begin{tablenotes}
\item[] \footnotesize Notes:
\item[1] \footnotesize This table is very nice but this note is
very long, so long that it goes wider than the table
\item[2] \footnotesize This is a second note. But this is not
very wide.
\item[] \footnotesize Source: akshd aksjhd akjshd
\end{tablenotes}
\end{threeparttable}
\end{table}

\chapter{Chapter two starts here}
\section{Heading}

\lipsum[4]

\end{document}

Best Answer

Put the caption inside threeparttable

\documentclass[a4paper,11pt,oneside,openany,showtrims,strict,extrafontsizes]{memoir}
\usepackage{tabulary,lipsum,threeparttable}
\usepackage[font=small,labelfont=sc]{caption}
\begin{document}

\tableofcontents
\newpage
\listoffigures

\chapter{Chapter one starts here}
\section{Heading}

\lipsum[4]


\begin{table}[htb]   %% add [htb] here for better
\begin{threeparttable}
\caption{\label{orgspecialblock1}
Average yields and average income, by State, India}
{\small
\begin{tabulary}{\textwidth}{Lrr}
State & Average yield & Average income\\
\hline
Madhya Pradesh & 669 & 13000\\
Haryana & 300 & 25000\\
Punjab & 260 & 35000\\
\end{tabulary}}
\begin{tablenotes}
\item[] \footnotesize Notes:
\item[1] \footnotesize This table is very nice but this note is
very long, so long that it goes wider than the table
\item[2] \footnotesize This is a second note. But this is not
very wide.
\item[] \footnotesize Source: akshd aksjhd akjshd
\end{tablenotes}
\end{threeparttable}
\end{table}

\chapter{Chapter two starts here}
\section{Heading}

\lipsum[4]

\end{document}

enter image description here

Related Question