TeX - LaTeX Asked by Ilonpilaaja on January 23, 2021
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?
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.
Correct answer by Bernard on January 23, 2021
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}{normalfonthugescshape}
renewcommand{chapnumfont}{normalfonthugescshape}
renewcommand{chaptitlefont}{normalfontHugescshape}
setsecheadstyle{LargescshapememRTLraggedright}
setsubsecheadstyle{largeitshapememRTLraggedright}
setsecnumformat{makebox[0pt][r]{upshapecsname the#1endcsnamequad}}
% 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}
Answered by egreg on January 23, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP