LyXpart section numbering

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
jalea148
Posts: 8
Joined: Sun Oct 30, 2016 12:12 am

part section numbering

Post by jalea148 »

Article has multiple parts and sections within each. The section numbering does not initialize after a new part. For example, if the last section in Part I is numbered 4, I would like the 1st section in Part II numbered 1; not 5.

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

part section numbering

Post by Stefan Kottwitz »

Two solutions are here: How to reset section numbering by part.

In short: either use a local layout in LyX: go into Document Settings, select Local Layout from the list, paste the contents of the Code section below into the box and click the Validate button, then click OK.

Code: Select all

Counter section
        Within               part
End
Or, add this code to your document preamble:

Code: Select all

\usepackage{chngcntr}
\counterwithin*{section}{part}
Image

Stefan
LaTeX.org admin
jalea148
Posts: 8
Joined: Sun Oct 30, 2016 12:12 am

Re: part section numbering

Post by jalea148 »

Thank you. I have 2 other solutions. For me, no section numbering is acceptable. If it were important [thought contrary to LYX philosophy] the section numbers could be added to the section titles.
Post Reply