# How to change heading font style in memoir?

Please take a look at the image below. How do I change the heading font style? As you can see it wraps over in two lines because the chapter title is too long. I did read memoir manual but the only thing I found was \makeheadrule and I already used it to get the underline effect for the heading (\makeheadrule{headings}{\textwidth}{0.3pt}). I am not sure how to change it further to reduce the font size as it uses the built-in headings style. I couldn't figure out how to modify headings style. Any ideas?

Also after I have changed the size, I'd like to reset it back for further chapters as they don't have that long chapter title.

-

Use the \copypagestyle macro (memoir manual, p. 121) to clone the headings pagestyle and add a fontsize-changing macro to the default definition (which may be found at p. 124). Even better, use a shorter title for the header as suggested by Gonzalo Medina.

\documentclass[12pt]{memoir}

\usepackage{lipsum}

\begin{document}

\chapter{Selective printing and deleting of certain lines}

\section{foo}

\lipsum[1-8]

\cleardoublepage

\chapter[Selective printing and deleting]{Selective printing and deleting of certain lines}

\section{foo}

\lipsum[1-8]

\end{document}

-

You can use the \markboth command to manually customize the mark (in particular, the font to be used for the mark) used in the header for a particular chapter. I don't like this approach, since it will render the document layout inconsistent (some chapters will have a header in normal size and one chapter will have a header in a smaller font).

A better option would be to use the second optional argument of the \chapter command (a feature implemented in memoir) to use a shorter text for the header; the following example illustrates these approaches:

\documentclass{memoir}
\usepackage{lipsum}

\begin{document}

% using \markboth to change the mark used
\chapter{Selective printing and deleting of certain lines}
\markboth{\small \chaptername\ \thechapter. Selective printing and deleting of certain lines}{}
\section{Test section}
\lipsum[1-30]
% using the second optional argument of \chapter to change the header text
\chapter[Selective printing and deleting of certain lines][Selective action on lines]{Selective printing and deleting of certain lines}
\section{Test section}
\lipsum[1-30]

\end{document}

-

A third thing to do is not to use pure capitals in the header, they take up a lot of space.

Simply issue

\nouppercaseheads


before activating the page style will deactivate the automatic upper casing

-