在下面的 MWE 中,我希望表格标题左对齐,并且最大宽度与表格宽度相同。
\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}
答案1
把标题放在里面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}