0

I have a problem. It used to work perfectly, but right now it changed and I can't figure out why.

So, the first section (for example 1.1) I used blank lines. These blank lines were converted to indentations, as they should between paragraphs. I did the same with section 1.2. Now I just noticed that the indentations in section 1.1 are gone and replaced by actual blank lines. When I remove the blank lines it just converts to an entire flowing text.

Why does this happen?

I can upload the source code. But I'm in quite a hurry at the moment, so my apologies! And maybe this is a common problem so it could have a simple solution that everyone knows of the top of their heads.

EDIT: I just noticed that this only happens when I have a footnote in that section. WHen I remove it, the blank lines are gone and return to indentations.

enter image description here

13
  • I just noticed that it happens when I add a footnote to the page Commented Jun 17, 2016 at 16:09
  • 1
    welcome to tex.sx. in the image you posted, on the right, the indentations are still there, after the "white lines". what is happening, i think, is that the next page starts with something large that won't fit on this page, so the paragraphs are spread apart. try adding \raggedbottom in your preamble. that will make the bottoms of the pages uneven instead. Commented Jun 17, 2016 at 16:10
  • Your document is probably two-sided (twoside) and LaTeX tries to finish all pages at the same line on the bottom. Try \raggedbottom.
    – Johannes_B
    Commented Jun 17, 2016 at 16:11
  • Welcome to TeX.SX! My guess is that in the next page you have a figure declared with [H].
    – egreg
    Commented Jun 17, 2016 at 16:11
  • Thanks for the response everyone: I don't have a figure with [H] declared. But as I said: when I remove the footnote (visible in the image), the blank lines dissapear and the indentations are put back Commented Jun 17, 2016 at 16:15

1 Answer 1

0

The problem is that you are putting LaTeX between a rock and a very hard place.

A very rough overview of how LaTeX type set documents

LaTeX doesn't just put line after line after line. It tries to also maintain certain aesthetics about how the page should look. Some things it tries to avoid by default

  • Ending a page with a section heading
  • Ending a page with the first line of a paragraph
  • Beginning a page with the last line of a paragraph
  • In a book (two-sided) document format having the top and bottom of opposing pages at different heights
  • Having too much vertical space between lines/paragraphs

Usually the typesetting engine tries its best to adjust the whitespace between lines/paragraphs, moving some lines from one page to another, and do other sorts of adjustments so that all of the above (and other things) can be avoided at the same time. But sometimes it is just not possible (because the text you give it just happens to be the "wrong length"). When this happens, it will violate one rule in other to make other rules happier. Which rule to violate depends on the penalties you assign to them (and there are some defaults built into the various document classes).

What likely is happening

You probably have the section title set in relatively large font. And chances are, if you read the compile log provided by LaTeX, you will see that you have an underfull vbox warning. (See also this question.)

Before inserting the footnote, the text probably looks something like this:

Page n:

xxxxxxxxxxxxxxxxxxx
  xxxxxxxxxxxxxxxxx  
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxx  
 .....
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx

Page n+1

xxxxxxxxxxxxxxxxxxx
   xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
 ....
SECTION TITLE
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx

Page n+2

xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
.....

After inserting your footnote (which takes up some space), some of the text on page n gets pushed to page n+1, so that LaTeX is facing the choice between the bottom of Page n+1 looking like

....
SECTION TITLE
xxxxxxxxxxxxxxxxxxx

which its aesthetics tell it not to do, or moving the section title to the next page. But if it makes the section title to the next page, the space that it would otherwise have occupied on Page n+1 is now blank. And leaving it like that would violate the rule about having the bottom of the pages lining up.

So to compensate, every paragraph on page n+1 is shifted somewhat. If you only have two paragraph breaks on page n+1, and the space that used to be occupied by the section title and the first line of the next paragraph adds to to be about three lines in height, you will see a gap between paragraphs with height about 1.5 lines being inserted.

(The details of the above description may not be 100% correct, or 100% describing your situation. Short of seeing your code we cannot say what is the exact reason. But the general idea should illustrate to you what is happening.)

What do you do?

Nothing.

It is apparent to me that you are still in the middle of composing the document. And because your content is still mutable, this is not the time to be worrying about whitespace issues. (For that matter, this is not the time to be worrying about fine tuning any formatting issues. If you "fix" it now you will likely run into another problem later.)

When you are finally done with writing your manuscript, and is ready to print it, then it is time to worry. And what you can do is either change the penalties or change the stretchiness of paragraphs or rewrite the text (increasing/decreasing the lengths of individual paragraphs, move the location of figures, moving equations inline or into display) so that the "problematic behavior" no longer appears. If you are not very comfortably familiar with what TeX does to typeset your text, you are most likely better off doing the last of the options above.

This Q+A item may also be helpful.

2
  • The problem is indeed fixed: It was a combination of this and the fact that the footnote was just at the end of the page --> tex.stackexchange.com/questions/3045/… --> see the answer of Youssi farjoun. By changing the float of the picture the entire layout changed so that the titles were in the right place and no longer a problem. Thank you and @egreg for helping me out with this. I must be blatantly honest when I say that as a programmer I do not like latex at all Commented Jun 17, 2016 at 18:14
  • @DriesCoppens: to draw a programming analogy: fussing about whitespace issues like the one above is similar to code optimization. You don't want to do it too early in the process, but some awareness of best practices (which exist due to LaTeX's inherent limitations) go a long way. Commented Jun 17, 2016 at 21:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .