Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 3 down vote accepted
\documentclass{memoir}

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

\begin{document}

\tableofcontents

\chapter{foo}

\section{foobar}

\subsection{foobargnu}

\end{document}​

enter image description here

share|improve this answer
1  
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.