# Auto-number each section and sub-section

**URL:** <https://forum.literatureandlatte.com/t/auto-number-each-section-and-sub-section/26428>\
**Category:** Scrivener\
**Tags:** support, compile, placeholders\
**Created:** [May 12, 2014, 12:17pm UTC](https://forum.literatureandlatte.com/t/auto-number-each-section-and-sub-section/26428 "2014-05-12T12:17:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![athena-consulting](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/a/e274bd/32.png) [@athena-consulting](https://forum.literatureandlatte.com/u/athena-consulting)\
**Post date:** [May 12, 2014, 12:17pm UTC](https://forum.literatureandlatte.com/t/auto-number-each-section-and-sub-section/26428/1 "2014-05-12T12:17:32Z")

</div>

Hello,  
I would appreciate if you can help me solving this issue.  
My project has several sections and sub-sections  
 ![](http://rinascimentopolitico.it/images/Screen%20Shot.png)  
I would like to add auto-number to each section, I.e.

Chapter 1  
1.1 Preface  
1.2 Contextual background  
1.3 Scope  
1.3.1 Aim  
1.3.2 Objective  
1.3.3 Value and originality  
1.2 Research  
1.4 Structure  
Chapter 2  
2.1 Barter in monetary theories  
….

I would like each new section and subsection to automatically have the proper number before its title, and this number to appear also in the table of contents.

Thank you for the kind help!

---

<div class="post-metadata">

**Author:** ![kewms](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/kewms/32/15720_2.png) [@kewms](https://forum.literatureandlatte.com/u/kewms)\
**Post date:** [May 12, 2014, 4:19pm UTC](https://forum.literatureandlatte.com/t/auto-number-each-section-and-sub-section/26428/2 "2014-05-12T16:19:40Z")

</div>

The \<$hn\> placeholder tag will accomplish this. It goes in the Title Prefix area of the Section Layout pane (Compile -\> Formatting options) for each outline level that you want to number.

A complete list of placeholder tags can be found on the Help menu.

Katherine

---

<div class="post-metadata">

**Author:** ![athena-consulting](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/a/e274bd/32.png) [@athena-consulting](https://forum.literatureandlatte.com/u/athena-consulting)\
**Post date:** [May 12, 2014, 7:00pm UTC](https://forum.literatureandlatte.com/t/auto-number-each-section-and-sub-section/26428/3 "2014-05-12T19:00:48Z")

</div>

Hi Katherine,  
Thanks for the prompt reply.  
I used the \<$hn\>tag, however the sub-sections are not numbered starting from 1 under each section. this is what I get:

Chapter 1  
1.1  
1.2  
1.3  
1.3.1  
1.3.2  
1.3.3.  
1.4  
1.5  
Chapter 2  
2.5  
2.6 instead of 2.1  
2.7 instead of 2.2  
2.8 instead of 2.3  
Chapter 3  
3.8 instead of 3.1  
…

Should I organize the levels differently somehow?  
Thanks for your help.

---

<div class="post-metadata">

**Author:** ![MimeticMouton](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/mimeticmouton/32/34_2.png) [@MimeticMouton](https://forum.literatureandlatte.com/u/MimeticMouton)\
**Post date:** [May 13, 2014, 4:26am UTC](https://forum.literatureandlatte.com/t/auto-number-each-section-and-sub-section/26428/4 "2014-05-13T04:26:24Z")

</div>

Make sure you’re using the \<$hn\> tag for the chapter folders as well. If you’re using just the \<$n\> tag for those, it won’t restart the subcount in the next section.

---

<div class="post-metadata">

**Author:** ![athena-consulting](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/a/e274bd/32.png) [@athena-consulting](https://forum.literatureandlatte.com/u/athena-consulting)\
**Post date:** [May 13, 2014, 10:43am UTC](https://forum.literatureandlatte.com/t/auto-number-each-section-and-sub-section/26428/5 "2014-05-13T10:43:49Z")

</div>

This works,  
thank you very much.  
The great support makes Scrivener an even greater experience!

---

<div class="post-metadata">

**Author:** ![Jakob\_Papirov](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/j/898d66/32.png) [@Jakob\_Papirov](https://forum.literatureandlatte.com/u/Jakob_Papirov)\
**Post date:** [April 24, 2024, 4:09pm UTC](https://forum.literatureandlatte.com/t/auto-number-each-section-and-sub-section/26428/6 "2024-04-24T16:09:00Z")

</div>

So, I’m new to Scrivener and I haven’t figured out how to get simple numbering on headings on the exported pages. I only get a bold face font and centered text. What I want is numbered headings 1, 1.1, 1.1.1 and such.

I’m not sure I’m getting my problem across, so please feel free to ask follow-up questions!

---

<div class="post-metadata">

**Author:** ![Vincent\_Vincent](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/vincent_vincent/32/19680_2.png) [@Vincent\_Vincent](https://forum.literatureandlatte.com/u/Vincent_Vincent)\
**Post date:** [April 24, 2024, 5:12pm UTC](https://forum.literatureandlatte.com/t/auto-number-each-section-and-sub-section/26428/7 "2024-04-24T17:12:05Z")

</div>

Hi

You need to prefix (or suffix) your titles with \<$hn\> in your compile format.

See under the help menu the complete list of placeholders and explanations.
