6

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.....

enter image description here

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}
0

2 Answers 2

3

Try using the native \areaset command from Koma-Script instead of the geometry package:

\documentclass[12pt,a4paper,english,openany,oneside,headinclude,footinclude]{scrbook}
% Set the typeset area (trim - 2*margin)
\areaset{18cm}{26.7cm}

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:

\areaset[1cm]{17cm}{26.7cm}

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:

\setheadsepline{.4pt}

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.

3
  • I've changed the class settings, removed geometry package and added the \areaset command, but the problem still remains. Instead, the whole page seems to shift up a bit. In case you are unclear, I have updated the image in the question.
    – yolo
    Jul 5, 2011 at 12:26
  • Raphink, is this tested by you?
    – yolo
    Jul 10, 2011 at 14:53
  • It's the settings I use for my own books, and I haven't noticed that problem. That said I don't use lines both up and down, so maybe I have the same issue and I just don't see it. See also my edited answer about not drawing a rule in the header/footer.
    – raphink
    Jul 11, 2011 at 5:29
1
\usepackage[includeheadfoot, margin=1.5cm,headsep=25pt,footskip=25pt,a4paper]{geometry} 

You must log in to answer this question.

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