2

I've run into a problem using the package fancyhdr, if you look at the left side of the footer, it says "Kapitel 0" which I want to remove for chapter 0 exclusively. Chapter 0 contains TOC, table of tabels and table of figures.

Here is the code:

\fancypagestyle{plain}{
\fancyhf{}%
\fancyfoot[L]{\chaptername \hspace{1pt} \thechapter}
\fancyfoot[R]{\thepage \hspace{1pt} af \pageref{LastPage}}
\fancyhead[L]{Fagprojekt for matematik og teknologi (01666)}
\fancyhead[R]{22/6-2016}
\renewcommand{\headrulewidth}{0.4pt}% Line at the header invisible
\renewcommand{\footrulewidth}{0.4pt}% Line at the footer visible}

I've considered redefining \chapternameonly including any chapters with a numerical value above 0, and making a new pagestyle including TOC, TOT and TOF, both option without any luck.

  • 2
    A quick solution \fancyfoot[L]{\ifnum\value{chapter}>0\chaptername \hspace{1pt} \thechapter\fi} – touhami Jun 16 '16 at 11:24
  • you're welcome, and welcome to TeX.sx :-) – touhami Jun 16 '16 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.