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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm writing a thesis using memoir as my class. I would like a header similar to fancyhdr, but this is not emulated in memoir. I know how to make my own pagestyle, however when I try to refer to the chapter name it only prints the chapter number. On verso pages, I want the chapter name to be left ragged and the section name to be right ragged, and vice versa on recto pages. My code looks like this:

    \makeevenhead{dtu}{\sffamily \thechapter}{}{\sffamily \thesection}
    \makeoddhead{dtu}{\sffamily \thesection}{}{\sffamily \thechapter}
    \makeevenfoot{dtu}{\sffamily \thepage}{}{}

But it only prints the numbers, not the number + name of the chapter/section! How can I include the number+name of each chapter and section in the header?

share|improve this question
Have a look at this article: tug.org/pracjourn/2008-2/madsen – daleif Oct 18 '12 at 10:18
up vote 2 down vote accepted

Use \leftmark/\rightmark instead of \thechapter/\thesection. See p. 120 of the memoir manual for details.








share|improve this answer
ha may need to set the chapter and section marks as well if they are much different than the default, hence the reference to my article. – daleif Oct 18 '12 at 11:31
Tak for din artikel, Lars. Jeg har også hentet din bog. Dit arbejde er meget værdsat :-) – Carsten Gade Oct 22 '12 at 8:46

Your Answer


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.