0

I'm trying to customize the headers/footers of my document so that I can have three diferent versions: fancy, index and plain.

For the fancy ones I have this code:

\renewcommand{\headrulewidth}{0.75pt}
\renewcommand{\headrule}{{\color{blueish}\vskip-\footrulewidth \hrule width\headwidth height\footrulewidth\vskip\footruleskip}}

\renewcommand{\footrulewidth}{0.75pt}
\renewcommand{\footrule}{{\color{blueish}\vskip-\footruleskip\vskip-\footrulewidth \hrule width\headwidth height\footrulewidth\vskip\footruleskip}}

\pagestyle{fancy}
\fancyhead[L]{\sffamily\textsc{Subject}}
\fancyhead[R]{\sffamily\textsc{Project}}
\fancyfoot[L]{Author}
\fancyfoot[R]{\mypage}
\fancyfoot[C]{}

which turns into this:

enter image description here

Then I have the code for the index pages:

\fancypagestyle{index}{%
  \renewcommand{\headrulewidth}{0pt}%
  \renewcommand{\footrulewidth}{0pt}%
  \fancyhf{}%
  \fancyfoot[R]{\mypage}%
} 

which deletes the headrule successfully, as you can see:

enter image description here

The thing is that I also want to delete the headrule for the first page of every subject. I've done it by changing the plain style like this:

\fancypagestyle{plain}{%
  \fancyhf{}%
  \renewcommand{\headrulewidth}{0pt}%%
  \fancyfoot[L]{Author}
  \fancyfoot[R]{\mypage}
  \fancyfoot[C]{}
}

and:

\thispagestyle{plain}
\chapter{First chapter}

But it just doesn't work! enter image description here

I can't understand why \renewcommand{\headrulewidth}{0pt} works for the index style but not for the plain one!

The document class is memoir and I'm compiling with pdfLaTeX

Thank you!

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.