Graphics, Figures & TablesAdditional Space between Table and its Caption

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
NELLLY
Posts: 113
Joined: Thu Nov 26, 2009 2:21 am

Additional Space between Table and its Caption

Post by NELLLY »

Hi,

I want to get a larger space between the table captions and the bottom of the tables in my document. I used the package caption to do this.

Code: Select all

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{caption}
\captionsetup[table]{belowskip=2pt}

\begin{document}
  \begin{table}[!ht]
    \caption{Composantes}
    \label{Composantes}
    \centering
    \begin{tabular}{cc}\hline
      Table Head & Table Head \\ \hline
      Some Values & Some Values \\
      Some Values & Some Values \\
      Some Values & Some Values \\ \hline
    \end{tabularx}
  \end{table}
\end{document}
I get the following error.

Code: Select all

Undefined control sequence \captionsetup
What should I do?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Additional Space between Table and its Caption

Post by localghost »

As a matter of fact tables have their captions above them. For that the caption package offers the option tableposition=top for an appropriate skip between caption and table.

If \captionsetup is unknown, make an update of the package.


Thorsten
NELLLY
Posts: 113
Joined: Thu Nov 26, 2009 2:21 am

Re: Additional Space between Table and its Caption

Post by NELLLY »

I updated the package and it works well now. Thanks.
Post Reply