2

I have a question regarding the header and footer. I am using memoir class and want to create a custom header which displays the name of the chapter. Below is the code I have so far, that doesnt show the chaptername. It seems to me that I have to define the \rightmark and \leftmark command, resp. but can I do this in a gerneric way ? Alternatively, when doing this:

\makeoddhead{pstest}{DUMMY ODD}{}{\thechapter}

then the number is printed, But how can output the name of the chapter ?

\documentclass[11pt,a4paper,article]{memoir}
\usepackage[english]{babel}
\usepackage{blindtext}

\usepackage{titlesec}

\makepagestyle{pstest}
\makeevenfoot{pstest}{\thepage}{}{}%page numbers at the outside
\makeoddfoot{pstest}{}{}{\thepage}
\makeheadrule{pstest}{\textwidth}{\normalrulethickness}
\makeevenhead{pstest}{\leftmark}{}{DUMMY EVEN} % small caps
\makeoddhead{pstest}{DUMMY ODD}{}{\rightmark}

\aliaspagestyle{chapter}{pstest}
\aliaspagestyle{section}{pstest}


\begin{document}
\pagestyle{pstest}
\chapter{Intro}
\blindtext[20]

\chapter{Methods}
\blindtext[20]

\end{document}

Thank you for any comments !

Edit 1: actually it seems that the \chaptername command gives just "chapter". Is this expected ?

1 Answer 1

3

pstest does not tell the chapter what to provide for the header, so nothing is provided. See \makepsmarks in the manual. This article might also be helpful: http://tug.org/pracjourn/2008-2/madsen/

also there is no page style called section, so that alias is not relevant

1
  • brilliant ! a really helpful paper ! In the end I just copied the given example into a sty file and modified the parts I need. Thanks ! Aug 23, 2012 at 9:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .