## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Spacing between figure and text

Information and discussion about graphics, figures & tables in LaTeX documents.
Amlaser
Posts: 5
Joined: Wed Apr 07, 2021 10:08 am

### Spacing between figure and text

I'm currently writing my thesis using latex and normally there are a lot of figures and texts. For figures, I use [h] to place the float here. If the paragraph after the figure is not enough to fill the whole page, Latex makes a gap between the figure and the text to fill the whole page, see the attached image. It seems for me latex starts to fill the page from the bottom to the top. I'm using Overleaf. Does anyone have an idea, how I can overcome this problem?

Regards
Attachments
Image.png (90.05 KiB) Viewed 109 times

Stefan Kottwitz
Posts: 9678
Joined: Mon Mar 10, 2008 9:44 pm
Hi,

[h] means "allow the figure here". It alone doesn't allow the figure to float to the top of a page [t], the bottom of a page [b], a float page on its own [p], for better placement and page breaks.

I would use `[htbp!]` for most flexible placement.

Furthermore, such a gap can occur if your document does text balancing on pages to have the text always end at the bottom of the page, so, aligned at the bottom.

Try the command `\raggedbottom` in the document preamble to see if it's what you want.

Stefan