1

I have the following setup:

\documentclass{memoir}
\usepackage[sc]{titlesec} % "sc" to make titles small cap

\setsecnumdepth{subsection} % to number up to subsection

\hangsecnum % to make the numbers hanging in the margin

\begin{document} \chapter{Test chapter} \section{Test chapter} \subsection{Test chapter} \end{document}

That is, I would like the chapter and section titles to be in small caps (sc option) and be in the margin (hangsecnum). At the same time, I would like the subsections to be in italic. How to achieve this?

Ilonpilaaja
  • 1,335

2 Answers2

4

The package titlesec is not compatible with memoir. See `titlesec` and `memoir` class incompability and About memoir and titlesec incompatibility

You can obtain the wanted effect with memoir tools.

\documentclass{memoir}

\setsecnumdepth{subsection} % to number up to subsection

\renewcommand{\chapnamefont}{\normalfont\huge\scshape} \renewcommand{\chapnumfont}{\normalfont\huge\scshape} \renewcommand{\chaptitlefont}{\normalfont\Huge\scshape}

\setsecheadstyle{\Large\scshape\memRTLraggedright} \setsubsecheadstyle{\large\itshape\memRTLraggedright} \setsecnumformat{\makebox[0pt][r]{\upshape\csname the#1\endcsname\quad}} % or just \hangsecnum if you want the number to inherit the same font as the title

\begin{document}

\chapter{Test chapter} \section{Test section} \subsection{Test subsection}

\end{document}

enter image description here

If you want that the numbers are inside the margin, you can do

\documentclass{memoir}

\setsecnumdepth{subsection} % to number up to subsection

\renewcommand{\chapnamefont}{\normalfont\huge\scshape} \renewcommand{\chapnumfont}{\normalfont\huge\scshape} \renewcommand{\chaptitlefont}{\normalfont\Huge\scshape}

\setsecheadstyle{\Large\scshape\memRTLraggedright} \setsubsecheadstyle{\large\itshape\memRTLraggedright} \setsecnumformat{\makebox[3pc][l]{\upshape\csname the#1\endcsname\quad}}

\begin{document}

\chapter{Test chapter} \section{Test section} \subsection{Test subsection}

\end{document}

enter image description here

You might need to adjust the fixed 3pc space to fit big numbers.

egreg
  • 1,121,712
1

From the documentation,, in the Quick reference section, you simply have to type

\titleformat*{\subsection}{\itshape}

Of course, if you have more complex requirements, you might have to use the Advanced interface.

Bernard
  • 271,350