Sample Document¶
Admonitions (Docutils origin)¶
Danger
This is sample of admonition directive for “Danger”.
Error
This is sample of admonition directive for “Error”.
Warning
This is sample of admonition directive for “Warning”.
Caution
This is sample of admonition directive for “Caution”.
Attention
This is sample of admonition directive for “Attention”.
Important
This is sample of admonition directive for “Important”.
Note
This is sample of admonition directive for “Note”.
Hint
This is sample of admonition directive for “Hint”.
Tip
This is sample of admonition directive for “Tip”.
Admonitions (Sphinx Additional)¶
See also
This is sample of admonition directive for “SeeAlso”.
New in version 0.3.1: Here is description of specification which added on that version.
Changed in version 0.8: Here is description of specification which changed on that version.
>>> from fibo import fib, fib2
>>> fib(500)
1 1 2 3 5 8 13 21 34 55 89 144 233 377
Headings¶
This is a first level heading (h1).
Sub-Heading¶
This is a second level heading (h2).
Sub-Sub-Heading¶
This is a third level heading (h3).
Code¶
The Sphinx Bootstrap Theme uses Bootstrap styling for inline code text and
multiline
code text
Here’s an included example with line numbers.
It also works with existing Sphinx highlighting:
<html>
<body>Hello World</body>
</html>
def hello():
"""Greet."""
return "Hello World"
/**
* Greet.
*/
function hello(): {
return "Hello World";
}
Footnotes¶
I have footnoted a first item [1] and second item [2].
Footnotes
[1] | My first footnote. |
[2] | My second footnote. |
Citation¶
Citation references, like [CIT2002]. Note that citations may get rearranged, e.g., to the bottom of the “page”.
Citation labels contain alphanumerics, underlines, hyphens and fullstops. Case is not significant.
Given a citation like [this], one can also refer to it like this.
[CIT2002] | A citation (as often used in journals). |
[this] | here. |
Comments¶
An “empty comment” does not consume following blocks. (An empty comment is ”..” with blank lines before and after.) ..
So this block is not “lost”, despite its indentation.
Tables¶
Header row, column 1 (header rows optional) | Header 2 | Header 3 | Header 4 |
---|---|---|---|
body row 1, column 1 | column 2 | column 3 | column 4 |
body row 2 | ... | ... |
+------------------------+------------+----------+----------+
| Header row, column 1 | Header 2 | Header 3 | Header 4 |
| (header rows optional) | | | |
+========================+============+==========+==========+
| body row 1, column 1 | column 2 | column 3 | column 4 |
+------------------------+------------+----------+----------+
| body row 2 | ... | ... | |
+------------------------+------------+----------+----------+
A | B | A and B |
---|---|---|
False | False | False |
True | False | False |
False | True | False |
True | True | True |
===== ===== =======
A B A and B
===== ===== =======
False False False
True False False
False True False
True True True
===== ===== =======
Treat | Quantity | Description |
---|---|---|
Albatross | 2.99 | On a stick! |
Crunchy Frog | 1.49 | If we took the bones out, it wouldn’t be crunchy, now would it? |
Gannet Ripple | 1.99 | On a stick! |
.. csv-table:: CSV Table
:header: "Treat", "Quantity", "Description"
:widths: 15, 10, 30
"Albatross", 2.99, "On a stick!"
"Crunchy Frog", 1.49, "If we took the bones out, it wouldn't be
crunchy, now would it?"
"Gannet Ripple", 1.99, "On a stick!"
Treat | Quantity | Description |
---|---|---|
Albatross | 2.99 | On a stick! |
Crunchy Frog | 1.49 | If we took the bones out, it wouldn’t be crunchy, now would it? |
Gannet Ripple | 1.99 | On a stick! |
.. list-table:: List Table
:widths: 15 10 30
:header-rows: 1
* - Treat
- Quantity
- Description
* - Albatross
- 2.99
- On a stick!
* - Crunchy Frog
- 1.49
- If we took the bones out, it wouldn't be
crunchy, now would it?
* - Gannet Ripple
- 1.99
- On a stick!
Grid¶
A “bordered” grid table:
Header1 | Header2 | Header3 | Header4 |
---|---|---|---|
row1, cell1 | cell2 | cell3 | cell4 |
row2 ... | ... | ... | |
... | ... | ... |
which uses the directive:
.. cssclass:: table-bordered