reStructured Text Style#

There may be a need to modify one of the pre-existing templates or create a new one to improve how the author can convey their message.

For those occasions, here is Junction Box’s reST styling guide.

Text Emphasis#

Bold and Italic#

Sphinx can render text as either bold or italic but not both.

1Normal text, **bold text** and *italic text*.

See the styling above rendered by Sphinx below.


Normal text, bold text and italic text.

Line Spaces#

Line spaces can help emphasise text in some cases.

Text not separated by a blank line will join.

Blank lines in reST don’t render as blank lines in the document.

Line spaces will render when using the | symbol.

 1   Text on line 1
 2   Text on line 2
 3
 4
 5
 6
 7   Text on line 4
 8
 9   |
10
11   Text on line 6

See the styling above rendered by Sphinx below.


Text on line 1 Text on line 2

Text on line 4


Text on line 6

Important

See the effect of no line separation between Text on line 1 and Text on Line 2.

| symbol is not rendered but provides a clean line space.

Document Headings#

In reST, you can use different underlining styles in any order.

For reST (.rst) Title and Heading styles, see below.

 1   ========
 2   DocTitle
 3   ========
 4
 5   Heading 1
 6   =========
 7
 8   Heading 1.1
 9   -----------
10
11   Heading 1.1.1
12   ~~~~~~~~~~~~~
13
14   Heading 1.1.1.1
15   """""""""""""""

See the styling above rendered by Sphinx below.

DocTitle#

Heading 1#

Heading 1.1#

Heading 1.1.1#

Heading 1.1.1.1#

Random Heading#

Some random text to help some unexpected challenge.




Scroll down so “Random Heading” is off the screen, and click the hyperlink to see the internal linking in action.





See here Random Heading for information to help with your unexpected challenge.



Important

The :ref:`random heading-link` text is surrounded by backticks, not single apostrophe’s!