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

  • I just noticed that it happens when I add a footnote to the page – Dries Coppens Jun 17 '16 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. – barbara beeton Jun 17 '16 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 Jun 17 '16 at 16:11
  • Welcome to TeX.SX! My guess is that in the next page you have a figure declared with [H]. – egreg Jun 17 '16 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 – Dries Coppens Jun 17 '16 at 16:15
  • @DriesCoppens The issue is not the footnote, but what is in the next page to the one with the big white stripes, perhaps a section with a long title. The footnote is just the symptom, not the disease. – egreg Jun 17 '16 at 16:43
  • @egreg. Ah, gotcha. Well on the next page is only text and the last two lines (when the indentations are used) are the beginning of 1.2 The blank lines come back when I add the footnote on the previous page, and in that case the next page is only text with blank lines. 1.2 then starts on the page after that following a figure. Let me know if you need more info (source code/pics/..) – Dries Coppens Jun 17 '16 at 17:08
  • Sorry, but it's difficult to diagnose without seeing the code. I'm not sure what you are referring to by “indentation”. – egreg Jun 17 '16 at 17:11
  • @egreg. Yeah I realise, I'm sorry. I've tried to code it here, but it's hard to bring over enough info without flooding with text. Indentation: normally when I use in latex (texstudio) a blank line, that is then compiled to an indentation of the next paragraph. but when I add the footnotes, there are no longer just indentations between paragraphs when compiled, but also have a blank lines between them (like in the image) – Dries Coppens Jun 17 '16 at 17:20
  • @egreg (I can't chat yet due to being new to the latex forum). Let me know what you'd like to see to solve the problem and I'll see if I can provide enough – Dries Coppens Jun 17 '16 at 17:24
  • @DriesCoppens If you can upload the code somewhere, it would be the best way. – egreg Jun 17 '16 at 17:43
  • https://drive.google.com/file/d/0B62VCnggtg37dW1LamlZMFRNaDQ/view?usp=sharing The problem occurs when I add a footnote (ctrl-f: VOETNOOT1). The tekst in the first following section (anomalie-en degradatiedetectie) then has the problem. This is all the content of that document – Dries Coppens Jun 17 '16 at 18:05
  • Oh, you also have a figure? try moving the figure another place (since it is floating, try moving it two or three paragraphs up in your source code). – Willie Wong Jun 17 '16 at 18:07

1 Answers1

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.

Willie Wong
  • 24,733
  • 8
  • 74
  • 106
  • 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 --> http://tex.stackexchange.com/questions/3045/keep-all-footnotes-on-the-according-page --> 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 – Dries Coppens Jun 17 '16 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. – Willie Wong Jun 17 '16 at 21:27