[Tex/LaTex] Table caption with centered small-caps title and fully-justifed description

captionstables

I often see tables with centered titles and fully-justified descriptions. Here is an example.

Table caption I would like (i.e., centered title and fully-justified description.

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.

My failed attempt with 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 (from ragged2e):

enter image description here

\documentclass{article}

\usepackage[font=sc]{caption}

\usepackage{lipsum,ragged2e}

\newcommand{\figuredesc}[1]{% Figure description
  \begingroup
  \par
  \justifying\small
  \noindent #1
  \par
  \endgroup}

\begin{document}

\begin{table}[htb]
  \centering
  \caption{This could win me the Nobel Prize in Economics.}

  \figuredesc{Fine, this could win me the Nobel \emph{Memorial} Prize in Economic Sciences.~\lipsum[1]}

  \begin{tabular}{ *{4}{c} }
    \hline
    A & 1 & 2 & 3 \\
    B & 1 & 2 & 3 \\
    \hline
  \end{tabular}
\end{table}

\end{document}