1

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?

  • 4
    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
3

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.

  2. Put in your code

    \begin{table}
      \caption{....}
      \label{....}
      TABLE BODY
    \end{table}
    

    This will take care of the caption placement.

  • 1
    koma script classes also provide the class option: captions=tableheading – MaxNoe Mar 18 '15 at 17:50
  • 1
    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
  • @barbarabeeton :) Unfortunately some of us do not have the luck of working exclusively with ams classes – Boris Mar 19 '15 at 0:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.