When I wrote the code below gave the following error:
! LaTeX Error: Command \footruleskip already defined.
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.302 ...and{\footruleskip}{.3\normalbaselineskip}
I want to configure the fancyhdr
on memoir
.
\documentclass[a4paper]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[brazil]{babel}
\usepackage{lipsum}
% fancyhdr on memoir
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter.\space#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\space#1}}
\fancyhead[LE]{\bfseries\leftmark}
\fancyhead[RO]{\bfseries\rightmark}
\fancyfoot{}
\fancyfoot[LO,RE]{R\'egis \the\year}
\fancyfoot[LE,RO]{\bfseries\thepage}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0.5pt}
\fancypagestyle{plain}{
\fancyhead{}
\renewcommand{\headrulewidth}{0pt}
}
\begin{document}
\pagestyle{fancy}
\chapter{Fancyhdr on Memoir}
\lipsum
\end{document}