0

I'm setting up my thesis in memoir class.

Questions [Those that have been answer are marked with (!) and the code has been amended to reflect the answers]:

  1. How do I make my headers and footers show up on the first page of the chapters? (!)
  2. How do I avoid the TOC title in my header? (!)
  3. How do I avoid double title in the header on the reference page?
  4. How do I add the abstract as a 'section' or 'chapter' in my header? (!)
  5. How do I remove total number of pages in frontmatter material (TOC and abstract) only?

I have been reading in the memoir manual a good while, but I can't really get my head around it and it doesn't seem to contain the explanation as far as I can see.

I'm trying to avoid any usage of fancyhdr, because of incompatibility issues.

This is the simplest version I could make, considering what might be pertinent and to give a picture of what I'm trying to do:

\documentclass[12pt,a4paper,onecolumn,twoside,final]{memoir}
\usepackage[english]{babel}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{newcent}
\usepackage[utf8x]{inputenc}
\usepackage[textwidth=14cm,textheight=22cm]{geometry}
\usepackage{apacite}

% Header & footer content

\makepagestyle{HDR} % Create a new pagestyle
\aliaspagestyle{chapter}{HDR}

\makepsmarks{HDR}{\nouppercaseheads % Following code to edit the pagestyle

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

\clearplainmark{toc}
\createplainmark{lof}{both}{\listfigurename}
\createplainmark{lot}{both}{\listtablename}
\createplainmark{bib}{both}{\bibname}
\createplainmark{index}{both}{\indexname}
\createplainmark{glossary}{both}{\glossaryname}
} 
\makeevenhead{HDR}{}{}{\normalfont\bfseries\rightmark\hskip.5cm\vrule\hskip.5cm\leftmark}
\makeoddhead{HDR}{\normalfont\bfseries\leftmark\hskip.5cm\vrule\hskip.5cm\rightmark}{}{}
\makeevenfoot{HDR}{\small \thepage\ / \thelastpage}{}{\miniscule Thesis, ID, Institute, Universit}
\makeoddfoot{HDR}{\miniscule Thesis, ID, Institute, University}{}{\small \thepage\ / \thelastpage}

% Title and Subtitle
\newcommand{\TIT}{A thesis}
\makeatletter
\addtodef\put@bsintoc{}{\markboth{\abstractname}{}}
\makeatother

%Frontpage Design
\newcommand{\FTP}{\begingroup
\vspace*{1cm}
\begin{center}
\Large \textsc{Jane Smith} \\
\huge\bfseries \TIT \\
\end{center}
\newpage

% Information Page

\noindent\today \\
Student ID: 00000000 \\
Supervisor: John Smith \\
Number of Characters: 000000 \\
\endgroup}

% Chapters & sections titles
\chapterstyle{hangnum}

\begin{document}
\frontmatter
\begin{titlingpage}
\FTP
\end{titlingpage}
\pagestyle{HDR}
\tableofcontents*
\begin{abstract}

\end{abstract}
\mainmatter
\chapter{One}
\section{OneOne}
\chapter{Two}
\section{TwoTwo}
\chapter{Three}
\chapter{Four}

\backmatter
\appendix
\bibliographystyle{apacite}
\bibliography{Test.bib}

\end{document}
  • \clearplainmark does work. But you have to enable the pagestyle, you are missing a \pagestyle{HDR}, otherwise the settings to have set up for HDR is not applied. – daleif Aug 27 '14 at 10:52
  • I saw it was bellow the \tableofcontent* so I moved it above, and now it works. So two out of five cleared! :0) Thanks! – Faergen Aug 27 '14 at 11:07
  • (5) use two separate pagestyles – daleif Aug 27 '14 at 15:32
  • That almost worked, however the aliaspagestyle overules the separate pagestyles and still make the pagenumber on the first page of the TOC as i/10 and the rest just i, ii, etc. Can I make a separate alias for the TOC? – Faergen Aug 29 '14 at 13:17
  • Faergen, this site works best with single questions. Please avoid having a large multi-question, especially if it keeps growing. It's difficult to post a single answer which answers all of your points. Also, the reusability of the Q&A suffers greatly. Please consider breaking your question to multiple once. – Martin Scharrer Aug 29 '14 at 13:35
2

Question one:

\aliaspagestyle{chapter}{HDR}

Question two: You add it your self, see the \createplainmark{toc}{both}{\contentsname}, however it needs to be cleared out completely, add the following to you HDR definiton instead of the {toc} line

\clearplainmark{toc}

Question three: Hard to say as you do not show how you make your abstract. Always post minimal examples, not just sniplets.


As already mentioned \clearplainmark works jsut fine, but you have never activated the HDR style, i.e., you are missing a

\pagestyle{HDR}

As for the abstract, I probably would not use the abstract env as I do not feel it fits the design of the document. But if you want to use it then add this to the preamble to add header for the abstract

\makeatletter
\addtodef\put@bsintoc{}{\markboth{\abstractname}{}}
\makeatother
  • The first solution works. Thank you! The clearplainmark{toc} doesn't work unfortunately. I have the way I make my abstract to the question... – Faergen Aug 27 '14 at 9:01
  • @Faergen, no please update it all to include a minimal document including preamble documentclass etc. Scuh that we only have to copy and paste that example without adding anything to it. THat way you are more likely to get help and much more certain that the help you get will be precise. – daleif Aug 27 '14 at 9:40
  • @Faergen, the \clearplainmark{toc} works just fine. Please update the question with exactly what you are trying, but failing with. I'm using the very latest memoir version. – daleif Aug 27 '14 at 9:43
  • I have updated the question and added a minimal document. Thank you. – Faergen Aug 27 '14 at 10:33
  • I have to ask: how would you then make the abstract? Part of the first chapter? Because it's simply in the official regulations that we have to include an abstract, but not necessarily how and where... so I was just wondering? – Faergen Aug 27 '14 at 11:16

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.