# Table caption before the table

I'm creating this table

\begin{table}[htbp]
\renewcommand{\arraystretch}{1.3}
\setlength{\tabcolsep}{2mm}
\centering
\begin{tabular}{!{\vrule width 1.2pt}c!{\vrule width 1.2pt}c!{\vrule width 1.2pt}}
\noalign{\hrule height 1.2pt}
Intervalli per $\log_{10}\lambda_S$ e $\log_{10}\lambda_T$& Miglior valore                                          \\
\noalign{\hrule height 1.2pt}
$\log_{10}\lambda_S \in \{-12,-11,\ldots,+1\}$  & \multirow{2}{*}{$\underline \lambda = (10^{-10},10^{0})$}             \\
\cline{1-1}
$\log_{10}\lambda_T \in \{-8,-7,\ldots,+1\}$        &                                                           \\
\noalign{\hrule height 1.2pt}
$\log_{10}\lambda_S \in \{-11,-10.5,\ldots,-9\}$    & \multirow{2}{*}{$\underline \lambda = (10^{-9.5},10^{0})$}        \\
\cline{1-1}
$\log_{10}\lambda_T \in \{-1,-0.5,\ldots,+1\}$  &                                                           \\
\noalign{\hrule height 1.2pt}
$\log_{10}\lambda_S \in \{-10,-9.875,\ldots,-9\}$   & \multirow{2}{*}{$\underline \lambda = (10^{-9.625}, 10^{0})$} \\
\cline{1-1}
$\log_{10}\lambda_T \in \{-0.5,-0.375,\ldots,+0.5\}$        &           \\
\noalign{\hrule height 1.2pt}
\end{tabular}
\caption{Analisi di $\mathrm{GCV}(\underline \lambda)$ per la provincia di Venezia, caso senza covariata}
\label{tab:Ven}
\end{table}


But the caption is after the table. How can I have it before the table?

• all you need to do is move the \caption info above the table code. (i'm sure this has been asked before. i'll look.) – barbara beeton Mar 18 '15 at 16:01

Barbara already advised you to move \caption before the table. But this is not the full story: LaTeX sets the vertical spaces around the table assuming the caption is below it (an unfortunate decision, I'm afraid). So you need to correct this as well.

1. Add to the preamble of your document \usepackage[tableposition=top]{caption}. This will take care of vertical spacing.

\begin{table}

• koma script classes also provide the class option: captions=tableheading – MaxNoe Mar 18 '15 at 17:50
• ah, barbara keeps forgetting that the ams document classes assume that for table, caption is assumed to be above. or rather, that the space above and below the caption will work in a reasonable fashion for either location. – barbara beeton Mar 18 '15 at 18:29