
У меня следующая настройка:
\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}
То есть я хотел бы, чтобы названия глав и разделов были написаны маленькими заглавными буквами ( sc
опция) и находились на полях ( hangsecnum
). В то же время я хотел бы, чтобы подразделы были выделены курсивом. Как этого добиться?
решение1
Из документации, вКраткая справкараздел, вам просто нужно ввести
\titleformat*{\subsection}{\itshape}
Конечно, если у вас более сложные требования, вам, возможно, придется использовать Расширенный интерфейс.
решение2
Пакет titlesec
не совместим сmemoir
. СмотретьНесовместимость классов `titlesec` и `memoir`иО несовместимости мемуаров и титулов
Добиться желаемого эффекта можно с помощью memoir
инструментов.
\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}
Если вы хотите, чтобы цифры были внутри полей, вы можете сделать так:
\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}
Возможно, вам придется отрегулировать фиксированное пространство из 3 элементов, чтобы вместить большие числа.