# Space between caption and table in TeX

I have this code

\begin{table}[h]
\caption{Numerical example geometry}
\label{tab_numerical_geo}
\begin{center}
\scalebox{0.9}{
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
$d^A$  & $d^B$  & $d^C$  & $l^A_{12}$ & $l^C_{12}$ & $h^A$ & $h^C$ \\
\hline
-0.4434 & 0.3455 & 0.7798 & 0.1023 & 0.1523 & 0.04 & 0.023 \\
\hline
\end{tabular}
}
\end{center}
\end{table}


I'm using \scalebox to reduce the size of the table, but it shrinks the space between the caption and the table. Without using it, there is a space, which is nice for my article.

Does anyone know how to reduce the size of the table while keeping that space? I've tried with \footnotesize instead of \reducebox, but the result was the same. Thanks!

• Welcome to SE! Please make your code sniped as small document beginning with documentclass{...} and ending by end{document}, that it can be compiled. – Zarko Feb 14 '16 at 13:00
• scalebox does not shrink the space (but scaling the table should be an absolute last resort, and even then don't do it:-0 – David Carlisle Feb 14 '16 at 13:04

Some suggestions:

• To create a bit more spacing between the caption and the tabular material, load the caption package and specify the desired value for the option skip; in the example below, I set skip=0.5\baselineskip.

• Don't use a center environment inside a table; instead, use the \centering macro.

\hline
d^A\TBstrut & d^B  & d^C  & l^{A}_{12} & l^C_{12} & h^A & h^C \\
\hline
-0.4434\TBstrut & 0.3455 & 0.7798 & 0.1023 & 0.1523 & 0.04 & 0.023 \\
\hline
\end{array}$\end{table} \end{document}  Some suggestions for typesetting the table are below. Without knowing your constraints it's difficult to be more concrete. To make sure the caption isn't getting too close to the top of the table, I've used a \strut at the end of the caption.  \documentclass{article} \usepackage{booktabs} \begin{document} \begin{table} \caption{Numerical example geometry\strut} \label{tab_numerical_geo} \centering \begin{tabular}{@{}ccccccc@{}} \toprule$d^A$&$d^B$&$d^C$&$l^A_{12}$&$l^C_{12}$&$h^A$&$h^C$\\ \midrule$-0.4434$& 0.3455 & 0.7798 & 0.1023 & 0.1523 & 0.04 & 0.023 \\ \bottomrule \end{tabular} \end{table} \begin{table} \caption{Numerical example geometry\strut} \label{tab_numerical_geo2} \catcode!=\active \def!{\phantom0} \centering \begin{tabular}{@{}lr@{}} \toprule$d^A$&$-0.4434$\\$d^B$&0.3455 \\$d^C$&0.7798 \\$l^A_{12}$&0.1023 \\$l^C_{12}$&0.1523 \\$h^A$&0.04!! \\$h^C$&0.023! \\ \bottomrule \end{tabular} \end{table} \begin{table} \caption{Numerical example geometry\strut} \label{tab_numerical_geo3} \catcode!=\active \def!{\phantom0} \centering \begin{tabular}{@{}lr@{\qquad}lr@{}} \toprule$d^A$&$-0.4434$&$d^B$&0.3455 \\$d^C$&0.7798 &$l^A_{12}$&0.1023 \\$l^C_{12}$&0.1523 &$h^A$&0.04!! \\$h^C$&0.023! \\ \bottomrule \end{tabular} \end{table} \end{document}  • Hi, I've tried your code and there is no space between the caption and the table – Toan Feb 14 '16 at 13:57 • If your want more space, you could add a \medskip after the \caption. – Christian Lindig Feb 14 '16 at 14:01 Use package caption and \resizebox: \documentclass[twocolumn]{article} \usepackage{caption} \usepackage{graphicx} \usepackage{booktabs} \usepackage{blindtext} \begin{document} \blindtext \begin{table}[!htb] \caption{Numerical example geometry\strut}\label{tab_numerical_geo} \centering \resizebox{\linewidth}{!}{% \begin{tabular}{@{}ccccccc@{}}\toprule$d^A$&$d^B$&$d^C$&$l^A_{12}$&$l^C_{12}$&$h^A$&$h^C$\\ \midrule$-0.4434$& 0.3455 & 0.7798 & 0.1023 & 0.1523 & 0.04 & 0.023 \\\bottomrule \end{tabular}} \end{table} \blindtext \end{document}  In lack of information, why you actually use \scalebox, I assume, that your document (i) has two columns, and that (ii) you will be willing to use mdwtab packages which enables to design nice tables ... With this my assumptions the MWE below generate: \documentclass[twocolumn]{article} \usepackage{caption} \usepackage{mdwtab} \usepackage[showframe]{geometry} \usepackage{lipsum} \begin{document} \lipsum[1] \begin{table}[h] \footnotesize \setlength{\tabcolsep}{3.5pt} \caption{Numerical example geometry} \label{tab_numerical_geo} \centering \begin{tabular}{|*{7}{Mc|}} \hlx{hvv} d^A & d^B & d^C & l^A_{12} & l^C_{12} & h^A & h^C \\ \hlx{vhv} -0.4434 & 0.3455 & 0.7798 & 0.1023 & 0.1523 & 0.04 & 0.023 \\ \hlx{vh} \end{tabular} \end{table} \lipsum[2-5] \end{document}  option showframe in geometry package is used only to show page layout. In real-life, it had to be omitted. Addendum: If you don't like to use mdwtab you can stick with classic tabular elements: replace hlx{...} with hline and column type Ml with >{$}c<{\$}. For this column type you had to load package array. Of course, obtained table (to my taste) is not so beautiful.

Regarding caption: if you use package caption, you will obtain better spacing between caption and table without any manual adjustment.

Try to add \bigskip after the caption. It will add a blank line which will create a desired space.

\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{table}[h]
\caption{Numerical example geometry}
\bigskip
\label{tab_numerical_geo}
\begin{center}
\scalebox{0.9}{
...