Page LayoutParagraph Jumping to End of page

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
con20or
Posts: 4
Joined: Tue Oct 16, 2012 1:22 pm

Paragraph Jumping to End of page

Post by con20or »

Hello, first post:)

I started using latex a few months back, and i think its fantastic. never going to go back to MS Word.

Im writing a thesis and Im having some issues with paragraphs. For no reason, I get huge gaps between random paragraphs.

if i use \\ it happens

if i remove \\ it happens

ive tried looking at the class file 9its a standard university one) but cant see any reason for it.

i think i tracked the problem down today, it seems when there are two paragraphs on a page, it will end the second paragraph at the end of the page, not matter how big a gap it has to put in between the two paragraphs...

Im submitting in the next few weeks and getting desperate to find a fix!

Thanks in advance,

Conor.
Last edited by cgnieder on Tue Oct 16, 2012 1:47 pm, edited 1 time in total.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Paragraph Jumping to End of page

Post by Stefan Kottwitz »

Hi Conor,

welcome to the board!

It depends on your class file and your settings. Usually we need to see code to provide a fix. Here I just guess you typeset pages in a balanced mode, so LaTeX tries to fill all page equally, even if it means to insert vertical whitespace.

This can be switched off by adding

Code: Select all

\raggedbottom
to your document preamble. Then your pages would not be vertically balanced.

Stefan
LaTeX.org admin
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Paragraph Jumping to End of page

Post by cgnieder »

Hi Conor,

Welcome to the LaTeX community.

Without a Infominimal working example (if you don't know what that is please follow the link) it is hard to say what happens and why. So, here are a few remarks to paragraph building and the usage of \\ and \newline, resp.

A paragraph is everything between two empty lines:

Code: Select all

\documentclass{article}
\begin{document}
This is a first paragraph that is supposed to span at least two lines. That's
why I'm gonna add a few more words.

This is the second paragraph that is supposed to span at least two lines. That's
why I'm gonna add a few more words.
\end{document}
An empty line is treated by LaTeX equivalently to the insertion of \par. Indeed, it inserts a \par then implicitly. The following is equivalent to the first example:

Code: Select all

\documentclass{article}
\begin{document}
This is a first paragraph that is supposed to span at least two lines. That's
why I'm gonna add a few more words.\par
This is the second paragraph that is supposed to span at least two lines. That's
why I'm gonna add a few more words.
\end{document}
A \newline or \\ does not end a paragraph!

Code: Select all

\documentclass{article}
\begin{document}
This is a first paragraph that is supposed to span at least two lines. That's
why I'm gonna add a few more words.\newline
This is still the same paragraph that is supposed to span at least two lines.
That's why I'm gonna add a few more words.
\end{document}
So \newline is not supposed to be used to end a paragraph and start a new one.

The distance between paragraphs is determined by a length called \parskip and is 0.0pt plus 1.0pt as a default. That means it is zero but may be stretched up to 1.0pt if necessary. If you have bigger gaps you're doing something differently. Are you adding a \newpage somewhere and have figures or tables on the page where this happens? Or... So, in order to help you, please provide a Infominimal working example.

Regards
site moderator & package author
con20or
Posts: 4
Joined: Tue Oct 16, 2012 1:22 pm

Re: Paragraph Jumping to End of page

Post by con20or »

So I have been using the wrong paragraph end command, interesting....

RaggedBottom did the trick thanks for the replies.

Although now it adds a blank page between chapters fro some reason.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Paragraph Jumping to End of page

Post by Stefan Kottwitz »

con20or wrote:Although now it adds a blank page between chapters fro some reason.
In books, which are printed two-sided chapters usually start at right hand pages. So there's an empty page inserted, when necessary. I guess that's it what you noticed. I guess you don't want to start a chapter at the left hand side. Or do you print one-sided?

Stefan
LaTeX.org admin
con20or
Posts: 4
Joined: Tue Oct 16, 2012 1:22 pm

Re: Paragraph Jumping to End of page

Post by con20or »

Yes, that must be it. its a thesis, so im only allowed print one sided.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Paragraph Jumping to End of page

Post by Stefan Kottwitz »

Ok, so set these class options (for \documentclass, in the square brackets): oneside, openany. Possibly your class will support those standard options, probably the class is derived from a standard class.

Stefan
LaTeX.org admin
Post Reply