2

I have been trying to get the makeheadrule and makefootrule directives to work in a memoir class document. Here is an MWE

\documentclass[10pt]{memoir}
\usepackage{lipsum}


\copypagestyle{memoirStylePages}{headings}
\makerunningwidth{memoirStylePages}{\textwidth}

\makeheadrule{memoirStylePages}{\textwidth}{\normalrulethickness}
\makefootrule{memoirStylePages}{\textwidth}{\normalrulethickness}{}

\nouppercaseheads

\makeevenhead{memoirStylePages}{\thepage}{}{}
\makeoddhead{memoirStylePages}{}{}{\itshape\leftmark}

\makeevenfoot{memoirStylePages}{}{}{}
\makeoddfoot{memoirStylePages}{}{}{}

\makepsmarks{memoirStylePages}{%
  \createmark{chapter}{left}{nonumber}{}{}
}

\pagestyle{memoirStylePages}

\begin{document}
\chapter{A chapter}
\section{A section}    
\lipsum[1-10]    
\end{document}

I am unable to understand why I get the errors.

2

The last argument of makefootrule mustn't be empty. So use:

\makefootrule{memoirStylePages}{\textwidth}{\normalrulethickness}{0pt}

The command \makefootrule has the following syntax:

\makefootrule{ style }{ width }{ thickness }{ skip }

Specifies the width and thickness of the rule drawn skip (see \footskip) above the footers of the style pagestyle.


Here your modifed MWE:

\documentclass[10pt]{memoir}
\usepackage{lipsum}
\copypagestyle{memoirStylePages}{headings}
\makerunningwidth{memoirStylePages}{\textwidth}
\makeheadrule{memoirStylePages}{\textwidth}{\normalrulethickness}
\makefootrule{memoirStylePages}{\textwidth}{\normalrulethickness}{0pt}
\nouppercaseheads
\makeevenhead{memoirStylePages}{\thepage}{}{}
\makeoddhead{memoirStylePages}{}{}{\itshape\leftmark}
\makeevenfoot{memoirStylePages}{}{}{}
\makeoddfoot{memoirStylePages}{}{}{}

\makepsmarks{memoirStylePages}{%
  \createmark{chapter}{left}{nonumber}{}{}
}

\pagestyle{memoirStylePages}
\begin{document}
\chapter{A chapter}
\section{A section}    
\lipsum[1-10]    
\end{document}
| improve this answer | |
  • Great, thanks! I always get confused with which options have defaults and which don't. The "missing number" should have warned me, but I wasn't really thinking clearly then. – tchakravarty Aug 19 '12 at 21:29

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.