# Subsections without numbering in ToC and document

I have a table of contents which I want to modify. I want subsections without a number, in the document and the ToC.

I'm using memoir.

\documentclass[12pt, a4paper, makeidx]{memoir}


I have the following table of ToC style

\settocdepth{subsection}
\setsecnumdepth{subsection}
\maxsecnumdepth{subsection}
\settocdepth{subsection}
\maxtocdepth{subsection}


This results in (ToC)

1 Chapter Titel......................
1.1  Section......................
1.1.1  Subsection......................


I want this

1 Chapter Titel......................
1.1  Section ......................
Subsection ......................


Any help would be great

-

## 1 Answer

\documentclass{memoir}

\settocdepth{subsection}
% \setsecnumdepth{section}% default

\begin{document}

\tableofcontents

\chapter{foo}

\section{foobar}

\subsection{foobargnu}

\end{document}​


-
I'd just use \settocdepth{subsection}, never quite figured out what \maxtocdepth is used for –  daleif Feb 6 '13 at 11:48
@daleif Indeed .... the manual, though, states that \settocdepth "can only be used after the preamble", which seems to be incorrect. –  lockstep Feb 6 '13 at 11:51
I don’t have a clue! After reading your and @daleif his commend I deleted {\setsecnumdepth{subsection} \maxsecnumdepth{subsection} \settocdepth{subsection} \maxtocdepth{subsection} } So the solution of lockstep works perfect! A time ago I copied the code from an example during a Latex crash course! –  Adam Feb 6 '13 at 12:27
@lockstep: Interesting, I've noted it in my TODO list for memoir. \maxsecnumdepth is used by \mainmatter but as far as I can see \maxtocdepth is not used anywhere. \settocdepth actually write the depth to the toc file, where as \maxtocdepth does not. –  daleif Feb 6 '13 at 12:37