I have \pagestyle{fancy} with usual settings.
And names of my chapters sometimes are so huge (above the top line) that somehow the number of page (which is in foot of the page) is going down, down and down with each page until it'll disappear. It is ridiculous to see at the first page approximately 2cm between number and end of the page and 1mm on the page 100 and nothing at the last page.
%document information
\documentclass[10pt,a4paper]{book}
% packages
\usepackage{cmap}
\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage[russian]{babel}
\usepackage{amsfonts,longtable}
\usepackage{indentfirst}
\usepackage{amsmath,amsthm,amstext,amssymb,amscd}
\usepackage{fancyhdr}
\usepackage{hyperref}
\usepackage[margin=2.3cm, footskip = 0.5 cm]{geometry}
\usepackage{epigraph}
\usepackage{tikz}
\usepackage{cancel}
\usepackage{upgreek}
\usepackage{bm}
\usepackage{xcolor}
\definecolor{darkblue}{rgb}{0,0,.6}
% page settings
\frenchspacing
\parindent=1cm
\sloppy
\fancyfoot[C]{\thepage}
% other settings
\pdfcompresslevel=9
\pdfobjcompresslevel=9
\hypersetup{
pdfsubject = {Matan},
pdfstartview = {FitH},
pdfborder = {0 0 0},
bookmarksopen = true,
bookmarksnumbered = true,
bookmarksopenlevel = 2,
colorlinks = true, linkcolor = darkblue,
}
%own commands
\begin{document}
\pagestyle{plain}
\frontmatter
\tableofcontents
\mainmatter
\pagestyle{fancy}
\setcounter{chapter}{0}
\foreach \n in {1,...,36}{\include{chapters/chapter\n}}
\end{document}
And don't blame me for using text about Eminem for test in future math book. :)
PS. In chapters/chapter\n there are just texts about Eminem with no commands expect \chapter{}


fancyhdrwarnings concerning the headheight, though. – Johannes_B Feb 15 '16 at 17:44\chapteroptional argument). – Rmano Feb 15 '16 at 18:06hyperrefat the end of the preamble, not somewhere surrounded by a bunch of other packages! – Feb 15 '16 at 18:24hyperrefredefines a couple of things to make the whole hyperlinking work. – Feb 15 '16 at 18:33