This page is written in mixed markdown and reST. Source code is here.
A strong, emphasis, deleted, code with single-backtick
,
code with two-backticks
, code can include multiple (``) backticks
,
:code:reST's code role
, and inline htmldelete.
Auto link to http://example.com/.
Link to example.com in markdown.
Link to anchor in markdown.
Link to document in markdown.
Link to document with anchor in markdown (doc directive does not support anchors, so this links to the document only).
Link to example.com <http://example.com/>
_ in reST.
Link to example
_ in reST_ref.
Link to example.com with title in markdown.
.. _example: http://example.com
.. _testlabel:
This is a simple sentence.
| sentence with | newlines | (reST)
Sentence with
hard-wrap (markdown, trailing two spaces)
block quote second line
nested quote
Block quote after raw-html directive
- unordered list new line
- next item
- nested list with new line
- nested list item 2
- original depth
- ordered list item
- second with new line
- original depth again
- ordered list in new line
- second item
- nested unordered list
- second item with new line
- original depth
- nested ordered list with new line
- again
- original depth again
Simple, indented code block
pip install sphinx
Code block with triple backticks and language.
def a(n: int) -> None:
for i in range(n):
print(i)
Triple-tildes (~~~
) are also available.
def a(n: int) -> None:
for i in range(n):
print(i)
Here is reST style code block.
.. code-block:: python
if True:
print('\n')
(cell-alignment is not supported currently)
Table Header 1 | Table Header 2 | Table Header 3 |
---|---|---|
normal | italic | bold |
code |
inline-html |
This is $E = mc^2$
inline math.
The below is math-block (markdown-style).
The below is reST-style math-block.
.. math::
E = mc^2
To include markdown file:
.. mdinclude:: path-to-file.md
To include markdown file with specific lines:
.. mdinclude:: included.md
:start-line: 2
:end-line: -2
Original included.md
file is:
.. include:: included.md :code: md
This file included as:
#### Include this line
and results in HTML as below:
.. mdinclude:: included.md :start-line: 2 :end-line: -2
Footnote1 and footnote2 with markdown.
Footnote with reST\ [#a]_.