reST Cheat Sheet
Conf.py
conf.py used in examples on this page
1from datetime import datetime
2import os
3import sys
4
5# -- Project information -----------------------------------------------------
6
7copyright = f"2025–{datetime.now().year}, Theo Langstraat"
8project = 'Document server'
9
10# -- General configuration ---------------------------------------------------
11
12extensions = [
13 'myst_parser',
14 'sphinx_copybutton',
15 'sphinx_design',
16 'notfound.extension',
17 'sphinxcontrib.mermaid',
18 'sphinx_tabs.tabs',
19 'sphinxcontrib.bibtex',
20 'sphinx_sitemap',
21]
22
23# Geef het BibTeX-bestand op (bijvoorbeeld refs.bib in dezelfde map)
24bibtex_bibfiles = ['refs.bib']
25
26# -- sphinx_design - Default dropdown ----------------------------------------
27
28sd_custom_directives = {
29 "dropdown-source-code": {
30 "inherit": "dropdown",
31 "argument": "**Source code**",
32 "options": {
33 #"open": "", # Open the dropdown by default.
34 "color": "secondary", # Set the color of the dropdown header (background and font).
35 # One of the semantic color names:
36 # primary, secondary, success, danger, warning, info, light, dark, muted.
37 "icon": "code", # Set an octicon icon to prefix the dropdown header.
38 #"chevron": "", # The open-close direction of the chevron. One of: right-down, down-up.
39 #"animate": "", # Animate the dropdown opening (fade-in or fade-in-slide-down).
40 "margin": "3 3 0 0", # Outer margin of grid.
41 # One (all) or
42 # four (top bottom left right) values from: 0, 1, 2, 3, 4, 5, auto.
43 #"name": "", # Set a reference-able name for the dropdown container.
44 #"class-container": "", # Additional CSS classes for the container element.
45 #"class-title": "", # Additional CSS classes for the title element.
46 #"class-body": "", # Additional CSS classes for the body element.
47 },
48 }
49}
50
51myst_enable_extensions = ["colon_fence"]
52
53templates_path = ['_templates']
54exclude_patterns = []
55
56# -- Options for HTML output -------------------------------------------------
57
58html_theme = 'sphinx_rtd_theme'
59
60html_theme_options = {
61 "collapse_navigation": False,
62 "sticky_navigation": True,
63 "navigation_depth": 6,
64 "titles_only": False,
65 "logo_only": True,
66}
67
68html_static_path = ['_static']
69html_favicon = 'images/favicon.png'
70html_logo = 'images/logo - blauw transparent.png'
71html_show_sphinx = False
72html_show_sourcelink = False
73html_permalinks = False
74
75# -- sphinx_sitemap ----------------------------------------------------------
76
77html_baseurl = 'https://doc.langstraatonline.nl/'
78sitemap_url_scheme = "{link}"
79sitemap_excludes = [
80 'search.html',
81 '404.html',
82 'genindex.html',
83]
84html_extra_path = ['extra']
85
86
87html_css_files = [
88 'css/custom-fonts.css', 'css/custom.css',
89 'css/fontawesome/css/all.min.css',
90]
91
92html_js_files = [
93 'js/init.js',
94 ('js/fullScreen.js', {'defer': 'defer'}),
95 ('js/matomo.js', {'defer': 'defer'}),
96]
97
98mathjax_path = "js/mathjax/tex-mml-chtml.js"
99mermaid_use_local = "js/mermaid/dist/mermaid.esm.min.mjs"
100
101# -- Python path adjustments -------------------------------------------------
102
103sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
104
105# -- Release info ------------------------------------------------------------
106
107from releases import (
108 author,
109 release,
110 release_dv_typo3,
111 release_dv_nc,
112 release_phiki_typo3,
113)
114
115rst_prolog = """
116.. highlight:: none
117 :linenothreshold: 20
118"""
119
120highlight_options = {
121 'python': {'linenothreshold': 1},
122 'javascript': {'linenothreshold': 1},
123 # Add other languages if needed
124}
125
126rst_epilog = """
127.. |author| replace:: {author}
128.. |release| replace:: {release}
129.. |release_dv_typo3| replace:: {release_dv_typo3}
130.. |release_dv_nc| replace:: {release_dv_nc}
131.. |release_phiki_typo3| replace:: {release_phiki_typo3}
132""".format(
133 author=author,
134 release=release,
135 release_dv_typo3=release_dv_typo3,
136 release_dv_nc=release_dv_nc,
137 release_phiki_typo3=release_phiki_typo3
138)
Chart.js
Source code
.. raw:: html
<script src="../_static/js/chartjs/chart.umd.min.js"></script>
<script src="../_static/js/chartjs/chartjs-plugin-datalabels.min.js"></script>
<script src="../_static/js/chartjs/luxon.min.js"></script>
<script src="../_static/js/chartjs/chartjs-adapter-luxon.umd.min.js"></script>
<script src="../_static/js/chartjs/hammer.min.js"></script>
<script src="../_static/js/chartjs/chartjs-plugin-zoom.min.js"></script>
Weer
Source code
1.. raw:: html
2
3 <!-- weer grafiek -->
4 <div class="chart-container">
5 <div class="chart-inner-container">
6
7 <div class="chart-header">
8 <h4>Weer Historie Rotterdam</h4>
9 <button class="chartjs-fullscreen-btn" title="Fullscreen" aria-label="View diagram in fullscreen" style="opacity: 0.5;">⛶</button>
10 </div>
11
12 <div class="chartjs-canvas">
13 <canvas id="canvastemp"></canvas>
14 </div>
15
16 <small><a href="http://www.buienradar.nl" target="_blank">buienradar.nl</a>
17 <p><small>Inzoomen = scrollen met het muiswiel, Pannen = houd shift ingedrukt en klik met de muis</small></P>
18
19 </div>
20 </div>
21
22 <script src="/_static/js/linegraph.js" defer></script>
Weer Historie Rotterdam
Inzoomen = scrollen met het muiswiel, Pannen = houd shift ingedrukt en klik met de muis
Wiskunde
Kwadratische vergelijkings grafiek
Source code
1.. raw:: html
2
3 <!-- kwadratische vergelijkings grafiek -->
4 <div class="chart-container">
5 <div class="chart-inner-container">
6 <div class="chart-header">
7 <h4>Kwadratische vergelijkings grafiek</h4>
8 <button class="chartjs-fullscreen-btn" title="Full Screen" aria-label="View diagram in fullscreen" style="opacity: 0.5;">⛶</button>
9 </div>
10
11 <div class="chartjs-canvas">
12 <canvas id="myChart"></canvas>
13 </div>
14
15 <div class="input-graph">
16 <label for="a">a: </label>
17 <span id="a-value">2</span>
18 <input id="a" type="range" min="-5" max="5" step="0.1" value="2">
19 <label for="b">b: </label>
20 <span id="b-value">4</span>
21 <input id="b" type="range" min="-20" max="20" step="0.1" value="4">
22 <label for="c">c: </label>
23 <span id="c-value">-50</span>
24 <input id="c" type="range" min="-100" max="100" step="1" value="-50">
25 </div>
26
27 </div>
28 </div>
29
30 <script src="/_static/js/dynamicGraph.js" defer></script>
/_static/js/dynamicGraph.js
1$(function () {
2 $(document).ready(function () {
3
4 // Plugin om dikke nul-assen te tekenen
5 const zeroAxesPlugin = {
6 id: 'zeroAxes',
7 afterDraw(chart) {
8 const { ctx, chartArea: { left, right, top, bottom }, scales: { x, y } } = chart;
9
10 ctx.save();
11 ctx.strokeStyle = '#666';
12 ctx.lineWidth = 1;
13
14 // Horizontale nul-as (y = 0)
15 const yZero = y.getPixelForValue(0);
16 ctx.beginPath();
17 ctx.moveTo(left, yZero);
18 ctx.lineTo(right, yZero);
19 ctx.stroke();
20
21 // Verticale nul-as (x = 0)
22 const xZero = x.getPixelForValue(0);
23 ctx.beginPath();
24 ctx.moveTo(xZero, top);
25 ctx.lineTo(xZero, bottom);
26 ctx.stroke();
27
28 ctx.restore();
29 }
30 };
31
32 chart = new Chart(document.getElementById('myChart'), {
33 type: 'line',
34 data: {
35 datasets: [{
36 label: 'f(x)',
37 type: 'line',
38 fill: false,
39 borderWidth: 2,
40 backgroundColor: "#c96500",
41 borderColor: "#c96500",
42 pointHoverBackgroundColor: "rgba(59, 89, 152, 1)",
43 pointHoverBorderColor: "rgba(59, 89, 152, 1)",
44 pointStyle: 'line',
45 pointRadius: 0,
46 cubicInterpolationMode: 'monotone',
47 data: [],
48 }]
49 },
50 options: {
51 //parsing: false,
52 maintainAspectRatio: false,
53 responsive: true,
54 scales: {
55 x: {
56 min: -20,
57 max: 20,
58 grid: { color: '#eee' },
59 type: 'linear',
60 position: 'bottom'
61 },
62 y: {
63 min: -100,
64 max: 200,
65 grid: { color: '#eee' }
66 }
67 },
68 plugins: {
69 legend: { display: false }
70 }
71 },
72 plugins: [zeroAxesPlugin] // plugin activeren
73 });
74
75 const params = new URLSearchParams({
76 a: 2,
77 b: 4,
78 c: -50
79 });
80
81 fetch(`/_static/php/kwadratische_functie.php?${params}`)
82 .then(response => response.json())
83 .then(data => {
84 chart.data.datasets[0].data = data;
85 chart.update();
86 });
87 updateChart();
88 });
89});
90
91function debounce(func, delay) {
92 let timeoutId;
93
94 return function (...args) {
95 clearTimeout(timeoutId);
96 timeoutId = setTimeout(() => func.apply(this, args), delay);
97 };
98}
99
100const debouncedUpdateChart = debounce(updateChart, 250);
101const mathElement = document.getElementById('math');
102mathElement.style.visibility = 'hidden';
103
104function updateInfo(a, b, c) {
105 const D = b * b - 4 * a * c;
106 const discriminant = fmt(D, 2);
107 const x1 = fmt((-b + Math.sqrt(D)) / (2 * a), 1);
108 const x2 = fmt((-b - Math.sqrt(D)) / (2 * a), 1);
109 const xT = -b / (2 * a);
110 const xTop = fmt(xT, 1);
111 const yTop = fmt(a * xT * xT + b * xT + c, 1);
112
113 const formulas =
114 `\\[
115 \\begin{aligned}
116 f(x) & = ax^2 + bx + c = ${a}x^2 ${b >= 0 ? '+' : '-'} ${Math.abs(b)}x ${c >= 0 ? '+' : '-'} ${Math.abs(c)} \\\\[8pt]
117
118 x_1, x_2 & = \\frac{-b\\pm\\sqrt{b^2 - 4ac}}{2a} \\\\[8pt]
119
120 D & = b^2 - 4ac = ${b}^2 - 4 \\cdot ${a} \\cdot ${c} = ${discriminant} \\\\[8pt]
121
122 x_1 & = \\frac{-b + \\sqrt{D}}{2\\cdot a} = \\frac{-(${b}) + \\sqrt{${discriminant}}}{2\\cdot${a}} =
123 ${x1} \\\\
124 x_2 & = \\frac{-b - \\sqrt{D}}{2\\cdot a} = \\frac{-(${b}) - \\sqrt{${discriminant}}}{2\\cdot${a}} =
125 ${x2} \\\\[8pt]
126
127 x_{\\text{top}} & = \\frac{-b}{2a} = ${xTop} \\\\[4pt]
128 y_{\\text{top}} &= ${yTop} \\\\[8pt]
129 \\end{aligned}
130 \\]`;
131
132 mathElement.innerHTML = formulas;
133
134 document.getElementById('a-value').innerHTML = a;
135 document.getElementById('b-value').innerHTML = b;
136 document.getElementById('c-value').innerHTML = c;
137
138 if (window.MathJax) {
139 MathJax.typesetPromise([mathElement]).then(() => {
140 });
141 }
142}
143
144async function updateChart() {
145 const a = Number(document.getElementById('a').value);
146 const b = Number(document.getElementById('b').value);
147 const c = Number(document.getElementById('c').value);
148
149 const response = await fetch(
150 `/_static/php/kwadratische_functie.php?a=${a}&b=${b}&c=${c}`
151 );
152
153 chart.data.datasets[0].data = await response.json();
154 chart.update();
155 updateInfo(a, b, c);
156}
157
158document.querySelectorAll('input').forEach(input => {
159 input.addEventListener('input', debouncedUpdateChart);
160});
161
162const formatters = {};
163
164function fmt(n, decimals = 1) {
165 if (!formatters[decimals]) {
166 formatters[decimals] = new Intl.NumberFormat(navigator.language, {
167 minimumFractionDigits: 0,
168 maximumFractionDigits: decimals,
169 useGrouping: false
170 });
171 }
172
173 return formatters[decimals].format(n);
174}
175
176MathJax.startup.promise.then(() => {
177 mathElement.style.visibility = 'visible';
178});
.. card:: Berekening actuele waarden
:margin: 2 2 0 0
:shadow: none
.. raw:: html
<div class="math-container"">
<div id="math"></div>
</div>
Admonition
Source code
1.. attention::
2 Information that requires the reader’s attention. The content of the directive should be written in complete sentences and include all appropriate punctuation.
3
4.. caution::
5 Information with regard to which the reader should exercise care. The content of the directive should be written in complete sentences and include all appropriate punctuation.
6
7.. danger::
8 Information which may lead to near and present danger if not heeded. The content of the directive should be written in complete sentences and include all appropriate punctuation.
9
10.. error::
11 Information relating to failure modes of some description. The content of the directive should be written in complete sentences and include all appropriate punctuation.
12
13.. hint::
14 Information that is helpful to the reader. The content of the directive should be written in complete sentences and include all appropriate punctuation.
15
16.. important::
17 Information that is of paramount importance and which the reader must not ignore. The content of the directive should be written in complete sentences and include all appropriate punctuation.
18
19.. note::
20 An especially important bit of information that the reader should know. The content of the directive should be written in complete sentences and include all appropriate punctuation.
21
22.. tip::
23 Some useful tidbit of information for the reader. The content of the directive should be written in complete sentences and include all appropriate punctuation.
24
25.. warning::
26 An important bit of information that the reader should be very aware of. The content of the directive should be written in complete sentences and include all appropriate punctuation.
27
28.. admonition:: Belangrijk
29
30 Dit is een aangepaste admonition.
31 Je kunt hier elke tekst, lijst of codeblok in plaatsen.
32
33.. seealso::
34 Many sections include a list of references to module documentation or external documents. These lists are created using the seealso directive.
Attention
Information that requires the reader’s attention. The content of the directive should be written in complete sentences and include all appropriate punctuation.
Caution
Information with regard to which the reader should exercise care. The content of the directive should be written in complete sentences and include all appropriate punctuation.
Danger
Information which may lead to near and present danger if not heeded. The content of the directive should be written in complete sentences and include all appropriate punctuation.
Error
Information relating to failure modes of some description. The content of the directive should be written in complete sentences and include all appropriate punctuation.
Hint
Information that is helpful to the reader. The content of the directive should be written in complete sentences and include all appropriate punctuation.
Important
Information that is of paramount importance and which the reader must not ignore. The content of the directive should be written in complete sentences and include all appropriate punctuation.
Note
An especially important bit of information that the reader should know. The content of the directive should be written in complete sentences and include all appropriate punctuation.
Tip
Some useful tidbit of information for the reader. The content of the directive should be written in complete sentences and include all appropriate punctuation.
Warning
An important bit of information that the reader should be very aware of. The content of the directive should be written in complete sentences and include all appropriate punctuation.
Belangrijk!
Dit is een aangepaste admonition. Je kunt hier elke tekst, lijst of codeblok in plaatsen.
See also
Many sections include a list of references to module documentation or external documents. These lists are created using the seealso directive.
Source code
.. version-added:: 7.0
The date/time types datetime and timespan have been superseded
by the SQL92-defined types timestamp and interval. Although
there has been some effort to ease the transition by allowing
PostgreSQL to recognize the deprecated type names and translate
them to the new type names, this mechanism cannot be completely
transparent to your existing application.
.. version-changed:: 1.3
Here’s a version changed message.
.. version-deprecated:: 2.5
Here’s a deprecation message.
.. version-removed:: 2.5
Here’s a removed message.
Added in version 7.0: The date/time types datetime and timespan have been superseded by the SQL92-defined types timestamp and interval. Although there has been some effort to ease the transition by allowing PostgreSQL to recognize the deprecated type names and translate them to the new type names, this mechanism cannot be completely transparent to your existing application.
Changed in version 1.3: Here’s a version changed message.
Deprecated since version 2.5: Here’s a deprecation message.
Removed in version 2.5: Here’s a removed message.
Card
Source code
1.. card:: Rspamd installatie
2
3 Installeer eerst de repository.
4
5 - :doc:`/github/index`
6 - :doc:`/typo3/index`
7 - :doc:`Custom title </typo3/index>`
8
9.. grid:: 2
10
11 .. grid-item-card:: Title 1
12
13 Header
14 ^^^
15 Card content
16 +++
17 Footer
18
19 .. grid-item-card:: Title 2
20
21 B
Installeer eerst de repository.
Source code
1.. grid:: 2
2
3 .. grid-item-card:: Title 1
4
5 Header
6 ^^^
7 Card content
8 +++
9 Footer
10
11 .. grid-item-card:: Title 2
12
13 B
14
15.. grid:: 2 3 3 4
16
17 .. grid-item::
18
19 .. card:: Title
20 :img-background: /images/logo_blauw_inverted.jpg
21 :class-card: sd-text-black
22 :img-alt: my text
23
24 Text
25
26 .. grid-item-card:: Title
27 :img-top: /images/logo_blauw_inverted.jpg
28 :img-alt:
29
30 Header
31 ^^^
32 Content
33 +++
34 Footer
35
36 .. grid-item-card:: Title
37 :img-bottom: /images/logo_blauw_inverted.jpg
38
39 Header
40 ^^^
41 Content
42 +++
43 Footer
Header
Card content
B
Header
Content
Header
Content
Code
Source code
This is a normal text paragraph. The next paragraph is a code sample::
It is not processed in any way, except
that the indentation is removed.
It can span multiple lines.
This is a normal text paragraph again.
This is a normal text paragraph. The next paragraph is a code sample:
It is not processed in any way, except
that the indentation is removed.
It can span multiple lines.
This is a normal text paragraph again.
>>> 1 + 1
2
Code-block
Source code
.. code-block:: bash
#!/bin/bash
#
# Weekly maintenance print voor Canon Pro 300
# Met foutdetectie, queue-checks en logging voor cron
#
set -euo pipefail
# Log alles naar stdout/stderr zodat cron het mailt
echo "=== Weekly print gestart: $(date) ==="
#!/bin/bash
#
# Weekly maintenance print voor Canon Pro 300
# Met foutdetectie, queue-checks en logging voor cron
#
set -euo pipefail
# Log alles naar stdout/stderr zodat cron het mailt
echo "=== Weekly print gestart: $(date) ==="
Fontawesome
Source code
1:fa:`laptop`
2:fa:`house-laptop`
3:fa:`laptop-medical`
4:fa:`laptop-file`
5:fa:`laptop-code`
6
7----
8
9:fa:`windows fa-2x`
10:fa:`trash-can fa-6x`
11:fa:`linux fa-4x`
12:fa:`debian fa-6x`
13
14----
15
16:fa:`windows fa-3x fa-fade fa-2x`
17:fa:`linux fa-4x fa-spin fa-4x`
18:fa:`debian fa-2x fa-beat fa-6x`
19
20----
21
22:fa:`check fa-lg`
23:fa:`triangle-exclamation fa-lg`
24:fa:`circle-info fa-lg`
25
26----
27
28:fa:`linux fa-4x fa-rotate-90`
29:fa:`linux fa-4x fa-flip-horizontal`
30:fa:`linux fa-4x`
31
32----
33
34:fa:`camera fa-4x`
35:fa:`photo-film fa-4x`
36:fa:`video fa-4x`
37:far:`image fa-4x`
38:fas:`image fa-4x`
39
40----
41
42:fa:`cloud fa-4x`
43:fa:`nextcloud fa-4x`
44:fa:`cloud-sun-rain fa-4x`
45:fa:`cloud-rain fa-4x`
46:fa:`cloud-showers-heavy fa-4x`
47
48:fa:`nextcloud fa-10x sd-text-primary`
49
50:fa:`nextcloud fa-10x sd-text-info`
51
52:fa:`nextcloud fa-10x text-blue`
53
54
55.. raw:: html
56
57 <i class="fa-solid fa-thumbs-up" aria-hidden="true"></i>
58 <i class="fa fa-car" aria-hidden="true"></i><br><br>
59
60.. raw:: html
61
62 <!-- solid style icon -->
63 <i class="fa-solid fa-angle-double-down"></i>
64 <i class="fa-solid fa-angle-left"></i>
65 <i class="fa-solid fa-angle-right"></i>
66 <i class="fa-solid fa-angle-up"></i>
67
68----
69
70.. raw:: html
71
72 <!-- solid style icon -->
73 <i class="fa-solid fa-user"></i>
74 <i class="fa-regular fa-user"></i>
75 <i class="fa-solid fa-heart"></i>
76 <i class="fa-regular fa-heart"></i>
77
78
79 <!-- brand icon -->
80 <i class="fa-brands fa-github-square"></i>
81 <br>
82
83----
84
85:fas:`angle-double-down`
86:fas:`angle-left`
87:fas:`angle-right`
88:fas:`angle-up`
89:fa:`heart`
90:fa:`check`
91:fa:`check lg`
92:fa:`github`
93
94An icon :fab:`github`, some more text
95
96----
An icon , some more text
Footnotes
Source code
Lorem ipsum [#f1]_ dolor sit amet ... [#f2]_
Headings
Use # to underline 1st level headers.
Use * to underline 2nd level headers.
Use = to underline 3rd level headers.
Use - to underline 4th level headers.
Use ^ to underline 5th level headers.
Use “ to underline 6th level headers.
Inline markup
Source code
The standard reStructuredText inline markup is quite simple: use
one asterisk: *text* for emphasis (italics),
two asterisks: **text** for strong emphasis (boldface), and
backquotes: ``text`` for code samples.
If text is indented, it is treated as a block quotation:
Should array indices start at 0 or 1?
My suggested compromise of 0.5 was rejected without, I thought, proper consideration
-- Stan Kelly-Bootle
The standard reStructuredText inline markup is quite simple: use
one asterisk: text for emphasis (italics),
two asterisks: text for strong emphasis (boldface), and
backquotes: text for code samples.
If text is indented, it is treated as a block quotation:
Should array indices start at 0 or 1? My suggested compromise of 0.5 was rejected without, I thought, proper consideration – Stan Kelly-Bootle
Links
Source code
This is a paragraph that contains `a link`_.
.. _a link: https://domain.invalid/
This is a paragraph that contains a link.
Lists
Source code
* This is a bulleted list.
* It has two items, the second
item uses two lines.
1. This is a numbered list.
2. It has two items too.
#. This is a numbered list.
#. It has two items too.
This is a bulleted list.
It has two items, the second item uses two lines.
This is a numbered list.
It has two items too.
This is a numbered list.
It has two items too.
Math
Source code
1.. math::
2 :name: Fourier transform
3
4 (\mathcal{F}f)(y) & =
5 \frac{1}{\sqrt{2\pi}^{\ n}}
6 \int_{\mathbb{R}^n}
7 f(x)\, e^{-\mathrm{i} y \cdot x} \,\mathrm{d} x. \\
8 \\
9 f(x) & = x^2 + 2xy + y^2
10
11----
12
13.. math::
14 :name: Pythagoras
15
16 a^2 + b^2 & = c^2 \\
17 \\
18 f(x) & = x^2 + 2xy + y^2
19
20----
21
22.. math::
23
24 f(y) & = ax^2 + bx + c \\
25 \\
26 x_1, x_2 & = \frac{-b\pm\sqrt{b^2 - 4ac}}{2a} \\
27 \\
28 x_{\text{top}} & = \frac{-b}{2a}
29
30----
31
32.. math::
33
34 x^2 + 2\frac{b}{2a}x + \left(\frac{b}{2a}\right)^2 &= \left(\frac{b}{2a}\right)^2 - \frac{c}{a}
35
36 x + \left(\frac{b}{2a}\right)^2 &= \left(\frac{b}{2a}\right) - \frac{c}{a}
37
38----
39
40.. math::
41
42 \sqrt{1+\sqrt{1+\sqrt{1+
43 \sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+x}}}}}}} = x \tag4
44
45The ``:name:`` option puts a label on the equation that can be linked to
46by hyperlink references. In this case, you could link back to the previous
47math equation using the `Fourier transform`_ hyperlink reference.
48
49`Pythagoras`_
50
51----
52
53.. math::
54
55 &a\cr &b
56 \\
57
58----
59
60.. math::
61
62
63 A=\left\{\matrix{& x & , & if x\ge0;\cr
64 &-x & , & otherwise.\cr}\right.
65
66----
67
68.. math::
69
70 A=\left(\matrix{x-\lambda&1&0\cr
71 0&x-\lambda&1\cr
72 0&0&x-\lambda\cr}\right)
73
74----
75
76.. math::
77
78 \left\{
79 \begin{array}{rl}
80 \alpha&=f(z)\\ \beta&=f(z^2)\\ \gamma&=f(z^3)
81 \end{array}
82 \right\}\qquad\left\{
83 \begin{array}{rl}
84 x&=\alpha^2-\beta\\ y&=2\gamma
85 \end{array}
86 \right\}.
87
88----
89
90.. math::
91
92(x+y)(x-y)&=x^2-xy+xy-y^2 \\
93 &=x^2-y^2 \\
94(x+y)^2 &=x^2+2xy+y^2
95
96----
97
98.. math::
99
100 &\kappa = \begin{cases}
101 0, & \text{if censored} \\
102 1, & \text{if not censored} \\
103 2, & \text{if censored} \\
104 3, & \text{if not censored} \\
105 4, & \text{if censored} \\
106 5, & \text{if not censored} \\
107 6, & \text{bla bla bla}
108 \end{cases}
109 \\
110 \\
111 &M=
112 \left[ {\begin{array}{cc}
113 1 & 2 \\
114 3 & 4 \\
115 \end{array} } \right]
116
117----
The :name: option puts a label on the equation that can be linked to
by hyperlink references. In this case, you could link back to the previous
math equation using the Fourier transform hyperlink reference.
Mermaid
chart
Source code
1.. mermaid::
2
3 xychart-beta
4 title "Monthly sales"
5 x-axis [Jan, Feb, Mar, Apr]
6 y-axis "Sales" 0 --> 100
7 bar [20, 35, 60, 85]
8
9.. mermaid::
10
11 xychart-beta
12 title "Monthly sales"
13 x-axis [Jan, Feb, Mar, Apr, May]
14 y-axis "Sales" 0 --> 100
15 bar [20, 35, 60, 85]
16 bar [10, 15, 30, 45]
17
18.. mermaid::
19
20 xychart-beta
21 title "Omzet per Maand"
22 x-axis [jan, feb, mar, apr, mei, jun]
23 y-axis "Omzet (in €)" 0 --> 12000
24 bar [5000, 6000, 7500, 8200, 9500, 10500]
25 line [5000, 6000, 7500, 8200, 9500, 10500]
flowchart
Source code
.. mermaid::
flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
---
config:
theme: 'base'
themeVariables:
primaryColor: '#DBE2EF80'
primaryTextColor: '#000'
primaryBorderColor: '#3F72AF80'
lineColor: '#3F72AF80'
secondaryColor: '#fff'
tertiaryColor: '#ffff80'
---
flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[fa:fa-laptop Laptop]
C -->|Two| E[fa:fa-phone-square iPhone]
C -->|Three| F[fa:fa-car Car]
Gannt
Source code
.. mermaid::
gantt
title Product Launch Plan
dateFormat YYYY-MM-DD
section Planning
Market research :done, research, 2024-03-01, 10d
Define requirements :done, reqs, after research, 7d
section Build
Design prototype :active, proto, after reqs, 14d
User testing :testing, after proto, 7d
section Launch
Marketing campaign :marketing, after proto, 14d
Release day :milestone, after testing, 0d
---
config:
theme: 'base'
themeVariables:
primaryColor: '#DBE2EF80'
primaryTextColor: '#000'
primaryBorderColor: '#3F72AF80'
lineColor: '#3F72AF80'
secondaryColor: '#fff'
tertiaryColor: '#ffff80'
---
gantt
title Product Launch Plan
dateFormat YYYY-MM-DD
section Planning
Market research :done, research, 2024-03-01, 10d
Define requirements :done, reqs, after research, 7d
section Build
Design prototype :active, proto, after reqs, 14d
User testing :testing, after proto, 7d
section Launch
Marketing campaign :marketing, after proto, 14d
Release day :milestone, after testing, 0d
section Planning
Market research :done, research, 2024-03-01, 10d
Define requirements :done, reqs, after research, 7d
section Build
Design prototype :active, proto, after reqs, 14d
User testing :testing, after proto, 7d
section Launch
Marketing campaign :marketing, after proto, 14d
Release day :milestone, after testing, 0d
sequenceDiagram
Source code
.. mermaid::
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop HealthCheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
---
config:
theme: 'base'
themeVariables:
primaryColor: '#DBE2EF80'
primaryTextColor: '#000'
primaryBorderColor: '#3F72AF80'
lineColor: '#3F72AF80'
secondaryColor: '#fff'
tertiaryColor: '#ffff80'
---
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop HealthCheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
stateDiagram
Source code
1.. mermaid::
2
3 ---
4 title: PackML State Diagram to IEC 61131-3
5 config:
6 theme: 'base'
7 themeVariables:
8 primaryColor: '#DBE2EF80'
9 primaryTextColor: '#000'
10 primaryBorderColor: '#3F72AF80'
11 lineColor: '#3F72AF80'
12 secondaryColor: '#fff'
13 tertiaryColor: '#ffff80'
14 ---
15
16 stateDiagram-v2
17 direction LR
18 classDef waitState fill:#3F72AF80,color:white,font-weight:bold
19 class waitingState, Idle, Held, Suspended, Complete, Stopped, Aborted waitState
20
21 state Operating {
22
23 Idle --> Starting : Start
24
25 Starting --> Execute : SC
26
27 Execute --> Holding : Hold
28 Holding --> Held : SC
29 Held --> UnHolding : UnHold
30 UnHolding --> Execute : SC
31
32 Execute --> Suspending : Suspend
33 Suspending --> Suspended : SC
34 Suspended --> UnSuspending : UnSuspend
35 UnSuspending --> Execute : SC
36
37 Execute --> Completing : SC
38 Completing --> Complete : SC
39 Complete --> Resetting : Reset
40 Resetting --> Idle : SC
41
42 }
43
44 Operating --> Stopping : Stop
45 Stopping --> Stopped : SC
46
47 Operating --> Aborting : Abort
48 Aborting --> Aborted : SC
49 Aborted --> Clearing : Clear
50 Clearing --> Stopped : SC
51
52 Stopped --> Resetting : Reset
53
54 Note left of Aborting: SC = State Complete
55 activeState : Active State
56 waitingState : Waiting State
---
title: PackML State Diagram to IEC 61131-3
config:
theme: 'base'
themeVariables:
primaryColor: '#DBE2EF80'
primaryTextColor: '#000'
primaryBorderColor: '#3F72AF80'
lineColor: '#3F72AF80'
secondaryColor: '#fff'
tertiaryColor: '#ffff80'
---
stateDiagram-v2
direction LR
classDef waitState fill:#3F72AF80,color:white,font-weight:bold
class waitingState, Idle, Held, Suspended, Complete, Stopped, Aborted waitState
state Operating {
Idle --> Starting : Start
Starting --> Execute : SC
Execute --> Holding : Hold
Holding --> Held : SC
Held --> UnHolding : UnHold
UnHolding --> Execute : SC
Execute --> Suspending : Suspend
Suspending --> Suspended : SC
Suspended --> UnSuspending : UnSuspend
UnSuspending --> Execute : SC
Execute --> Completing : SC
Completing --> Complete : SC
Complete --> Resetting : Reset
Resetting --> Idle : SC
}
Operating --> Stopping : Stop
Stopping --> Stopped : SC
Operating --> Aborting : Abort
Aborting --> Aborted : SC
Aborted --> Clearing : Clear
Clearing --> Stopped : SC
Stopped --> Resetting : Reset
Note left of Aborting: SC = State Complete
activeState : Active State
waitingState : Waiting State
Nested lists
Source code
1. fruits
* apple
* banana
2. vegetables
* carrot
* broccoli
fruits
apple
banana
vegetables
carrot
broccoli
References
Source code
See :cite:t:`1906:langstraat` for an introduction to non-standard analysis.
Non-standard analysis is fun :cite:p:`1906:langstraat`.
See :cite:t:`1987:nelson` for an introduction to non-standard analysis.
Non-standard analysis is fun :cite:p:`1987:nelson`.
See :cite:t:`2006:xlangstraat` for an introduction to non-standard analysis.
Non-standard analysis is fun :cite:p:`2006:xlangstraat`.
1// refs.bib
2
3@Book{1987:nelson,
4 author = {Edward Nelson},
5 title = {Radically Elementary Probability Theory},
6 publisher = {Princeton University Press},
7 year = {1987}
8}
9
10@Book{2006:xlangstraat,
11 author = {Theo Langstraat and Edward Nelson},
12 title = {Getting started with sphinxcontrib-bibtex},
13 publisher = {Langstraat Online},
14 year = {2006}
15}
16
17@article{1906:langstraat,
18 author = {Einstein, A. and Podolsky, B. and Rosen, N.},
19 title = {Can Quantum-Mechanical Description of Physical Reality Be Considered Complete?},
20 journal = {Physical Review},
21 year = {1906},
22 volume = {47},
23 number = {10},
24 pages = {777--780},
25 doi = {10.1103/PhysRev.47.777}
26}
See Einstein et al. [EPR06] for an introduction to non-standard analysis. Non-standard analysis is fun [EPR06].
See Nelson [Nel87] for an introduction to non-standard analysis. Non-standard analysis is fun [Nel87].
See Langstraat and Nelson [LN06] for an introduction to non-standard analysis. Non-standard analysis is fun [LN06].
Role
Source code
.. role:: python(code)
:language: python
In Python, :python:`1 + 2` is equal to :python:`3`.
In Python, 1 + 2 is equal to 3.
Tables
Source code
1+------------------------+------------+----------+----------+
2| Header row, column 1 | Header 2 | Header 3 | Header 4 |
3| (header rows optional) | | | |
4+========================+============+==========+==========+
5| body row 1, column 1 | column 2 | column 3 | column 4 |
6+------------------------+------------+----------+----------+
7| body row 2 | ... | ... | |
8+------------------------+------------+----------+----------+
9
10===== ===== =======
11A B A and B
12===== ===== =======
13False False False
14True False False
15False True False
16True True True
17===== ===== =======
18
19.. list-table:: Available languages and bible translations
20 :class: longtable
21 :header-rows: 1
22 :widths: 15 50
23
24 * - Language
25 - Bible translation
26 * - English
27 - | - English Standard Version
28 | - King James Version
29 | - New American Standard Bible 2020
30 | - New Catholic Bible
31 | - New International Version
32 | - New King James Version
33 | - New Living Translation
34 | - New Revised Standard Version
35 | - World English Bible
36 * - Spanish (Español)
37 - | - La Biblia de las Américas
38 | - Nueva Versión Internacional
39 | - ReinaValera 1960
40 | - ReinaValera 1995
41 * - Portuguese (Português)
42 - | - Almeida Revista e Atualizada
43 | - Almeida Revista e Corrigida
44 | - Nova Versão Internacional
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 |
… |
… |
A |
B |
A and B |
|---|---|---|
False |
False |
False |
True |
False |
False |
False |
True |
False |
True |
True |
True |
Language |
Bible translation |
|---|---|
English |
- English Standard Version
- King James Version
- New American Standard Bible 2020
- New Catholic Bible
- New International Version
- New King James Version
- New Living Translation
- New Revised Standard Version
- World English Bible
|
Spanish (Español) |
- La Biblia de las Américas
- Nueva Versión Internacional
- ReinaValera 1960
- ReinaValera 1995
|
Portuguese (Português) |
- Almeida Revista e Atualizada
- Almeida Revista e Corrigida
- Nova Versão Internacional
|
Tabs
Source code
.. tab-set::
.. tab-item:: Debian
apt install rspamd
.. tab-item:: Ubuntu
apt install rspamd # ubuntu
apt install rspamd
apt install rspamd # ubuntu
Terms
Source code
term (up to a line of text)
Definition of the term, which must be indented
and can even consist of multiple paragraphs
next term
Description.
- term (up to a line of text)
Definition of the term, which must be indented
and can even consist of multiple paragraphs
- next term
Description.
Footnotes
Source code
.. rubric:: Footnotes
.. [#f1] Text of the first footnote.
.. [#f2] Text of the second footnote.
Footnotes