[Tex/LaTex] How to increase the space between text and a table

line-spacingtables

Here is my code:

Volume of the hall V = 1500 $m^3$ \\
\noindent \begin{tabular}{| c | c | c |}
\hline
\textit{Surface} & \textit{Area ($m^2)$} & \textit{Coefficient of absorption}\\
\hline
ceiling & 140 & 0.8 \\
\hline
walls & 260 & 0.03 \\
\hline
floor & 140 & 0.06 \\
\hline
\end{tabular}

This code results in a table that is very close to the text. I want to increase the space to at least 2cm. I tried adding a double line break too. It threw back some kind of hbox error. please help.

Best Answer

You can set vertical space with \vspace{2cm}. I personally think that the standard space provided is quite pleasing, your opinion might differ. I've updated your code snippet to a full example, also adding some things which I think are good practices (as suggested by @Yori in the comments).

  • I'm using the middle-european KOMA script class, which has a global parskip option, taking care of both indentation and skipping of paragraphs.
  • The siunitx package helps with typesetting SI units (and aligning numbers in the table with the S column specifier)
  • booktabs enhances the quality of the table presentation (read it's manual for some insight).
  • blindtext helps to fill the page and
  • hyperref makes for nice referencing.

I'm fully aware that your opinion might differ, but I think the table/text combination look good like that. If you'd like to change it, you can comment line 1, uncomment lines 2--4 and play with the \vspace{2cm} option until you get a result that pleases your eyes.

\documentclass[parskip]{scrartcl}
%\documentclass{article}
%\setlength\parindent{0pt}
%\setlength\parskip{10pt}

\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{blindtext}
\usepackage{hyperref}

\begin{document}

\blindtext

Volume of the hall \(V = \SI{1500}{\cubic\metre}\), details can be found in \autoref{tab:hall details}.

%\vspace{2cm}

\begin{table}
    \centering
    \caption{Details of the hall}
    \label{tab:hall details}
    \begin{tabular}{ccS}
        \toprule
        Surface & Area (\si{\metre\squared}) & {Coefficient of absorption}\\
        \midrule
        ceiling & 140 & 0.8 \\
        walls & 260 & 0.03 \\
        floor & 140 & 0.06 \\
        \bottomrule
    \end{tabular}
\end{table}

\blindtext

\end{document}

Screenshot

Related Question