Using ReStructuredText in INGInious¶
This guide gives some examples on how to use ReStructuredText in INGInious.
Links, images, tables, and other basic things¶
The RST documentation is pretty complete, and INGInious supports most of it. See below for some basic examples.
Example¶
Math block:
\[α_t(i) = P(O_1, O_2, … O_t, q_t = S_i λ)\]
A sentence with inline math: \(α_t(i) = P(O_1, O_2, … O_t, q_t = S_i λ)\) (you see, it’s inline). \(\LaTeX\) is supported.
A |
not A |
---|---|
False |
True |
True |
False |
Code¶
`The RST documentation is pretty complete <http://docutils.sourceforge.net/docs/ref/rst/directives.html>`_, and
INGInious supports **most** of it. See below for some basic examples.
Example
```````
.. image:: https://raw.githubusercontent.com/UCL-INGI/INGInious/master/inginious/frontend/static/images/header.png
`A link to the image <https://raw.githubusercontent.com/UCL-INGI/INGInious/master/inginious/frontend/static/images/header.png>`_
Math block:
.. math::
α_t(i) = P(O_1, O_2, … O_t, q_t = S_i λ)
A sentence with inline math: :math:`α_t(i) = P(O_1, O_2, … O_t, q_t = S_i λ)` (you see, it's inline).
:math:`\LaTeX` is supported.
.. table::
===== =====
A not A
===== =====
False True
True False
===== =====
Admonitions - warnings, tips, …¶
The following warning/tips/… can be displayed using the code given below. INGInious is able to parse standard RST admonitions (which are displayed as bootstrap alerts).
We also introduced a new option, :title:, which allows providing a title. In case a title is given, the admonitions are displayed as bootstrap cards.
Example¶
A custom danger title
Beware killer rabbits!
A custom warning title
Water is humid!
You may need this
Take this tip with you
Some note
Write something here
Bravo!
You succeeded!
Now in blue
Some blue for you
Now in grey
Some grey for you
Some dark in the light
...
Beware killer rabbits!
Water is humid!
Take this tip with you
You succeeded!
Some blue for you
...
Code¶
.. danger::
:title: A custom danger title
Beware killer rabbits!
.. warning::
:title: A custom warning title
Water is humid!
.. tip::
:title: You may need this
Take this tip with you
.. note::
:title: Some note
Write something here
.. admonition:: success
:title: Bravo!
You succeeded!
.. admonition:: primary
:title: Now in blue
Some blue for you
.. admonition:: secondary
:title: Now in grey
Some grey for you
.. admonition:: dark
:title: Some dark in the light
...
.. danger::
Beware killer rabbits!
.. warning::
Water is humid!
.. tip::
Take this tip with you
.. admonition:: success
You succeeded!
.. admonition:: primary
Some blue for you
.. admonition:: dark
...