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
Graphics, Figures & Tables ⇒ Spacing between figure and text
Spacing between figure and text
- Attachments
-
- Image.png (90.05 KiB) Viewed 5233 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Spacing between figure and text
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 , a float page on its own [p], for better placement and page breaks.
I would use
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
Stefan
[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 , 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
LaTeX.org admin