
나는 다음과 같은 설정을 가지고 있습니다 :
\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` 클래스 비호환성그리고회고록과 titlesec 비호환성 정보
도구를 사용하여 원하는 효과를 얻을 수 있습니다 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}
큰 숫자에 맞게 고정된 3pc 공간을 조정해야 할 수도 있습니다.