Quantcast
Channel: Vertical Alignment of footer in fancyhdr package - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 3

Vertical Alignment of footer in fancyhdr package

$
0
0

I have a twosided document in which I use a customized footer with the fancyhdr package. The odd thing is that the inner footer, containing chapter/section info and the outer footer containing page number are vertically non-aligned. The page number is always higher than the text. However, if I use fancyhead instead of fancyfoot, everything is perfectly aligned in the header! No idea why this does not work in the footer the same way.

Can anyone help?

I attach a short script showing the problem. For ease, both header and footer are active to show the difference.

Thanks in advance for your feedback!

Petra

\documentclass[a5paper,twoside,11pt,openany,DIV=calc,ngerman,twocolumn,xcolor=dvipsnames]{scrbook}\usepackage{lipsum}\usepackage{fancyhdr} \pagestyle{fancy}\newcommand{\lkopf}[2]{\markboth{\ref{#1} #2}{}}\newcommand{\rkopf}[2]{\markright{\ref{#1} #2}}\fancypagestyle{plain}{ %    \fancyhf{} % remove everything    \renewcommand{\headrulewidth}{0pt} % remove lines as well    \renewcommand{\footrulewidth}{0pt}    \fancyfoot[LE,RO]{\thepage}}\fancypagestyle{myheadings}{    \fancyhf{}    \fancyhead[LE,RO]{\thepage}    \fancyhead[RE]{\leftmark}    \fancyhead[LO]{\rightmark}    \fancyfoot[LE,RO]{\thepage}    \fancyfoot[RE]{\leftmark}    \fancyfoot[LO]{\rightmark}    \renewcommand{\headrulewidth}{0.5pt}    \renewcommand{\footrulewidth}{0.5pt}}\pagestyle{myheadings}\begin{document}\chapter*{Greetings}\label{kap:greetings}\lkopf{kap:greetings}{Greetings}\twocolumn[\section*{Greetings A}\label{gruss_A}]\rkopf{gruss_A}{Mr. A}\lipsum\lipsum\lipsum\lipsum\twocolumn[\section*{Greetings B}\label{gruss_B}]\rkopf{gruss_B}{Mr. B}\lipsum[0]\lipsum[100]\end{document}  

Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images