193 lines
3.4 KiB
ReStructuredText
193 lines
3.4 KiB
ReStructuredText
:title: Превью reStructuredText
|
|
:date: 5 Aug 2022
|
|
:not_a_post:
|
|
|
|
===================================
|
|
Превью *re*\ **Structured**\ *Text*
|
|
===================================
|
|
|
|
This document is the theme preview.
|
|
|
|
Sphinx provides several different types of admonitions.
|
|
|
|
.. topic:: This is a topic.
|
|
|
|
This is what admonitions are a special case of, according to the docutils
|
|
documentation.
|
|
|
|
.. admonition:: The one with the custom titles
|
|
|
|
It's got a certain charm to it.
|
|
|
|
.. attention::
|
|
|
|
Climate change is real.
|
|
|
|
.. caution::
|
|
|
|
Cliff ahead: Don't drive off it.
|
|
|
|
.. danger::
|
|
|
|
Mad scientist at work!
|
|
|
|
.. error::
|
|
|
|
Does not compute.
|
|
|
|
.. hint::
|
|
|
|
Insulators insulate, until they are subject to ______ voltage.
|
|
|
|
.. important::
|
|
|
|
Tech is not neutral, nor is it apolitical.
|
|
|
|
.. note::
|
|
|
|
This is a note.
|
|
|
|
.. tip::
|
|
|
|
25% if the service is good.
|
|
|
|
.. warning::
|
|
|
|
Reader discretion is strongly advised.
|
|
|
|
Subheading
|
|
==========
|
|
|
|
.. Press :kbd:`Ctrl+Alt+Del`.
|
|
|
|
Subsubheading
|
|
-------------
|
|
|
|
Subsububheading
|
|
```````````````
|
|
|
|
Subsubsubsubheading
|
|
'''''''''''''''''''
|
|
|
|
Subsubsubsubsubheading
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
`Python Docs`_.
|
|
|
|
.. _Python Docs: https://docs.python.org/
|
|
|
|
The area of a circle is :math:`A_\text{c} = (\pi/4) d^2`.
|
|
|
|
.. math::
|
|
|
|
\frac{ \sum_{t=0}^{N}f(t,k) }{N}
|
|
|
|
Python code block:
|
|
|
|
.. code:: python
|
|
|
|
@app.get('/api/hello/{name}')
|
|
async def get_user_info(name: str) -> str:
|
|
return 'Hello, {}!'.format(name)
|
|
|
|
There is an ``inline literal`` and `interpreted text`
|
|
|
|
``code-block`` properties supported by Sphinx:
|
|
|
|
::
|
|
|
|
:linenos: Show line numbers
|
|
:emphasize-lines: 3,5 Highlight specific lines
|
|
|
|
------------
|
|
|
|
Bullet lists:
|
|
|
|
- This is item 1
|
|
|
|
- Sub item
|
|
|
|
- 3rd level sub item
|
|
|
|
- 4nd level
|
|
|
|
- This is item 2
|
|
|
|
- Bullets are "-", "*" or "+".
|
|
Continuing text must be aligned
|
|
after the bullet and whitespace.
|
|
|
|
Note that a blank line is required
|
|
before the first item and after the
|
|
last, but is optional between items.
|
|
|
|
Enumerated lists:
|
|
|
|
3. This is the first item
|
|
4. This is the second item
|
|
5. Enumerators are arabic numbers,
|
|
single letters, or roman numerals
|
|
6. List items should be sequentially
|
|
numbered, but need not start at 1
|
|
(although not all formatters will
|
|
honour the first index).
|
|
#. This item is auto-enumerated
|
|
|
|
Definition lists:
|
|
|
|
what
|
|
Definition lists associate a term with
|
|
a definition.
|
|
|
|
how
|
|
The term is a one-line phrase, and the
|
|
definition is one or more paragraphs or
|
|
body elements, indented relative to the
|
|
term. Blank lines are not allowed
|
|
between term and definition.
|
|
|
|
Field Lists:
|
|
|
|
:Authors:
|
|
Tony J. (Tibs) Ibbs,
|
|
David Goodger
|
|
|
|
(and sundry other good-natured folks)
|
|
|
|
:Version: 1.0 of 2001/08/08
|
|
:Dedication: To my father.
|
|
|
|
Block quotes are just:
|
|
|
|
Indented paragraphs,
|
|
|
|
and they may nest.
|
|
|
|
Grid table:
|
|
|
|
+------------+------------+-----------+
|
|
| 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. |
|
|
+------------+------------+-----------+
|
|
|
|
Simple table:
|
|
|
|
===== ===== ======
|
|
Inputs Output
|
|
------------ ------
|
|
A B A or B
|
|
===== ===== ======
|
|
False False False
|
|
True False True
|
|
False True True
|
|
True True True
|
|
===== ===== ======
|
|
|