[Tex/LaTex] Tabular: title above and caption below

captionstables

I have a table that I would like to put the Title above and a caption below. Intuitively (though I know how troublesome intuition can be in something like LaTeX), I should be able to do as below:

\begin {table}[H]
\caption {Table Title} \label{tab:title} 
\begin{center}
\begin{tabular}{ >{\centering\arraybackslash}m{1.25in}  >{\centering\arraybackslash}m{.85in} >{\centering\arraybackslash}m{.75in} >{\centering\arraybackslash}m{.75in} >{\centering\arraybackslash}m{.75in} >{\centering\arraybackslash}m{.75in}}
\toprule[1.5pt]
{\bf Variable Name} & {\bf Regression 1} & {\bf Mean} & {\bf Std. Dev} & {\bf Min} & {\bf Max}\\ 
\midrule
text        &  text     & text      &  text     &  text     &text\\

\bottomrule[1.25pt]
\end {tabular}
\caption {Should be a caption}
\end{center}
\end {table}

The above produces:

              Table 1: Table Title
===================================================
Name   Regression 1   Mean   Std. Dev.   Min  Max
---------------------------------------------------
text    text           text    text     text   text
===================================================
         Table 5: Should be a caption

How can I force latex to suppress the numbering/create a "caption" in the regular sense?

Best Answer

Use default text for the second "caption". However,you shouldn't use the table environment, if you do not want to float the tabular. Use a minipage instead and also tabularx in this case:

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{tabularx,ragged2e,booktabs,caption}
\newcolumntype{C}[1]{>{\Centering}m{#1}}
\renewcommand\tabularxcolumn[1]{C{#1}}
\begin{document}

\begin{minipage}{\linewidth}
\centering
\captionof{table}{Table Title} \label{tab:title} 
\begin{tabular}{ C{1.25in} C{.85in} *4{C{.75in}}}\toprule[1.5pt]
\bf Variable Name & \bf Regression 1 & \bf Mean & \bf Std. Dev & \bf Min & \bf Max\\\midrule
text        &  text     & text      &  text     &  text     &text\\
\bottomrule[1.25pt]
\end {tabular}\par
\bigskip
Should be a caption
\end{minipage}

\bigskip
\begin{minipage}{\linewidth}
\centering
\captionof{table}{Table Title} \label{tab:title2} 
\begin{tabularx}{\linewidth}{@{} C{1in} C{.85in} *4X @{}}\toprule[1.5pt]
\bf Variable Name & \bf Regression 1 & \bf Mean & \bf Std. Dev & \bf Min & \bf Max\\\midrule
text        &  text     & text      &  text     &  text     &text\\
\bottomrule[1.25pt]
\end {tabularx}\par
\bigskip
Should be a caption
\end{minipage}

\end{document}

enter image description here

Related Question