GeneralStrange empty spaces after paragraphs, figures, etc

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
axelh
Posts: 16
Joined: Wed Jan 23, 2008 12:22 pm

Strange empty spaces after paragraphs, figures, etc

Post by axelh »

Hi,

I am writing my PhD, learning Latex at the same time, and after 130 pages feeling already like a medium-level user :)

Still, there is something which drives me crazy, and I have no idea why this happens. The spacing (vertical blank space before start of text) is not constant throughout the document. I see it at several places:
*After figures - see attached image showing a case of an extremely large blank space. This happens in some images only, other works fine.
*Before the subsection titles - the spacing is occasionally different for some subsections
*Occasionally between two consecutive text paragraphs, there is more blank space than there should

Anybody has a clue why this happens and if there is some way to fix it? It does not look professional now...

In case it is relevant, here the Document declaration (used from a template I got):
\documentclass[12pt,a4paper,bibliography=totoc,index=totoc,headsepline,footsepline,plainfootsepline,BCOR12mm,DIV13]{scrbook}

Thank you!!!
Attachments
Margins below figure
Margins below figure
Latex_Margins.JPG (19.33 KiB) Viewed 37454 times

Recommended reading 2024:

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

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

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

Re: Strange empty spaces after paragraphs, figures, etc

Post by localghost »

The problem could be related to the stuff that comes after the last paragraph seen on the page in the attached picture. LaTeX tries to fill the page to the bottom and spread the contents to make it fit, as this is the default setting.


Best regards
Thorsten¹
User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

Re: Strange empty spaces after paragraphs, figures, etc

Post by Stefan Kottwitz »

Hi Axel,

try \raggedbottom in your preamble.

Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Strange empty spaces after paragraphs, figures, etc

Post by localghost »

Stefan_K wrote:[...] try \raggedbottom in your preamble. [...]
This is the most common solution. But it can't be the major goal to change the page layout for the whole document just because of one problematic page. I suggest to add something suitable right behind this last paragraph.

Code: Select all

\vfill
~
axelh
Posts: 16
Joined: Wed Jan 23, 2008 12:22 pm

Re: Strange empty spaces after paragraphs, figures, etc

Post by axelh »

Hi again,

Thank you for the answers.

localghost: maybe I explained the problem wrong. The problem is not in one single page, it happens several times all along the 130 pages of the document! The image I uploaded was just one extreme example.

I added the \raggedbottom, the output is different (see image attached), the spacing before the paragraph is not so dramatic, the problem now is the spacing after the paragraph! :) I guess this behavior is because Latex considers that there is not enough space left to start the next section in the same page, right?

None of the solutions look really nice... maybe adding some tolerance on how the content can "invade" the page margin would be possible? Any way to do that easily without jeopardizing the rest of the layout?

If anybody has a better solution, I would be happy!!

Thanks
Attachments
Latex_Margins2.JPG
Latex_Margins2.JPG (37.68 KiB) Viewed 37423 times
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Strange empty spaces after paragraphs, figures, etc

Post by phi »

axelh wrote:I guess this behavior is because Latex considers that there is not enough space left to start the next section in the same page, right?
Exactly.
axelh wrote:None of the solutions look really nice... maybe adding some tolerance on how the content can "invade" the page margin would be possible? Any way to do that easily without jeopardizing the rest of the layout?
Normally the default \flushbottom plus some manual tweaking works best. The manual tweaking has to be the final step right before publication, because everything else could alter the whole layout dramatically.
The possibilities for manual layout tweaking are basically the commands to control page breaks (\pagebreak, \nopagebreak, …), and \enlargethispage.
axelh
Posts: 16
Joined: Wed Jan 23, 2008 12:22 pm

Strange empty spaces after paragraphs, figures, etc

Post by axelh »

Normally the default \flushbottom plus some manual tweaking works best.
With flushbottom, without additional manual tweaking, it brings me back to the original image I uploaded. I have to say that I prefer the \raggedbottom result rather than the flash one.

Manual tweaking helps for sure, but I lack the knowledge to do it... and I will probably be so stressed at the end that I won't have time/patience for that :)

Thanks anyway, I will just live with that.
Post Reply