0

I am writing a book document with a rule used in both the header and footer. I want the distance from the top of the text to the rule in the header to be equal to the distance from the bottom of the text to the rule in the footer. Likewise I want the distance from the rule in the header to the top of the page to be equal to the distance from the rule in the footer to the bottom of the page. In other words, the page text should look uniform with no uneven spaces at the top or bottom.

I am using geometry. I do not understand everything but I have tried to best but still cannot achieve what I am after.

MWE here, where these distances are not exactly equal.

\documentclass[10pt,a4paper,twoside,openright]{book}

\usepackage{lipsum}

% Page Layout Packages
\usepackage[top=0.6in, bottom=0.6in, left=1.2in, right=1.2in, headsep=7.5mm, footskip=15.5mm, includeheadfoot, bindingoffset=0.4in, headheight=8mm]{geometry}

% fancyhdr Package (for header/footer)
\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhead{} % clear all header fields
\fancyhead[RO,LE]{\rule[-2ex]{0pt}{2ex}\large\scshape\MakeLowercase{\leftmark}}
\fancyfoot{} % clear all footer fields
\fancyfoot[LE,RO]{\rule[5ex]{0pt}{-2ex}\scshape \large \thepage}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\renewcommand{\chaptermark}[1]{\markboth{\lowercase{\chaptername}\ \thechapter~–\ #1}{}}

\fancypagestyle{plain}
{\fancyhf{}
\fancyfoot[LE,RO]{\scshape \large \thepage}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}}

\begin{document}

\chapter{new}

\lipsum

\section{new}

\lipsum

\end{document}
0
  • Not an answer.
  • I modified your code so that the layout is shown (showframe option).
  • In addition, I added a screenshot from the geometry manual.
  • Maybe you can take this information as a start.

\documentclass[10pt,a4paper,twoside,openright]{book}

\usepackage{lipsum}

% Page Layout Packages
\usepackage[top=0.6in, 
bottom=0.6in, 
left=1.2in, 
right=1.2in, 
headsep=7.5mm, 
footskip=15.5mm, 
includeheadfoot, 
bindingoffset=0.4in, 
headheight=8mm,
showframe = true]{geometry}

% fancyhdr Package (for header/footer)
\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhead{} % clear all header fields
\fancyhead[RO,LE]{\rule[-2ex]{0pt}{2ex}\large\scshape\MakeLowercase{\leftmark}}
\fancyfoot{} % clear all footer fields
\fancyfoot[LE,RO]{\rule[5ex]{0pt}{-2ex}\scshape \large \thepage}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\renewcommand{\chaptermark}[2]{\markboth{\lowercase{\chaptername}\ \thechapter~–\ #1}{}}

\fancypagestyle{plain}
{\fancyhf{}
\fancyfoot[LE,RO]{\scshape \large \thepage}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}}

\begin{document}

\chapter{new}

\lipsum

\section{new}

\lipsum

\end{document}

enter image description here

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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