TransWikia.com

How can I set the toc depth so that chapter's numbering follows part's numbering?

TeX - LaTeX Asked by Sofy on March 6, 2021

I use the documentclass[twoside,11pt]{book}.

My current document yields something like this :

  • PART 1
    • Chapter 1
      • Section 1.1
    • Chapter 2
      • Section 2.1
  • PART 2
    • Chapter 3
    • Chapter 4

Instead, what I am trying to do is something like this:

  • PART 1
    • Chapter 1.1
      • Section 1.1.1
    • Chapter 1.2
      • Section 1.2.1
  • PART 2
    • Chapter 2.1
    • Chapter 2.2

Is there an easy way to do so ?
Thank you for your help.

One Answer

You tell us what you get but not how you get it. You obviously use your own code for changing the ToC layout. Basically I assume that you are just asking about changing the divisional numbering scheme.

% partchapprob.tex SE 545742
documentclass{book}

renewcommand{thechapter}{thepart.arabic{chapter}}
begin{document}
tableofcontents
part{One}
chapter{First}
section{A section}
chapter{Second}
section{Another section}
part{Two}
chapter{Ctitle}
section{Stitle}
end{document}

In the above MWE the redefinition of the chapter number gives what I think you are after.

It is hard trying to answer a question when you don't know what has been done. --- GOM

Answered by Peter Wilson on March 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP