2. Sectioning / Parts / HeadingsΒΆ

When we create any book, we need to split into various parts/sections.

In reStructuredText, Chapters / Sections / Sub-sections are created by drawing a long line exactly under the title.

reStructuredText is smart enough to identify which headings are at which level in a single page.

Example:

==========================================================================================
Chapter 1. (A double line abover and below)
==========================================================================================

Section 1.1. (A long line just below)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Sub Section 1.1.1. (Lline below. Same Length)
`````````````````````````````````````````````

You can use any of these characters for sectioning/headings, = - ` : ' " ~ ^ _ * + # < >

Code and output of sectioning / parts is as under.