4. reStructruedText#

Created:

20251118

Updated:

20251118

4.1. Syntax#

4.1.1. Titles#

Tilte h1
=============

Subtitle h2
-----------------

Rendered Results:

../../_images/p1-title.png

4.1.2. Paragraph#

Paragraph1 paragraph1 paragraph1
paragraph1 paragraph1 paragraph1 paragraph1 paragraph1
paragraph1.

paragraph2 paragraph2 paragraph2
paragraph2.

Rendered Results:

../../_images/p2-paragraph.png

4.1.3. Text styles#

*italics* **bold**

Rendered Results:

../../_images/p3-text-style.png

4.1.4. Lists#

Enumerated Lists

1. AAAA
2. BBBB

Bulleted lists

- AAAA
- BBBB

Definition lists

what
  Definition lists associate a term with a definition.

Rendered Results:

../../_images/p4-lists.png

4.1.5. Preformatting#

::

    - Do not render
    - Do not render

Rendered Results:

../../_images/p5-preformatted.png

4.1.6. Field Lists#

:Authors:
    Tony J. (Tibs) Ibbs,
    David Goodger

:Version: 1.0 of 2001/08/08

Rendered Results:

../../_images/p6-field-lists.png

4.1.7. Tables#

+------------+------------+-----------+
| Header 1   | Header 2   | Header 3  |
+============+============+===========+
| body row 1 | column 2   | column 3  |
+------------+------------+-----------+
| body row 2 | Cells may span columns.|
+------------+------------+-----------+
| body row 3 | Cells may  | - Cells   |
+------------+ span rows. | - contain |
| body row 4 |            | - blocks. |
+------------+------------+-----------+

=====  =====  ======
   Inputs     Output
------------  ------
  A      B    A or B
=====  =====  ======
False  False  False
True   False  True
False  True   True
True   True   True
=====  =====  ======

Rendered Results:

../../_images/p7-tables.png

4.3. Footnotes and Citations#

# Footnotes

Hi, This is a footnote [5]_.

.. [5] The footnote contents.

# Citations

This a a citation [Cite]_.

.. [Cite] Cite contents.

4.4. Replacement#

Thisi is |My Name|.

.. |My Name| replace:: Hailing Fang

 Today's date is |date|.

 This document was generated on |date| at |time|.

 .. |date| date::
 .. |time| date:: %H:%M

Rendered Results

../../_images/p8-substitution.png

4.5. Directives#

.. image::
.. figure::
.. code::
.. math::
.. table::
.. csv-table::
.. list-table::
.. contents::
.. target-note::
.. ootnotes::
.. citations::
.. raw::
.. include::
.. note::
.. warning::

4.6. Roles#

:code:
:math:
:raw:
:subscript:
:superscript:

4.7. References#

https://docutils.sourceforge.io/docs/user/rst/quickstart.html

https://docutils.sourceforge.io/docs/user/rst/quickref.html

https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html