1

I'm struggling with chapter's title in header. Memoir gives this nice possibility of defining separate title for showing on top of the page but in some cases one would like to change it before new chapter.

Is there any way to change chapter's head-title while being still in that chapter? For example with the beginning of new sectioning lever or even without any, just between lines?

\documentclass[12pt]{memoir}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{lipsum}
\begin{document}

\chapter*[First]{First}
\section*{SomeTextEnglish}
\blindtext[10]@english
\section*{SomeTextLatin} %form here I'd like to write in header e.g. 'PRIMUM'
\lipsum[1-10]

\end{document}
3
  • Provide us something to work with (in the form of a minimal example that replicates the current behaviour) and we can work some magic!
    – Werner
    Mar 22, 2017 at 19:38
  • Right! I wasn't sure how to make MWE from my original code. Hope this will do :)
    – Precluch
    Mar 22, 2017 at 20:14
  • If your document is intended for a printed book, rather than math or an academic work or an ebook, and if you are just beginning, then have a look at the novel document class package. The feature you request is built-in, using commands \SetVersoHeadText{} and \SetRectoHeadText{}. Not in memoir.
    – user103221
    Mar 22, 2017 at 20:30

1 Answer 1

2

For your example a simple \markboth will do it:

\documentclass[12pt]{memoir}
\usepackage[english]{babel}
\usepackage{lipsum}
\begin{document}

\chapter*[First]{First}
\section*{SomeTextEnglish}
\lipsum[1-10]

\markboth{PRIMUM}{}
\section*{SomeTextLatin} %form here I'd like to write in header e.g. 'PRIMUM'
\lipsum[1-10]

\end{document}
3
  • Great! How could I not find earlier? Thanks a lot :)
    – Precluch
    Mar 22, 2017 at 20:41
  • Worth pointing out that \markboth partially ignores style of header titles. In this case 'PRIMUM' has to be written in uppercase, otherwise it'll be in small letters. Unlike title given in \chapter arguments, where text fully goes through header's formatting.
    – Precluch
    Mar 22, 2017 at 20:54
  • 1
    That's the normal behaviour for \markboth. You can use \markboth{\MakeUppercase{Primum}}{} or for memoir \markboth{\memUChead{Primum}}{}, which then automatically adheres to \uppercaseheads and \nouppercaseheads.
    – Mike
    Mar 22, 2017 at 22:02

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.