Text Formattinghow to change space below tables

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
rockybalboa
Posts: 15
Joined: Wed Mar 04, 2009 12:33 am

how to change space below tables

Post by rockybalboa »

Hi, I would like to change the space that separates the table to the text. any help is greatly appreciated.

\begin{table}
blbla
\end{table}
text text


thanks

Javier

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

how to change space below tables

Post by kaiserkarl13 »

If you mean the distance between the text and floats, try

Code: Select all

\setlength{\textfloatsep}{1cm}  %% Or whatever length
If you mean the distance above the captions, try

Code: Select all

\setlength{\abovecaptionskip}{1cm} % Or whatever length
fja
Posts: 24
Joined: Mon Dec 07, 2009 2:10 am

Re: how to change space below tables

Post by fja »

But, what if I need the \caption under the table?

The space under tables and figures isn't the same: for tables, it's bigger. And it's also different in longtable.

So, is there a way to normalize this? i.e., all the captions with the same space under the table/fig/longtable, and between them and the text under them.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

how to change space below tables

Post by Stefan Kottwitz »

I would use the caption package for such customizations.

Stefan
LaTeX.org admin
fja
Posts: 24
Joined: Mon Dec 07, 2009 2:10 am

how to change space below tables

Post by fja »

Well, actually I'm using it:

Code: Select all

\usepackage[font=small,format=hang,parskip=1pt]{caption}
But it only works with \figures, but it isn't working with \tables and \longtable.

For tables, there are at least 1 cm between the table and the caption, and between caption and the next paragraph, 1.5cm. And in \longtable, 0.1 and 1.5 cm (respectively), and for \figures, 0.5 and 1.0 cm.

So, I read the caption document, and I didn't find how to deal with this.
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

how to change space below tables

Post by svend_tveskaeg »

I normally use

Code: Select all

\usepackage[figureposition=bottom,tableposition=top]{caption}
I am not sure exactly what you want, but maybe you can modity the above code and get what you want.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
fja
Posts: 24
Joined: Mon Dec 07, 2009 2:10 am

Re: how to change space below tables

Post by fja »

Ok, I just discovered the following: this only happens on one page with little text and 3, 3-lines, floating tables with the command \begin{table}[h]. Without the [h], the space is normal, but the tables move to another page ('cause they float, jeje). I need the tables where I wrote, so I need the parameter [h]. I need help here!

By the way, the \longtable uses its own spaces…
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

how to change space below tables

Post by Stefan Kottwitz »

Hi Javier,

you could also check if the reason is that LaTeX tries to fill the pages to equal height by inserting some space, in flush bottom mode. Try \raggedbottom in the preamble if you wish to avoid that.

Stefan
LaTeX.org admin
fja
Posts: 24
Joined: Mon Dec 07, 2009 2:10 am

Re: how to change space below tables

Post by fja »

Ok, I solved it!!!!

The problem with the \longtable is that it doesn't need the \begin{center} (and of course, the \end{center}) before the \longtable. Without the {center} the spaces under the table are those that I set up.
Post Reply