0

I'm using the IEEE template available here. I have an annoying problem were sometimes, a paragraph starts with a line indentation (which I want) but sometimes a blank line is created which I don't want. Below is an example.

This is what I want and this works. THen, for some reason, this happens,

Anyone have a suggestion on why this happens and how I can fix it?

  • 1
    You mean vertical white space and not new line I assume. This is normal LaTeX behavior (filling the page nicely). Maybe rephrase your question: Avoid vertical white space between paragraphs in IEEE template (which one?) – Dr. Manuel Kuehner May 2 '18 at 19:29
  • Possibly add \raggedbottom to the preamble. – Torbjørn T. May 2 '18 at 19:39
  • Please add the name of the template. – Dr. Manuel Kuehner May 2 '18 at 19:39
  • 1
    @Dr.ManuelKuehner The OP has linked to the actual template code; isn't that better than the name of the template ("IEEE for journals template with bibtex example files included / IEEE template by Michael Shell")? – ShreevatsaR May 2 '18 at 19:45
  • 1
    @Dr.ManuelKuehner BTW, note that it is possible (though in this case unlikely I guess) that the question is not relevant to IEEEtran.cls (which is no the template but the class file used by the template), and applies only to the specific template the OP has used. (Though again, in this case I think this is a fairly generic question not even specific to IEEEtran.cls.) – ShreevatsaR May 2 '18 at 20:36
2

All of this is in the comments, but possibly hard to follow if you are not familiar already with the language.

Basically, TeX places some stretchy space, between paragraphs. It's stretchy because it's not a fixed amount: it can expand (a bit) or contract (a bit). This is the \parskip of which you will read in the comments.

When TeX breaks up a page, it tries to some extent to arrive at a break which will "work well". The ideal break would be one which left every page naturally the same length (nice and neat). But other things can intervene (like leaving odd lines on the next page, or one line on the previous page, and so forth). So it doesn't always work out.

When TeX can't break a page perfectly, it will do one of two things (no other choice is possible really): it will either end the page early, so that one page is shorter than the other, or expand the stretch space between paragraphs to make up the slack. The usual default (\flushbottom) is to try to line up the bottom parts of the page by putting space between paragraphs. Some would say this was a bad design decision, but that bird has flown, though the LaTeX 3 project has page breaking as a major topic.

What's happening here is that for some reason (and those in the know suspect it's because there's a big block, probably a float, that needs to go at the top of the next page), TeX isn't finding a good line break, so it is ending up with a short page, and it is then expanding that stretchy space (quite considerably stretchy, which is why people are talking about the values of \parskip in this class) to make the bottom lines align (to arrive at the fabled flush bottom).

The best ways to deal with this are either to track down the source of the problem (i.e. why it's having a hard time breaking the page nicely: probably a float or a heading) and rewrite the manuscript to eliminate it) or to tell TeX not to bother getting the bottom of pages to line up, using the apparently scatalogical but quite harmless command \raggedbottom. Unless you are aiming for double-sided printing and really care about the typographical niceties, that's probably the best thing to try. (Sometimes you can enlarge a page a bit too, using \enlargethispage, to solve such problems).

TL;DR TeX is putting this space in in order to get the bottom lines of the pages to line up exactly because it's not able to find a clean page break. Either adjust your text to help it break cleanly, or tell it not to bother lining up the bottom of the page. Practical tip: solve this kind of problem last, when the whole manuscript is otherwise complete, because it's a waste of time making adjustments which may have to change later.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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