[Tex/LaTex] Hang section number, but not subsection number in Memoir

memoirsectioning

I use the memoir class to control my document. I have placed the section numbering in the margin with \hangsecnum, but I don't want the subsection and subsubsection numbering in the margin.

How do I prevent this?

Best Answer

Using the sectioning hooks would be an easy way:

\setsechook{\hangsecnum}
\setsubsechook{\defaultsecnum}
\setsubsubsechook{\defaultsecnum}

Edit: here's a minimal working example, according to the comments:

\documentclass{memoir}
\addtocounter{secnumdepth}{2}
\setsechook{\hangsecnum}
\setsubsechook{\defaultsecnum}
\setsubsubsechook{\defaultsecnum}
\begin{document}
\chapter{One}
\section{Section heading}
\subsection{Subsection heading}
\subsubsection{Subsubsection heading}
\end{document}

alt text

Related Question