I am not too experienced with ReStructuredText at the moment. This document will go over my knowledge of the ReStructuredText language so far.
This document uses the revision 8407 version of the ReStructuredText markup language.
I don't have comments down in ReStructuredText yet. I believe they are formatted like this:
..
This is a comment
..
..
From what I know, comments need to be indented, and single line comments don't exist
..
ReStructuredText does not support the break statement/keyword.
To this day, I am still not entirely sure what the break
keyword does, but most languages support it.
/!\ This example has not been tested yet, and may not work
Headings in RST work like so:
=====
Document Heading (Heading 1)
=====
Heading 2
=====
Subheading (Heading 3)
-----
/!\ This example has not been tested yet, and may not work
Lists can be formed in ReStructuredText in multiple ways. The following examples showcase bullet lists, and numbered lists.
* Bullet list entry 1
* ReStructuredText
* Python 3
* Python 2
* Python 1
1. Entry 1
2. Entry 2
3. Python 3
4. Python 4?
5. HTML5
Text can be bolded in RST by doing the following:
This text is not bold
**This text is bold**
Text can be italicized in RST by doing the following:
This text is not italicized
*This text is italicized*
A code block can be formed in RST by doing the following:
Some Python program
``print("Hello World")``
Referencing an image in ReStructuredText is very easy, and is done like so:
.. image:: Sample.svg
:alt: Image
![Image](Sample.svg "icon")
The image is first referenced. The :alt:
line is for displaying text for when the image doesn't look (most commonly, when it isn't found) then the image is referenced on the last line, and it prints it out in the document.
Horizontal Lines/divider lines are supported in ReStructuredText. They can be defined like so:
***
Lined section
***
..
The lines look the same with asterisks or hyphens
..
---
Lined section 2
---
Hyperlinks are supported in ReStructuredText. They can be defined like so:
Link1_.
.. _Link1: #footer
Footer
====
The majority of my ReStructuredText knowledge comes from the official Wikipedia page it also comes from self experimentation, notably with this repository:
-
ReStructuredText is not a curly bracket language, and also does not use semicolons at the end of each line
-
ReStructuredText is a lighweight markup language
-
ReStructuredText is most widely used in the Python programming community for documentation.
-
ReStructuredText uses the
.rst
file extension -
ReStructuredText is a language recognized by GitHub, but you have to use a
.gitattributes
file to recognize it in the GitHub Linguist -
ReStructuredText is a markup language
-
ReStructuredText can be shortened to either RST or ReST.
-
No other knowledge of ReStructuredText at the moment.
File version: 1 (2022, Saturday, April 16th at 5:40 pm PST)