Page Layout ⇒ Enabling automatic Numbering for Paragraphs
Enabling automatic Numbering for Paragraphs
I'd like to know how to turn on automatic numbering of paragraphs and sub-paragraphs. I wish the numbering of paragraph to be composed of section number.paragraph number, and just letters for sub-paragraphs.
Example:
\section{} Actual output: 1
\paragraph{} Desired output: 1.1
\subparagraph{} Desired output: a
Thanks for your help
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
Enabling automatic Numbering for Paragraphs
Assumed that the used class is »article«, just increment the counter for the headings numbering depth.
Code: Select all
\setcounter{secnumdepth}{4}
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Enabling automatic Numbering for Paragraphs
Yeah, I did so, but \setcounter{secnumdepth}{4} doesn't work. That's why I opened this thread.A Forum Search should yield usable solutions since this has been discussed here very often.

My document class is book and with \setcounter{secnumdepth}{4} I got numbering like these for paragraphs:
1.0.0.11
1.0.0.12
1.0.0.13
While what I wish for is
1.1
1.2
1.3
All right, I know that, it's just that I don't use subsections because the headings are placed above the text, just like in sections.It could be helpful to know the used document class. Please note that the next heading level below \section is \subsection and not \paragraph.
Thanks for your help
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Enabling automatic Numbering for Paragraphs
These headings can be customized by the titlesec package.AleCes wrote:[…] All right, I know that, it's just that I don't use subsections because the headings are placed above the text, just like in sections. […]
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Enabling automatic Numbering for Paragraphs
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Enabling automatic Numbering for Paragraphs
Section 3 in general and Section 3.1 in particular should help you on in this regard. You may also be interested in Section 9 with its examples.AleCes wrote:[…] Could you please show me in which page/chapter I'll find the pieces of informations I'm looking for? […]
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Enabling automatic Numbering for Paragraphs
Code: Select all
\titleformat{\paragraph}

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Enabling automatic Numbering for Paragraphs
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Enabling automatic Numbering for Paragraphs
Are you sure it is worth the pain? And pag. 24 shows (9.3 Chapter example) appears to be dealing with fancy, colored headings, is that really what I need?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Enabling automatic Numbering for Paragraphs
My apologies for trying to show how it could be done consistently with consecutive heading levels. Won't happen again.AleCes wrote:So you want me to tamper with \subsection and \subsubsection instead of \paragraph and \subparagraph? But I'm contented with the overall format of paragraphs and subparagraphs, I just want to change the title. On the other hand, I'll have to make a much more substantial change in order to transform a subsection into a paragraph. (Numbering is OK, but all of the rest is not). […]
So I suggest that you simply redefine the concerned counters. As an example I give the redefinition for the depiction of the »subparagraph« counter.
Code: Select all
\renewcommand*{\thesubparagraph}{\alph{subparagraph}}
My fault. In the current version of the manual it's on page 21. And I surely didn't want to cause you pain with my suggestions. Redefining the counters will presumably less painful for you.AleCes wrote:[…] Are you sure it is worth the pain? And pag. 24 shows (9.3 Chapter example) appears to be dealing with fancy, colored headings, is that really what I need?
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10