Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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}
share|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. –  fg nu Aug 19 '12 at 21:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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