Document ClassesCustom Section Numbering

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
KenBures
Posts: 1
Joined: Thu Feb 07, 2013 7:11 pm

Custom Section Numbering

Post by KenBures »

I am using the book class. With that class chapters are automatically numbered 1, 2, 3 etc. Section numbers within a chapter are also numbered automatically starting with 1; for example, 3.1, 3.2, 3.3, etc. I would like to start some chapters with sections beginning with number 0, as in 3.0, 3.1, 3.2. I want to apply this to specific chapters, not to all chapters globally. I tried the instruction \setcounter{section}{0} but that did not do anything. Either it is the wrong command or I put it in the wrong place. Can anyone tell me how to change the beginning section number in selected chapters? I would like to know what command to type, and where to type it relative to the \section{SectionName} command. I don't have any experience changing the defaults of a document class, as you can probably tell. Nor could I find an answer for this in the forum archives. Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Custom Section Numbering

Post by localghost »

KenBures wrote:[…] I tried the instruction \setcounter{section}{0} but that did not do anything. […]
At the relevant places you can try \setcounter{section}{-1} instead.


Best regards and welcome to the board
Thorsten
Post Reply