4

I'm using the memoir class, and the microtype and titlesec packages. I have the chapter names appearing in smallcaps, and I would like the spacing between the letters increased a little bit. Here's the minimum working example:

\documentclass[smalldemyvopaper,11pt,twoside,onecolumn,openright,extrafontsizes]{memoir}
\usepackage[tracking=true]{microtype} % for micro-typographical adjustments
\usepackage{titlesec} % for manipulation of chapter titles

\SetTracking{encoding=*,shape=sc}{120}
\newcommand*{\textsomels}[1]{\textls[25]{#1}}

% chapter title manipulation
% padding with zero
\renewcommand*\thechapter{\ifnum\value{chapter}<10 0\fi\arabic{chapter}}
% chapter title display
\titleformat
{\chapter}
[display]
{\normalfont\scshape\huge}
{\HUGE\thechapter\centering}
{0pt}
{\vspace{18pt}\centering}[\vspace{42pt}]
% BEGIN THE DOCUMENT
\begin{document}
\mainmatter
\chapter{\textsomels{Chapter One}}
\lipsum[1-10]
\end{document}

I get the right output with \chapter{\textsomels{Chapter One}}, but when I make the line, {\normalfont\scshape\huge}, which is the one that is responsible for the chapter title to {\textsomels\normalfont\scshape\huge}, the formatting messes up.

I do not want to write \chapter{\textsomels{Chapter Name}} every time.

Where am I making the mistake? I'm new to TeX.

Ram Iyer
  • 289
  • Could you provide a minimum working example that compiles and demonstrates the issue, to help save some work for those who would otherwise offer to help you? – Steven B. Segletes Jun 15 '16 at 15:47
  • Apologies. I'll edit the question with the \begin{document} and \end{document}, and add some text. The rest of the preamble is there in the question. – Ram Iyer Jun 15 '16 at 15:55
  • Related: http://tex.stackexchange.com/questions/40377/letterspacing-memoir-section-headers – Steven B. Segletes Jun 15 '16 at 15:56
  • 1
    Related: http://tex.stackexchange.com/questions/184301/spacing-capitals-in-section-headings would indicate that using \lsstyle instead of \textls{#1} would work. – Steven B. Segletes Jun 15 '16 at 15:57
  • 1
    lsstyle does change the spacing, but may I know how to control the spacing? I'm sorry if it is a dumb question. \newcommand*{\textsomels}[1]{\lsstyle[20]} doesn't seem to control it. I'm sure I've gotten the syntax wrong. – Ram Iyer Jun 15 '16 at 16:08

2 Answers2

6

As the OP notes in the comment, \lsstyle, while it works as an argument to titlesec, does not allow for the letterspacing value to be explicitly set.

Here, I introduce \lsstylehelp{} in lieu of \lsstyle, where the argument is the letterspacing value to set for the subsequent \lsstyle. The definition is simply \newcommand\lsstylehelp[1]{\edef\MT@letterspace@{#1}\lsstyle}

Here is the MWE.

\documentclass[smalldemyvopaper,11pt,twoside,onecolumn,openright,extrafontsizes]{memoir}
\usepackage[tracking=true]{microtype} % for micro-typographical adjustments
\usepackage{titlesec,lipsum} % for manipulation of chapter titles

\SetTracking{encoding=*,shape=sc}{120}
\newcommand*{\textsomels}[1]{\textls[305]{#1}}

% chapter title manipulation
% padding with zero
\renewcommand*\thechapter{\ifnum\value{chapter}<10 0\fi\arabic{chapter}}
% chapter title display
\titleformat
{\chapter}
[display]
{\normalfont\scshape\huge\lsstylehelp{300}}
{\HUGE\thechapter\centering}
{0pt}
{\vspace{18pt}\centering}[\vspace{42pt}]

\makeatletter
\newcommand\lsstylehelp[1]{\edef\MT@letterspace@{#1}\lsstyle}
\makeatother
% BEGIN THE DOCUMENT
\begin{document}
\mainmatter
\chapter{Chapter One}
\lipsum[1]

\chapter{\textsomels{Chapter One}}
\lipsum[1]
\end{document}

enter image description here

2

Just replace \titleformat with this:

\titleformat
{\chapter}
[display]
{\filcenter\normalfont\scshape\huge}
{\HUGE\thechapter}
{18pt}
{\textsomels}[\vspace{42pt}]

enter image description here

Bernard
  • 271,350