I use the following table in Latex. And I want to decrease the distance between the caption and the table. And also I want to adjust the distance between the table and the above text; the distance between the caption and the following text.
So I search on google. I find \captionsetup[table]{belowskip=0pt}
or \setlength{\abovetopsep}{10pt}
and so on. But they do not work. I do not see the difference.
\begin{tabularx}{\textwidth}{XXXXX}
\toprule
F & G & E \\\midrule
convex & convex &- \\\midrule
$C^{1,1}$ & convex &- \\\midrule
- & - & convex\\\midrule
convex &convex &- \\\bottomrule
\end{tabularx}\captionof{table}{Comparison of solvers}
Best Answer
Instead of
captionof
you can puttabularx
in atable
float environment and use the normalcaption
. Then you should be able to adjust spacing using\vspace{}
directive.For instance,
and change the vspace arguments to what you want. Negative value will make texts come closer and positive values will increase space.