1

This question already has an answer here:

When I use the setspace package, then the vertical distance from the text to the page number changes. This happens only on the page with a section title. After this page, the distance between the footer and text normalises. Does someone know how to fix the vertical distance?

http://imgur.com/a/bMnK2

I'm using the following code:

You've to insert text for two pages after noindent.

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[left=1.00in, right=1.00in, top=1.00in, bottom=1.00in, footskip=0.5in]{geometry}
\usepackage[onehalfspacing]{setspace}

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[C]{\itshape\nouppercase\leftmark}
\fancyhead[R]{}
\fancyhead[L]{}
\renewcommand{\headrulewidth}{0pt}

\begin{document}

\pagenumbering{arabic}

\section{}

    \subsection{}

        \noindent 

\end{document}

marked as duplicate by Heiko Oberdiek, Zarko, Mico, Martin Schröder, user13907 Oct 21 '16 at 23:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • It's only half a duplicate, the other issue with \raggedbottom vs. \flushbottom is not shown in the MWE. – Heiko Oberdiek Oct 21 '16 at 22:11
1

Issue with \headheight and fancyhdr

There is a warning of fancyhdr:

Package Fancyhdr Warning: \headheight is too small (12.0pt):
 Make it at least 14.49998pt.
 We now make it that large for the rest of the document.
 This may cause the page layout to be inconsistent, however.

Since package geometry is used, this can be resolved by an additional option:

\usepackage[..., headheight=14.5pt]{geometry}

This is quite a frequent question, e.g.:

Issue with text at the bottom

The default for class article is to use \raggedbottom (it is not a book with two facing pages, where the default is \flushbottom via option twoside. The following example uses \flushbottom. Then TeX tries to distribute free space among the flexible vertical space elements on the page to push the last text line to the bottom. \raggedright uses the natural vertical space and puts the free space at the bottom.

\documentclass[12pt,a4paper]{article}
\usepackage[left=1.00in, right=1.00in, top=1.00in, bottom=1.00in,
footskip=0.5in, headheight=14.5pt, showframe]{geometry}
\usepackage[onehalfspacing]{setspace}

\usepackage{lipsum}

\flushbottom

\begin{document}

\section{First section}

\subsection{Subsection}

\lipsum

\end{document}

Result

  • I only had the messages window open when compiling. I didn't see the warning. Thanks! – user116934 Oct 21 '16 at 21:26
  • It still didn't resolve my vertical distance problem. Do you know what I can do? – user116934 Oct 21 '16 at 21:30
  • @user116934 You have added option headheight with the value of the warnings message? The page number in the footer should now be on the same vertical position on all the pages. For debugging the layout issues, option showframe of package geometry can help. If this does not resolve the question, then, please, refine the question with an updated MWE, which actually shows this vertical distance problem much more clearly. – Heiko Oberdiek Oct 21 '16 at 21:46
  • Yes, I added the option headheight with the value of the warning message. The page number in the footer is on the same vertical position on all the pages. The problem is that on the first page the last line of the text is not on the same vertical position as on the following pages. When I delete setspace, then the vertical distance on the first page adjusts to that of the following pages. I'll upload an image. – user116934 Oct 21 '16 at 21:56
  • @user116934 See updated answer. – Heiko Oberdiek Oct 21 '16 at 22:09

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