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 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 ?

share|improve this question
add comment

1 Answer

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

share|improve this answer
    
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 ! –  user1240076 Aug 23 '12 at 9:30
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.