Document Classesbook | Wrong Section and Subsection Enumeration

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
[M]OGuL
Posts: 5
Joined: Mon Sep 12, 2011 7:21 pm

book | Wrong Section and Subsection Enumeration

Post by [M]OGuL »

Hi!

I'm working on a thesis template, but I experience some strange issues when I compile my file.

I marked my problem in red, as you can see at page 10/10.

Can anyone explain too me what is wrong? I added the needed files for the compilation in an attachment.

Thanks in advance!
Last edited by [M]OGuL on Mon Sep 19, 2011 8:50 pm, edited 2 times in total.

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

Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

book | Wrong Section and Subsection Enumeration

Post by Stefan Kottwitz »

Hi,
  1. remove this line in layout.tex or comment it out, because it removes the per-chapter-numbering:

    Code: Select all

    \counterwithout{section}{chapter}
  2. modify these lines in your document, which define the section counter presentation, which affects the subsection counter as well:

    Code: Select all

    \renewcommand*\thesection{\roman{section}}
    \renewcommand*\thesection{\arabic{section}}
    Change it for including the chapter number:

    Code: Select all

    \renewcommand*\thesection{\thechapter.\roman{section}}
    \renewcommand*\thesection{\thechapter.\arabic{section}}
Stefan
LaTeX.org admin
[M]OGuL
Posts: 5
Joined: Mon Sep 12, 2011 7:21 pm

Re: book | Wrong Section and Subsection Enumeration

Post by [M]OGuL »

Works like a charm, thanks for your quick reply!
Post Reply