As you can judge from the page below, the vertical space between the text and the header line and the text and the footer line is not equal…..
This is much more prominent in a PDF reader so I am trying to get equal space. How do I accomplish this using these settings?
\documentclass[12pt,a4paper,english,openany,oneside]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\setcounter{secnumdepth}{-2}
\setcounter{tocdepth}{1}
\makeatletter
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[includeheadfoot,margin=1.5cm]{geometry}
\usepackage{etoolbox}
\usepackage{calc}
\makeatletter
\pretocmd{\@part}{\gdef\parttitle{#1}}{}{}
\pretocmd{\@spart}{\gdef\parttitle{#1}}{}{}
\makeatother
\usepackage{lipsum}
\usepackage[Bjornstrup]{fncychap}
\usepackage[nouppercase,headsepline,footsepline,automark]{scrpage2}
\clearscrheadfoot
\clearscrheadings
\chead{}
\cfoot{}
\ihead{headertext}
\ohead{\parttitle}
\ifoot{\rule{0pt}{\ht\strutbox+\dp\strutbox}\leftmark}
\ofoot{\rule{0pt}{\ht\strutbox+\dp\strutbox}\thepage}
\pagestyle{scrheadings}
\usepackage{url}
\usepackage{pdfcolmk}
\usepackage{graphicx}
\usepackage{tikz}
\providecommand{\HUGE}{\Huge}% if not using memoir
\newlength{\drop}% for my convenience
\makeatother
\usepackage{hyperref}
Best Answer
Try using the native
\areaset
command from Koma-Script instead of thegeometry
package:Note by the way that if your book has to be printed, you might also want to add a binding correction to it, which can also be done with
\areaset
, for example, for a 1cm binding correction:The problem might also come from the fact that you're drawing rules in the header/footer manually. The Koma-Script documentation explains how do draw a separator for headers/footers:
and the corresponding for the footer will draw lines between the header and the main content, instead of drawing it inside the header, so that might just fix your issue.