I am having trouble with setting space before and after a table. Here is my code for a ten-column table:
\begin{tabular}{cccccccccc}
\toprule
..
..
\bottomrule
\end{tabular}
As you can see, it can't be any simpler. In my text body I've used 1.5 spacing and I want that to be the spacing between the text and the table above and below. However, \setlength{\intextsep}{1.5pt}
doesn't do a thing no matter what size I choose, be it 1.5pt or 6pt.
The problem is partially solved by beginning with the command \begin{tabular}[t]
, as the [t]
part aligns the table with the text above, but the text below the document remains right below the bottom rule.
Best Answer
\intextsep
deals with the gap between a float within the text body and the rest of the text around it (see Remove space after figure and before text). Since you're using only atabular
, there is no floating behaviour, hence the non-response from setting\intextsep
.If you wish to add some space above/below the non-floating
tabular
, do so usingwhere you adjust
\baselineskip
to suit your needs. You may even consider creating a new length (say)\tabularsep
which you set in your preamble to a suitable length.Of course, you could also wrap the
tabular
inside atable
(which is a float) with an[H]
specifier (provided by thefloat
package) so that it could be treated like a regulartabular
. That way an adjustment to\intextsep
should work as expected.