Turn on subsection numbering in memoir

26,271

Solution 1

The correct way to do this, specifically for memoir, IMO, is to use

\setsecnumdepth{subsection}

Why?:

  • It's a higher-level command --- \setcounter is somewhere in the bowels of memoir/LaTeX
  • It's semantic --- saying "subsection" is hopelessly more meaningful than saying "2"
  • It's practical --- it persists across \mainmatter

Solution 2

The counter secnumdepth controls "[t]he level number of the least significant sectional unit with numbered headings" (Lamport, LaTeX: A document preparation system , p. 176). The memoir class sets secnumdepth to 1 (section), so you should change this to 2 (subsection). Alternatively, you may use the memoir command \setsecnumdepth.

\documentclass{memoir}

\setcounter{secnumdepth}{2}% alternative A
% \setsecnumdepth{subsection}% alternative B

\begin{document}

\chapter{bla}

\section{blubb}

\subsection{foo}

\end{document}

Solution 3

change the secnumdepth, using the \setcounter{secnumdepth}{2} the following table may help.

Command                            Level        Comment
------------------------------------------------------------------------
\part{part}                        -1       not in letters
\chapter{chapter}                   0       only books and reports
\section{section}                   1       not in letters
\subsection{subsection}             2       not in letters
\subsubsection{subsubsection}       3       not in letters
\paragraph{paragraph}               4       not in letters
\subparagraph{subparagraph}         5       not in letters
Share:
26,271

Related videos on Youtube

doncherry
Author by

doncherry

Updated on October 19, 2020

Comments

  • doncherry
    doncherry about 3 years

    It seems that the memoir class automatically avoids numbering subsection headings. Chapter and section titles are numbered, but subsection headings contain only the subsection name, and are not prefixed by the subsection number. Why is this the case, and more importantly, how do I turn subsection numbering back on?

  • Grzenio
    Grzenio about 13 years
    Thanks! I had tried setting that in the preamble, but it hadn't worked -- it turned out that \mainmatter resets secnumdepth. Now that I know what to look for, the memoir documentation states that calling \maxsecnumdepth in the preamble sets the numbering level for \mainmatter.
  • recluze
    recluze almost 12 years
    Just a minor note. If you want the subsection to appear in the TOC as well, you should issue the \maxtocdepth{subsection} command.
  • daleif
    daleif about 11 years
    memoir has an easier interface such that people do not need to remember those numbers