Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a strange problem with spacing between section and content header. Take a look at the picture below.

Section spacing problems

You can see that spacing between headers are different. I couldn't reproduce this error for simple documents, so I uploded my whole chapter here.

What is even stranger, everything looks normal if I only delete a couple of last lines from the chapter. The source code is a little big that is why I decided to upload it on a server. What should I do to restore good spacing between sections presented in the picture? In the other chapters everything looks OK.

share|improve this question
add comment

2 Answers

up vote 8 down vote accepted

The problem here is that LaTeX is trying to do a decent job of making the text look presentable by not allowing orphaned words before an equation environment. Taken from the Wikipedia entry on widows and orphans:

In typesetting, widows and orphans are words or short lines at the beginning or end of a paragraph, which are left dangling at the top or bottom of a column, separated from the rest of the paragraph.

The happens at the bottom of page 4 in your document:

Orphaned word

If your document is not at a final stage of production, then I would suggest not worrying about this until later. That is because small changing in your document might end up getting rid of this problem without you having to do it manually. However, if you want to make a change to accommodate for this, you have a couple of options.


Option 1: You modify the text in the chapter before this point (by adding or removing text) so the spacing changes. This is what happens when you " delete a couple of last lines from the chapter". This is not optimal, since you may have to change the entire chapter/section flow. However, it remains an option.


Option 2: You increase the text block size just for this page, with

...
\enlargethispage{\baselineskip}% Enlarge this page by \baselineskip
\begin{equation}
  \sum_{j=1}^{n}u_{ij} > 0, \forall i \in {1,...,c} \label{eqn:nonempty}
\end{equation}
oraz
\begin{equation}
  \sum_{i=1}^{c}u_{ij} = 1, \forall j \in {1,...,n} \label{eqn:one}
\end{equation}
... 

Orphaned word removed via \enlargethispage{\baselineskip}

Note: Be sure to remove this requirement if there is a change in your document that would make this enlargement unnecessary.


Option 3: Your margin specification via geometry is:

\usepackage[left=3.0cm,right=3cm,top=3.0cm,bottom=3.0cm]{geometry}

You could simply this to

\usepackage[margin=29.5mm]{geometry}% Margins of 29.5mm

to reduce the margins on all sides of your document from 30mm to 29.5mm - effectively increasing the text block horizontally by only 1mm. This causes the document to be typeset with a marginal difference, allowing for a bit more to fit on the page and a better break at the bottom of page 4:

Orphaned word remove with a change in margin specification

share|improve this answer
1  
+1. I think option 1 is the most useful. Option 2 is simply too odd and option 3, like any other methods involving changing the layouts should not be recommended. God knows what will happen elsewhere when someone change the layout just to a problem in one place. Instead, changing a few words can be most “local” in my experience –  Yan Zhou Aug 6 '11 at 7:57
    
@Werner Works like a charm :) Thanks a lot –  geronimo Aug 6 '11 at 10:39
add comment

perhaps the answer is too late. I faced the same problem but using \raggedbottom in the preface solved everything.

share|improve this answer
    
Welcome to TeX.sx! –  Peter Jansson Mar 3 '13 at 14:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.