2

By default, memoir's chapter headers (those appearing at the top-left of each page) are "Chapter X: Name". I'd like to change them to just "Name". I've tried using the related answer here, but that seems to completely remove the top-left header entirely.

I'd also like this to be doable from the preamble, for all chapters (without having to change individual chapter declarations).

Could someone supply an example that'd work? I've had a dig around the memoir manual, and can't really seem to find what I'd need.

EDIT: Current preamble:

\documentclass[oneside]{memoir}
\usepackage[T1]{fontenc}
%\usepackage[utf8]{inputenc} Using LuaTeX to allow Unicode
\usepackage[margin=1.5in]{geometry}
\usepackage{hyperref}
\usepackage{amsmath}
\usepackage[normalem]{ulem}
\usepackage{graphicx}
\usepackage{xcolor}


% Remove chapter and direct number from heading
\makechapterstyle{mychapterstyle}{%
    \renewcommand{\printchaptertitle}[1]{\chaptitlefont{##1}}%
    \renewcommand{\printchaptername}{}% 
    \renewcommand{\printchapternum}{}%
}
\chapterstyle{mychapterstyle}
% Also from header
\addtopsmarks{headings}{}{
    \createmark{chapter}{left}{nonumber}{\thechapter}{}
}
\pagestyle{headings} % activate changes

\hypersetup{
    colorlinks = true,
    urlcolor   = blue,
}
2
  • 1
    Welcome to TeX.SX!
    – Bobyandbob
    May 30 '18 at 11:46
  • Rather you should provide an example of your current setup. The post you refer to works just fine, if it does not for you, we need to see the setup you are using.
    – daleif
    May 30 '18 at 12:54
2

You're using

\addtopsmarks{headings}{}{
\createmark{chapter}{left}{nonumber}{\thechapter}{}
}

but your document is a oneside document, so left doesn't make sense. Instead use

\addtopsmarks{headings}{}{
    \createmark{chapter}{both}{nonumber}{\thechapter}{}
}

And you should get what you want. Alternatively, if you do want the heading only on the left, then you need to pass [twoside] as a document class option.

Some other comments: you don't need to use fontenc with LuaTeX. The hyperref package should be loaded last in the package loading order (with some rare exceptions).

Also, for future questions, posting just the preamble of a document is rarely enough (even though it turned out to be enough in this case). It's better to post a complete (but minimal) compilable document that shows the problem.

1
  • Thank you very much, that works! Noted for the future questions, and the extra advice is appreciated. May 30 '18 at 15:45

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.