5

I'm trying to include a logo in the footer area of an amsart document. I use fancyhdr to achieve that, but the problem I run into is that the body of the text runs into the footer area - as illustrated by the example below:

\documentclass[a4paper,reqno,11pt]{amsart}
\usepackage{fancyhdr}
\usepackage[latin]{babel}
\usepackage{blindtext}

\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0.1pt}

\lfoot{\rule{0.4cm}{0.4cm}} %The logo would go here
\cfoot{Page \thepage}

\begin{document}
\title{Sample Doc}

\maketitle
\thispagestyle{fancy}

\blinddocument
\end{document}

Has anybody run into a similar problem or know of a quick fix? Many thanks in advance!

3
  • \setlength{\footskip}{4ex} ?
    – yo'
    Jan 16, 2014 at 13:39
  • And please update the title of your question, this has nothing to do with footnotes, but rather the footer area (footnotes are a part of the text area)
    – daleif
    Jan 16, 2014 at 13:40
  • Many thanks to all those who answered. I have updated the question title in line with the suggestion. Thanks!
    – Pawel
    Jan 16, 2014 at 14:25

2 Answers 2

5

The amsart way to this is to increase \footskip, decrease the default \textheight correspondingly and then issue \calclayout:

Sample output

\documentclass[a4paper,reqno,11pt]{amsart}
\usepackage{fancyhdr}
\usepackage[latin]{babel}
\usepackage{blindtext}

\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0.1pt}

\lfoot{\rule{0.4cm}{0.4cm}} %The logo would go here
\cfoot{Page \thepage}

\advance\footskip0.4cm
\textheight=54pc    %a4paper
%\textheight=50.5pc %letterpaper
\advance\textheight-0.4cm
\calclayout

\begin{document}
\title{Sample Doc}

\maketitle
\thispagestyle{fancy}

\blinddocument
\end{document}

The command \calclayout is specific to the AMS classes. One specifies an initial \textheight that includes headers, but not footers, and also one specifies \textwidth, \headsep, \headheight, \paperwidth and \paperheight. \calclayout then computes the correct value of page margins, ensuring some reasonable minimum values, and then \textheight is set to the height of the textblock. Looking at the code, the calculations ignore the footers. By default no adjustment is made to e.g. \headheight for the font size. The class is really designed to work with the default 10pt option.

The initial values given to \textheight in the above code, are those from amsart.cls for a4paper and letterpaper (the only paper options the class accepts).

2
  • Wow I've never heard of \calclayout. Can you give a bit more details on this, please? Is it AMS-specific?
    – yo'
    Jan 16, 2014 at 15:20
  • @tohecz Explanation added, and coded updated according to what I found out in the process! Jan 16, 2014 at 16:56
3

You have to give proper footskip. This can be done easily with geometry package:

\usepackage[a4paper,margin=1in,footskip=0.4in,heightrounded]{geometry}

I have added some more useful options to geometry.

\documentclass[reqno,11pt]{amsart}
\usepackage{fancyhdr}
\usepackage[latin]{babel}
\usepackage{blindtext}
\usepackage[a4paper,margin=1in,footskip=0.4in,heightrounded]{geometry}

\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0.1pt}

\lfoot{\rule{0.4cm}{0.4cm}} %The logo would go here
\cfoot{Page \thepage}

\begin{document}
\title{Sample Doc}

\maketitle
\thispagestyle{fancy}

\blinddocument
\end{document}

enter image description here

Adjust the values suitably and beware of other quantities like headheight, headsep etc. For details refer to geometry documentation at texdoc.net.

You must log in to answer this question.

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