I'm using titlesec
to customise my section headings.
I want to have my subsections in capitals, which I can achieve with the \uppercase
function, but all typographic style guides suggest that caps should have increased space.
The microtype
package can apply increased letter spacing, according to:
Enlarging tracking (= letter spacing)
The thread mentions a command of \textls
which I have tried inserting into the titlesec options, but TexShop throws up an error when typesetting.
Alternatively, using the switch \lsstyle
doesn't work either.
Here's MWE:
\documentclass{article}
\usepackage[letterspace=150]{microtype}
\usepackage{titlesec}
\titleformat{\section}{\large}{\thesection}{1em}{}
\titlespacing{\section}{0pt}{2.5ex}{2.5ex}
\titleformat{\subsection}{\small\uppercase\lsstyle}{\thesubsection}{1em}{}
\titlespacing{\subsection}{0pt}{2.5ex}{0ex}
\titleformat{\subsubsection}{\sffamily\itshape}{\thesubsubsection}{1em}{}
\titlespacing{\subsubsection}{0pt}{1.5ex}{0ex}
\titleformat{\paragraph}[runin]{\normalfont\normalsize}{\theparagraph}{1em}{}
\titleformat{\subparagraph}[runin]{\normalfont\normalsize}{\thesubparagraph}{1em}{}
\title{Minimal Working Example}
\date{}
\author{Author}
\begin{document}
\maketitle
\section{Section 1}
Content
\subsection{Subsection, my friend}
\end{document}
Edit: am using XeLaTeX in my non-MWE to access system fonts. The error I get (see comment to an answer below) occurs in XeLaTeX.