I am writing my thesis using the class memoir. I have two problems to get nice headings/footers. First, I want the page number to be in the footer, on the right or on the left but for the first page of a chapter, it stays centered. Then, for pages with an even number, I want the name of the current chapter to be inserted in the headings. I can not find how to do these things. Here is my code:


\createmark{section}{left}{shownumber}{}{\ } 
\createmark{chapter}{right}{shownumber}{}{\ }



\title{My title} 




\part{1st Part}

\chapter{My Chapter}
\section{My Section}

  • welcome to tex.stackexchange! The example you're providing is not going to work other people's machines, as we don't have intro.tex. If you simply want to fill your document with some text for demonstration purposes, please use the blindtext package an its commands like \Blinddocument etc. – Nils L Feb 25 '13 at 14:57
  • You really should use \frontmatter and \mainmatter instead of that whole hackery with \chapter* and \addtocontents. – kahen Feb 25 '13 at 18:03
  • I made the changes both of you asked. – Raphaël Coudret Feb 26 '13 at 7:44

Surely there must be a question on this site, which already give the answer to this, but you could do something like:

a4paper, % Stock and paper size.
11pt, % Type size.
% article,
% oneside, 
onecolumn, % Only one column of text on a page.
% openright, % Each chapter will start on a recto page.
% openleft, % Each chapter will start on a verso page.
openany, % A chapter may start on either a recto or verso page.

\usepackage{lipsum} % Will come in handy below...


\makepagestyle{standard} % Make standard pagestyle

\makeatletter                 % Define standard pagestyle
\makeevenfoot{standard}{}{}{\thepage} % Even footer
\makeoddfoot{standard}{\thepage}{}{}  % Odd Footer
\makeevenhead{standard}{}{\leftmark}{} % ...
\makeoddhead{standard}{}{\leftmark}{}  %
% \makeheadrule{standard}{\textwidth}{\normalrulethickness}
\makeatother                  %

\makeatletter % Make marks (to put chapter title etc. in the header)
\createmark{chapter}{both}{shownumber}{\@chapapp\ }{ \quad }
\createmark{section}{right}{shownumber}{}{ \quad }

\makepagestyle{chap} % Make new chapter pagestyle

\makeevenfoot{chap}{}{\thepage}{} % Define new chapter pagestyle
\makeoddfoot{chap}{}{\thepage}{}  %
\makeevenhead{chap}{}{}{}   %
\makeoddhead{chap}{}{}{}    %
% \makeheadrule{chap}{\textwidth}{\normalrulethickness}

\pagestyle{standard}               % Choosing pagestyle and chapter pagestyle
\aliaspagestyle{chapter}{chap} %




\chapter{Conclusions and Outlook}


I'm not sure that this is exactly what you desire. If not, I hope the code is clear enough for you to make the changes yourself.

| improve this answer | |
  • Thanks for this answer. I can now make the changes I want. For an unknown reason, I thus have to use \createmark with both and right rather than with left and right. The command \aliaspagesstyle allows me to modify the style of the first page of each chapter. – Raphaël Coudret Feb 26 '13 at 9:33

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.