[Tex/LaTex] Reducing the line spacing of multi-line section headings in memoir

line-spacingmemoirsectioning

[This is essentially a memoir-specific version of this question.]

How can I reduce the line spacing within section (or other) headings in memoir without affecting the spacing to the body text above?

In the example that follows, modifying \baselineskip does the trick but also affects the spacing of the heading to the previous section's body text. I would like to get rid of this unintended side effect.

Further notes about my example: Note that halving \baselineskip is too much, but it's good for illustrating the issue. I've included \tableofcontents and used the optional-argument version of \section (\section[what appears in the TOC]{what appears in the document body}) to draw attention to the fact that whatever modifications of the section heading we make, we probably don't want to affect the table of contents. For those taking issue with the visuals of the example ("The original line spacing is just fine in what you show below!"), the actual problem is from something else (my other, actual document has horrible double-spacing); update: I have included a screenshot for that as well.

Notes for those helping with a solution: 1. It seems that \par can't be issued within a section heading. 2. \setstretch (from the solutions to the linked question) doesn't work within memoir.

too-large line spacing in section headings (ordinary spacing for main document)

This issue is exacerbated by doublespacing (add \DoubleSpacing in the preamble):

too-large line spacing in section headings (double spacing for main document)

\documentclass[12pt]{memoir}

%\DoubleSpacing


\begin{document}

\tableofcontents


\chapter{This is a chapter heading}

Look at the distance of this line to the following heading (as intended):

\section{This is a section heading spanning two lines}

Look at the distance of this line to the following heading (slightly too small):

\section[This is a section heading spanning two lines]%
    {\setlength{\baselineskip}{0.5\baselineskip}%
     This is a section heading spanning two lines}

Text.

\end{document}

Best Answer

Double spacing is the worst setting one can apply to a document. I know that some stubborn secretary in the offices of universities keep asking for such typographic horrors that might have been justified in the olden days of typewritten theses, but nowadays have no reason.

End of rant.

I wouldn't reduce the interline space in headings beyond normal (single spaced), but a small reduction can be done; after all, with a double spaced document, this is just a very minor sin.

\documentclass[12pt]{memoir}
\usepackage{lipsum}

\DoubleSpacing

\renewcommand\secheadstyle{\setSpacing{0.95}\Large\bfseries\memRTLraggedright}

\begin{document}

\tableofcontents


\chapter{This is a chapter heading}

Look at the distance of this line to the following heading (as intended) 

\section{This is a section heading spanning two lines}

\lipsum[3]

\end{document}

enter image description here