# How can I persuade fancyhdr that my headers have zero height?

I'm putting my headers in the outer margins where they shouldn't take up any vertical space. I though to achieve this by using \vbox to 0pt{...}, but fancyhdr isn't buying. Here is the error message:

Package Fancyhdr Warning: \headheight is too small (12.0pt):
Make it at least 15.60004pt.
We now make it that large for the rest of the document.
This may cause the page layout to be inconsistent, however.


I have no idea where this figure of 15.60004pt is coming from or how to write the header in such a way as not to take up any vertical space. MWE enclosed; the key macro is \nrlefthead. (The example is not quite minimal, but replacing all the named lengths with literal lengths would make it hard to read.)

\documentclass[twoside]{book}

\newdimen\blockwidth
\newdimen\blockheight

\blockwidth=120mm
\blockheight=220mm

\usepackage{etex}

\usepackage[twoside,top=10mm,body={\blockwidth,\blockheight}]{geometry}

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}

{\raggedright\noindent\itshape
\nouppercase{\leftmark}}%
\vss}}

\renewcommand\chaptermark[1]{\markboth{#1}{}}

\usepackage{lipsum}

\begin{document}

\chapter{An innocuous title}

\lipsum[23-30]
\end{document}

• unrelated but don't use \usepackage{etex} (depending which other packages are loaded it either does nothing useful or does harm) – David Carlisle Dec 2 '19 at 22:16
• You can also use \raisebox. For really fancy headers, I use the everypage package (see tex.stackexchange.com/questions/384008/…). – John Kormylo Dec 3 '19 at 2:16

Avoid \vbox if you don't know about it.

\documentclass[twoside]{book}

\newdimen\blockwidth
\newdimen\blockheight

\blockwidth=120mm
\blockheight=220mm

\usepackage[twoside,top=10mm,body={\blockwidth,\blockheight}]{geometry}

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}

\parbox[t][0pt]{\textwidth}{%
\llap{%
\raggedright\noindent\itshape
\nouppercase{\leftmark}%
}%
}%
}%
}

\renewcommand\chaptermark[1]{\markboth{#1}{}}

\usepackage{lipsum}

\begin{document}

\chapter{An innocuous title}

\lipsum[23-50]
\end{document}

• That's great! I am an old plain \TeX hacker from way back, and I still use those commands habitually. For my education, why did the \vbox to 0pt{...} fail? – Norman Ramsey Dec 3 '19 at 20:10