I often see tables with centered titles and fully-justified descriptions. Here is an example.
I know how to use the caption
package to alter the label and title, but I can't figure out how to get the description fully justified. Instead, my description adopts the \centering
that I use to get the table centered.
What is the best way to do this? Here is my best attempt.
\documentclass{article}
\usepackage[font=sc]{caption}
\usepackage{booktabs}
\usepackage{lipsum}
\begin{document}
\begin{table}
\centering
\caption{This could win me the Nobel Prize in Economics.}
{\noindent Fine, this could win me the Nobel \emph{Memorial} Prize in Economic Sciences.~\lipsum[1]}
\begin{tabular*}{\textwidth}{c @{\extracolsep{\fill}} ccc}
\toprule
xx&1&2&3\\
xx&1&2&3\\
\bottomrule
\end{tabular*}
\end{table}
\end{document}
But this gives me a centered description.
I see there is a threeparttable
package, but I don't want footnotes. I would like the description to immediately follow the title.
Best Answer
Since you may be using such descriptions for figures regularly, define a macro to take care of the formatting; this includes keeping the text justified using
\justifying
(fromragged2e
):