I have formatted a ToC with tocloft package. I have it almost right, but I would like to remove the numbers of the sections; just leave the section names. I am trying different commands but I can not find the right one. The problem is to maintain the number in the section themselves at the same time.

Any idea?

1 Answer 1


tocloft inserts \cftsecpresnum before placing the section number, and \cftsecaftersnum after it. These are hooks you can use to tie into and grab the number:

enter image description here

\usepackage{tocloft}% http://ctan.org/pkg/tocloft
\chapter{A chapter}
\section{First section}
\section{Second section}
\section{Last section}

We effective wrap the numbering mechanism of \section within the ToC inside a box \@tempboxa and store it, but never use it again. This gobbles the contents.

Note that this redefinition is global in terms of the section number display. It can be made local if you only want to display specific parts with/without section numbers. It also maintains the numbering width (set by \cftsecnumwidth). If this should be removed, add


to the document preamble as well.

  • I have a question: you already deleted the numbers in the contents table, but when you create the sections, the numbers still appear, is there a way to erase the numbers leaving just the title of the section?
    – Schwale
    Commented May 19, 2015 at 0:54
  • Should this approach work as well for the memoir class instead of the book class? I keep getting the following when trying to compile my document: ! LaTeX Error: \cftsecpresnum undefined. I can't just switch over to book based on how the rest of my document is structured (for the memoir class). I thought it worth asking here in case you knew before asking a separate question that is essentially the same one as OP's. (I looked at the tocloft package documentation but didn't really see anything there to fix my problem.) Commented Jul 26, 2015 at 23:47
  • @DanielW.Farlow: memoir uses section not sec for ToC-entries related to \section. See Table 9.3 of the memoir user manual (p 150). Therefore, using \cftsectionpresnum and \cftsectionaftersnum works. Remember to remove the usepackage{tocloft} as memoir provides this/similar functionality.
    – Werner
    Commented Jul 27, 2015 at 16:21
  • @Werner Thanks so much for your response (saved me a lot of head scratching). Tried it out and it worked perfectly. Thanks again! Commented Jul 27, 2015 at 16:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .