# Changing word spacing in section headers

Background In a draft book, I am using cabin [scaled to 0.93] as my sans-serif font both for text and for some math symbols. The font for section-headings is defined by \setsecheadstyle{\Large\sffamily\raggedright} (in a memoir class document).

The issue I am quite happy with the look of the book, except that the word-spacing in section-headings looks very slightly too cramped. (Running heads, also in sans-serif, but at normal size, look fine to me as they are.)

The question(s) Is there a way to increase the word spacing of text set in \Large\sffamily while leaving other sans serif text untouched? (The current letter spacing is fine, and I don't want to change that.)

Failing that, what is the simplest way to increase the word spacing of text set in \sffamily while leaving the spacing of mathematics set in sans serif untouched?

Minimal example to work with ...

\documentclass{memoir}
\usepackage[scaled=0.93]{cabin}
\usepackage{lipsum}

\begin{document}
\pagestyle{plain}
\setcounter{chapter}{1}
\section{This heading could do with marginally more word spacing}
\lipsum
\end{document}


You can locally over-ride the font specified interword space by setting \spaceskip, normally in the preamble, wherever you specified the section head font, but here mid document for comparison purposes.

\documentclass{article}

\begin{document}

\section{The Cat Sat On The Mat}
Zzzzzzzzzzzzzzzz

\makeatletter
\renewcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\Large\bfseries\spaceskip1cm}}
\makeatother

\section{The Cat Sat On The Mat}
Zzzzzzzzzzzzzzzz

\end{document}

• This gives a neatly minimalist solution -- thanks. – Peter Smith May 6 '17 at 7:22

If you use either pdfLaTeX or LuaLaTeX to compile your memoir document, you may achieve your objective by loading the microtype package in the preamble and changing

\setsecheadstyle{\Large\sffamily\raggedright}


to

\setsecheadstyle{\Large\sffamily\raggedright\textls[50]}


Feel free to modify the argument of \textls to suit your needs. (The default value of the optional argument is 100. I think that leads to overly loose-looking letterspacing; that's why I suggest starting with 50.)

A full MWE:

\documentclass{memoir}
\usepackage{microtype} % for '\textls' macro