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 am using the memoir class for a multi-part (and multi-book) document. The class' headers and footers suit me fine for a twoside, openright document, but I'd like to add to them the following:

  • In the header, the book and part numbers before the chapter.
  • In the footer, a copyright notice.

I've tried to redefine the style, based on How to add an author name or copyright symbol on each page in memoir class?, but have been unsuccessful. Is there a way to merely add the above elements to headers/footers without breaking anything else?

share|improve this question
1  
I found this link useful: hstuart.dk/2007/06/12/styling-the-page-footer-and-header –  kahen Jan 10 '12 at 22:28
add comment

1 Answer

up vote 8 down vote accepted

With the exception of, e.g., part title pages and chapter starting pages, memoir by default uses the headings pagestyle. The style definition can be found in section 7.3 of the manual; use \makeevenhead & friends to change it. The command syntax is \make<even/odd><head/foot>{<style>}{<left>}{<center>}{<right}.

EDIT: I also included a new plainnotice style (derived from plain) that is used for chapter starting pages. Part title pages will still use the plain style.

EDIT 2: For "special" chapters like the bibliography one may define a special pagestyle like headingsnobook (e.g., resembling the original headings style) and switch to it via \pagestyle{headingsnobook}. (The starting pages of "special" chapters will still use plainnotice.)

\documentclass{memoir}

\makeevenhead{headings}%
    {\thepage}{}{\slshape\bookname~\thebook\qquad\partname~\thepart\qquad\leftmark}
\makeoddhead{headings}{\slshape\rightmark}{}{\thepage}
\makeevenfoot{headings}{}{}{(Copyright notice)}
\makeoddfoot{headings}{(Copyright notice)}{}{}

\copypagestyle{plainnotice}{plain}
\makeevenfoot{plainnotice}{\thepage}{}{(Copyright notice)}% not used with "openright"
\makeoddfoot{plainnotice}{(Copyright notice)}{}{\thepage}
\aliaspagestyle{chapter}{plainnotice}

\copypagestyle{headingsnobook}{headings}
\makeevenhead{headingsnobook}{\thepage}{}{\slshape\leftmark}

\usepackage{lipsum}

\begin{document}

\book{The first book}

\part{First}

\chapter{First-first}

\section{First-first-first}

\lipsum[1-10]

\part*{Backmatter}
\pagestyle{headingsnobook}

\begin{thebibliography}{9}
\bibitem{test}\lipsum[1-10]
\end{thebibliography}

\end{document}
share|improve this answer
    
This is almost perfect. How, then, do I avoid having "book" and "part" appear in ToC, LoF, LoT, Glossary and Index sections? Does the solution involve, e.g., adding things like \createplainmark{glossary}{both}{\glossaryname}? –  Olivier Drolet Jan 10 '12 at 21:35
    
@OlivierDrolet Answer updated. –  lockstep Jan 10 '12 at 22:03
    
Brilliant! Thank you so much. I'm curious, what is the purpose of the second \copypagestyle{headingsnobook}{headings}? It seems to do nothing. –  Olivier Drolet Mar 19 '12 at 23:52
    
@OlivierDrolet Indeed. I remove the first one. –  lockstep Mar 20 '12 at 0:02
add comment

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.