
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 seções estivessem em versalete ( sc
opção) e na margem ( hangsecnum
). Ao mesmo tempo, gostaria que as subseções estivessem em itálico. Como conseguir isso?
Responder1
Da documentação,, noReferência rápidaseção, você simplesmente precisa digitar
\titleformat*{\subsection}{\itshape}
Claro, se você tiver requisitos mais complexos, talvez seja necessário usar o Interface avançada.
Responder2
O pacote titlesec
não é compatível com memoir
. VerIncompatibilidade de classe `titlesec` e `memoir`eSobre a incompatibilidade do livro de memórias e do titlesec
Você pode obter o efeito desejado com memoir
ferramentas.
\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}
Se você quiser que os números fiquem dentro da margem, você pode fazer
\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}
Pode ser necessário ajustar o espaço fixo de 3 unidades para acomodar números grandes.