1

I am writing my thesis, in french. I also use fancyhdr. In the head of the page I have the chapter title. I had no problems for the first chapters, but the third include accentuation. I then had error messages telling me to increase headheight. The package fancyhdr is supposed to figure out that size, but it overlooks accentuated letters. To fix it, I tried to set a relative headheight by different means but so far I failed.

A MWE:

\documentclass[a4paper, 12pt, twoside]{report}
% start fancyhdr tunning
\usepackage{fancyhdr}
  \pagestyle{fancy}
  \fancyhead[RO, LE] {}
  % head too small. Local fix, setting bigger fixed value:
  %\setlength{\headheight}{16pt}    %commented out to get the headheight too small warning
% end fancyhdr tunning
\begin{document}
  \chapter{nothing, just setting a weird title: l\`ik\'e s\^o}
    \newpage
    what do you mean, this thesis null?
\end{document}

Any suggestions? I'm thinking a box that doesn't print, or a command which suppress printing, something like widthof from calc...?

luneart
  • 534
  • I see no problem in setting the head height to a fixed value. – egreg Jan 16 '15 at 10:04
  • I might want to change the heading, and put it in LARGE. or change the font size. Regardless of code adaptivity, it wastes space when I could do with the exact needed size... – luneart Jan 16 '15 at 10:06
  • Then use ex or em units instead of pt. \usepackage[headheight=1.5em]{geometry} –  Jan 16 '15 at 10:18
  • \setlength{\headheight}{100pt}\setlength{\topmargin}{-80pt}. But if you expect to modify the heading, why shouldn't you expect to modify the head height? – egreg Jan 16 '15 at 10:19
  • @egreg: I don't mind modifying the heading on a whim, I do mind having to check the log to see which length I need to set, then modify it when it could be done automatically. – luneart Jan 16 '15 at 10:57
  • @harish-kumar: while the em/ex units could do the trick, as said in the question I'm being picky there: I don't like guessing the needed amount of ex, and wasting space when the select size is bigger than needed. Yeah I know... I thought there was a more or less simple command to get a box in the preamble that I didn't know, starting to have doubts... – luneart Jan 16 '15 at 10:58
  • @luneart TeX can know the needed height only when it has typeset the heading. – egreg Jan 16 '15 at 11:32
  • @egreg: based on your comment I found this answer that is more or less fine by me. Thank you! – luneart Jan 16 '15 at 11:41

0 Answers0