Page Layoutfooter bigger than stated in the preamble

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
gosha
Posts: 16
Joined: Mon Nov 24, 2008 2:48 pm

footer bigger than stated in the preamble

Post by gosha »

I've been googleing a lot, but cannot find the answer to this specific question.
I want to keep the right and left margin as latex default, but want to change the top and bottom ones, just to save a little paper since it's for personal use.
This is the relevant part of the preamble:

Code: Select all

\usepackage{fullpage}
\pagestyle{empty}
\usepackage[top=2.5cm,bottom=2.5cm,nohead,nofoot]{geometry}
and in the \documentclass I have chosen a4paper, so the paper size is right.

But then, for example, I have a page where the top margin is 2.5cm, but the bottom one is 4cm, but next page you have four words ending the paragraph. Why does not Latex put them in the previous page having 1.5 cm free to use?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

footer bigger than stated in the preamble

Post by localghost »

At first, abandon the fullpage package. It is superfluous when using geometry. The following code works fine for me.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage[noheadfoot,top=2.5cm,bottom=2.5cm]{geometry}
\usepackage{blindtext}

\begin{document}
  \pagestyle{empty}
  \Blinddocument
\end{document}
The behaviour you described is known as "Widows and Orphans" [1]. You can avoid them by adding some lines to the preamble.

Code: Select all

% Avoid Widows and Orphans
\clubpenalty10000
\widowpenalty10000
\displaywidowpenalty10000
This should prevent their appearance completely.

[1] Widows and orphans - Wikipedia, the free encyclopedia


Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
gosha
Posts: 16
Joined: Mon Nov 24, 2008 2:48 pm

footer bigger than stated in the preamble

Post by gosha »

thanks a lot, this seems to do the trick:

Code: Select all

%Avoid Widows and Orphans
\clubpenalty10000
\widowpenalty10000
\displaywidowpenalty10000
but are these values kind of standard? Will they work always with different texts?

Also, I cannot grasp the use of the blindtext package, it gives me a quite unpredictable output.
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

footer bigger than stated in the preamble

Post by localghost »

gosha wrote:thanks a lot, this seems to do the trick: […] but are these values kind of standard? Will they work always with different texts?
If they were, you wouldn't face the phenomenon you described. As far as I know each of these parameters has 150 as default value. The new values should work with every document.
gosha wrote:[…] Also, I cannot grasp the use of the blindtext package, it gives me a quite unpredictable output.
This is a very vague statement. You should specify the problem. The blindtext package only works with English and German output and it needs a preloaded babel with the appropriate language option. If you expect another language, it will disappoint you.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
gosha
Posts: 16
Joined: Mon Nov 24, 2008 2:48 pm

Re: footer bigger than stated in the preamble

Post by gosha »

oh, no wonder! I have a file in Italian.
tks
Post Reply