I have many unnumbered sections in my report (more than 100), all created with:

\section*{section name}

I want to find a way to easily add them all to the TOC (specifically to a minitoc). Since I use the * to remove the numbering, they won't appear in TOC. I found out in minitoc documentation that I should use:

\addcontentsline{toc}{section}{repeat here section title}

However, I don't want to have a duplicated title in every section, or even to change all the involved files to add those already written sections to the TOC. How to add those sections' names to the minitoc without using the addcontentsline command? Is it possible?

5 Answers 5


The easiest way to do this is to use \section but to change secnumdepth so that they don't get numbered.

  • 3
    Thanks, it worked like a charm! It's easier to remove the * from each section than duplicate all their names! And I could even use the \setcounter{secnumdepth}{0} after some chapters, keeping the numbering on the previous ones!
    – Weslei
    Commented Feb 21, 2011 at 19:33
  • 23
    A convenient solution, but unsuitable for documents with a mix of numbered and non-numbered parts. For these scenarios, look at @Vser 's answer below
    – Avision
    Commented Dec 2, 2017 at 8:40
  • 1
    For a scoped version, enclose the relevant part in {} and use \makeatletter\c@secnumdepth=0\makeatother at the beginning.Also, to apply either to chapters, use -1.
    – golvok
    Commented Aug 1, 2019 at 17:00
  • 2
    This messes up either toc page numbers and/or bookmark page numbers and/or clickable links (wrong pages), unfortunately. You have to randomly spread \phantomsection additions and hope that nothing breaks.
    – Emit Taste
    Commented May 14, 2020 at 15:05
  • agreed ruins \hyperref on the toc Commented Sep 6, 2020 at 13:00

Another solution using \addcontentsline{toc}{section}{repeat here section title} relies on nameref. In fact I'm numbering every section (chapters and so on) with a label. So you could use:

% Package 'hyperref' needed for command '\nameref'

It's only a local change and is persistent to names' change of your section.

  • Non numbered chapter* header issue
    – Johannes_B
    Commented Nov 5, 2014 at 16:20
  • 1
    Do you need to include \usepackage{nameref} in the header to do this ?
    – usernumber
    Commented Jun 29, 2015 at 16:08
  • 1
    Rather \usepackage{hyperref} I think.
    – lindhe
    Commented May 23, 2016 at 13:22
  • 3
    This is a better solution for those seeking a document with both numbered and non-numbered parts/sections.
    – Avision
    Commented Dec 2, 2017 at 8:39
  • This also works for other composition units like chapters with \addcontentsline{toc}{chapter}{\nameref{<label_of_chapter>}}.
    – anaik
    Commented Feb 15 at 16:02

If you are using KOMA-Script the easiest way is to use these built in commands:

\addpart \addchap \addsec

Which work just like \part* \chapter* \section* while also being added to the toc.

  • Simple and Elegant! God bless Markus Kohm, who created the Koma Scripts. They always surprise me with very elegant solutions to awkward LaTeX problems. (See, for example solution for landscape pages) Commented Aug 5, 2022 at 8:46

Easy to use:


got this answer here : https://latex.org/forum/viewtopic.php?t=335

  • Nicely simplified, but there is not a great difference with @Vser answer. ;) Commented Aug 5, 2022 at 8:44
  • Down vote. This is exactly the code that's included in the question. Your answer adds nothing new.
    – richard
    Commented Feb 4 at 16:14

What you can do is to redefine your chapters (or sections). Here I copy what I did for my report. I redefined \chapter* and defined a \chapter**

The latter is the old \chapter*, while the former is an unnembered chapter, but added to the toc.


  • 1
    Of course, you can do the same with \section and \section*
    – Oscar
    Commented Jun 13, 2017 at 17:51

You must log in to answer this question.

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