[Tex/LaTex] hide section numbering but continue adding-up


When I hide a section with the asterisk it doesn't show the number in the heading and the section doesn't show up in the TOC.

How to hide a section but have the counter beeing added-up correctly so that \thesection gives the correct number of the section?

Best Answer

I don’ think there’s a finished macro/package for that but you can increment the counter either with \stepcounter{section} or with \refstepcounter{section} which increments the counter and updates the belonging \ref-lables.

So If you need a command for this try


or if you’re using KOMA-Script


The main difference between \section* and \addsec is that the latter also sets the headmarks and generates a ToC entry, where \section* only prints text formatted like the section headline. (See the scrguien.pdf [or the german scrguide] for more information about \addsec command)