3

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}
\setsecheadstyle{\Large\sffamily\raggedright}
\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}
5

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.

enter image description here

\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
1

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:

enter image description here

\documentclass{memoir}
\usepackage{microtype} % for '\textls' macro
\setsecheadstyle{\Large\sffamily\raggedright\textls[50]}
\usepackage[scaled=0.93]{cabin}
\usepackage{lipsum}

\begin{document}
\setcounter{chapter}{1} % just for this example
\section{The quick brown fox jumps}
\lipsum[2] % filler text
\end{document}
  • Thanks. But this changes letter spacing, and -- though I've edited the question to make it clearer -- I did initially say that the current letter spacing is fine: it is just the word spacing I want to alter, by a small percentage. – Peter Smith May 5 '17 at 21:07

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.