comparison docs/index.rst @ 140:e424fcdd472f

REFACTOR: Change the structure of the documentation: make the README the first page. Make the old "index" an intro.
author Franz Glasner <fzglas.hg@dom66.de>
date Thu, 07 May 2026 10:03:32 +0200
parents 69283c05ba48
children bff8b900713a
comparison
equal deleted inserted replaced
139:d8ac51cba0ff 140:e424fcdd472f
6 6
7 .. toctree:: 7 .. toctree::
8 :maxdepth: 2 8 :maxdepth: 2
9 :caption: Contents: 9 :caption: Contents:
10 10
11 readme 11 intro
12 details 12 details
13
14
15 The package contains the following lexers:
16
17 .. list-table::
18 :align: left
19 :header-rows: 1
20
21 * - Language Name
22 - Description
23 - Extension(s)
24 - Aliases / Short Name(s)
25 - Lexer Class
26
27 * - AlgPseudocode
28 - Pseudocode lexer heavily inspired by CTAN's "Algpseudocodex"
29 - \*.algpseudocode, \*.algpseudo
30 - algpseudocode, algpseudo
31 - AlgPseudocodeLexer
32
33 * - AlgPseudocodeFR
34 - AlgPseudocode with french keyword expansion
35 - \*.algpseudo-fr, \*.algpseudocode-fr
36 - algpseudocode-fr, algpseudo-fr
37 - AlgPseudocodeLexer_FR
38
39 * - AlgPseudocodeDE
40 - AlgPseudocode with german keyword expansion
41 - \*.algpseudo-de, \*.algpseudocode-de
42 - algpseudocode-de, algpseudo-de
43 - AlgPseudocodeLexer_DE
44
45 * - FrPseudocode
46 - The original lexer (slightly changed) from `pygments-lexer-pseudocode`
47 - \*.fr-algo, \*.fr-pseudocode
48 - fr-pseudocode, fr-pseudo, fr-algorithm, fr-algo
49 - FrPseudocodeLexer
50
51 To be used in Sphinx like this:
52
53 .. code-block:: none
54
55 .. code-block:: algpseudocode
56
57 \PROGRAM {The Pseudoprogram} \IS
58
59 \END PROGRAM {The Pseudoprogram}
60
61 it will be rendered as:
62
63 .. code-block:: algpseudocode
64
65 \PROGRAM {The Pseudoprogram} \IS
66
67 \END PROGRAM {The Pseudoprogram}
68
69 And the same with the german variant:
70
71 .. code-block:: algpseudocode-de
72
73 \PROGRAM {The Pseudoprogram} \IS
74
75 \END PROGRAM {The Pseudoprogram}
76
77 Expressions:
78
79 - Strings (single-quote, double-quote, triple-single-quote, triple-double-quote)
80 - Numbers (Python style)
81 - ``\TEXT{...}``
82
83 The curly brace can be quoted with ``\}`` to not end the text mode
84
85 - Names (`Name.Entity`)
86
87 .. literalinclude:: example-1.pseudocode
88 :language: algpseudocode
89 :lines: 2-
90
91 With a customized `AlgPseudocodeLexer` and its `no_end`
92 option set to ``True``.
93
94 .. literalinclude:: example-1.pseudocode
95 :language: NoEndAlgPseudocode
96 :lines: 2-
97
98 Python:
99
100 .. code-block:: python
101
102 class HUHU:
103
104 # This is a comment
105 @classmethod
106 def method1(cls_, aparam1, param2):
107 return aparam1 + param2
108
109
110 This is Wikipedia's description of *Dinic's Algorithm*
111 (see https://en.wikipedia.org/wiki/Dinic%27s_algorithm):
112
113 .. literalinclude:: algorithm-dinic.description
114 :language: algpseudocode
115 :lines: 2-
116
117 This is Wikipedia's pseudocode of the *Ford–Fulkerson Algorithm*
118 (see https://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algorithm):
119
120 .. literalinclude:: algorithm-ford-fulkerson.pseudocode
121 :language: algpseudocode
122 :lines: 2-
123
124 This is Wikipedia's pseudocode of the *Edmonds–Karp Algorithm*
125 (see https://en.wikipedia.org/wiki/Edmonds%E2%80%93Karp_algorithm):
126
127 .. literalinclude:: algorithm-edmonds-karp.pseudocode
128 :language: NoEndAlgPseudocode
129 :lines: 2-
130
131 And now the *Edmonds–Karp Algorithm* with french keywords:
132
133 .. literalinclude:: algorithm-edmonds-karp.pseudocode
134 :language: algpseudocode-fr
135 :lines: 2-
136
137
138 Indices and tables
139 ==================
140 13
141 .. * :ref:`genindex` 14 .. * :ref:`genindex`
142 .. * :ref:`modindex` 15 .. * :ref:`modindex`
143 16
144 * :ref:`search` 17 * :ref:`search`
18
19 .. include:: ../README.rst
20 :start-line: 5