memória + titleec: mudar a forma da subseção

Sep 02 2020

Eu tenho a seguinte configuração:

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

Ou seja, gostaria que os títulos dos capítulos e das seções estivessem em versalete ( scopção) e na margem ( hangsecnum). Ao mesmo tempo, gostaria que as subseções estivessem em itálico. Como fazer isso?

Respostas

1 Bernard Sep 02 2020 at 06:05

A partir da documentação, na seção de referência rápida , você simplesmente precisa digitar

\titleformat*{\subsection}{\itshape}

Obviamente, se você tiver requisitos mais complexos, poderá ter que usar a interface Avançada .

2 egreg Sep 02 2020 at 16:47

O pacote titlesecnão é compatível com memoir. Consulte incompability de classes `Titleec` e` memoir` e Sobre incompatibilidade de memórias e Titleec

Você pode obter o efeito desejado com memoirferramentas.

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