diff docs/lexer-algpseudocode.rst @ 186:95754197f5b3

Link to some source code of example pseudocode files
author Franz Glasner <fzglas.hg@dom66.de>
date Tue, 12 May 2026 20:22:47 +0200
parents ad80fcbf7b47
children 418846a2623c
line wrap: on
line diff
--- a/docs/lexer-algpseudocode.rst	Tue May 12 19:43:48 2026 +0200
+++ b/docs/lexer-algpseudocode.rst	Tue May 12 20:22:47 2026 +0200
@@ -9,7 +9,8 @@
 They recogzize expressions and additionally all sorts of comments and
 commands that are inspired by `Algpseudocodex`_.
 
-They may be used in `Sphinx`_ by their aliases:
+They may be used in `Sphinx`_ by their aliases.
+The code-block:
 
 .. code-block:: none
 
@@ -19,7 +20,7 @@
 
       \END PROGRAM {The Pseudoprogram}
 
-It will be rendered as:
+will be rendered as:
 
 .. code-block:: algpseudocode
 
@@ -27,7 +28,7 @@
 
    \END PROGRAM {The Pseudoprogram}
 
-And the same with the german variant
+And the same code-block with the german variant
 (using ``.. code-block:: algpseudocode-de`` as language alias):
 
 .. code-block:: algpseudocode-de
@@ -539,7 +540,8 @@
 Some Examples
 =============
 
-A synthetic example with many features:
+A synthetic example with many features
+(its source code is in :download:`examples/example-1.pseudocode`):
 
 .. literalinclude:: examples/example-1.pseudocode
    :language: algpseudocode
@@ -552,35 +554,38 @@
    :language: NoEndAlgPseudocode
    :lines: 2-
 
-This is Wikipedia's description of *Dinic's Algorithm*
-(see https://en.wikipedia.org/wiki/Dinic%27s_algorithm):
+The second example is Wikipedia's description of *Dinic's Algorithm*
+(see https://en.wikipedia.org/wiki/Dinic%27s_algorithm).
+Its source code is in :download:`examples/algorithm-dinic.description`:
 
 .. literalinclude:: examples/algorithm-dinic.description
    :language: algpseudocode
    :lines: 2-
 
-This is Wikipedia's pseudocode of the *Ford–Fulkerson Algorithm*
-(see https://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algorithm):
+The third example is Wikipedia's pseudocode of the *Ford–Fulkerson Algorithm*
+(see https://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algorithm).
+Its source code is in :download:`examples/algorithm-ford-fulkerson.pseudocode`:
 
 .. literalinclude:: examples/algorithm-ford-fulkerson.pseudocode
    :language: algpseudocode
    :lines: 2-
 
-This is Wikipedia's pseudocode of the *Edmonds–Karp Algorithm*
+The fourth example is Wikipedia's pseudocode of the *Edmonds–Karp Algorithm*
 (see https://en.wikipedia.org/wiki/Edmonds%E2%80%93Karp_algorithm)
-with a custom lexer that skip all ``ENDxxx`` keywords:
+with a custom lexer that skip all ``ENDxxx`` keywords.
+Its source code is in :download:`examples/algorithm-edmonds-karp.pseudocode`:
 
 .. literalinclude:: examples/algorithm-edmonds-karp.pseudocode
    :language: NoEndAlgPseudocode
    :lines: 2-
 
-And now the *Edmonds–Karp Algorithm* with french keywords:
+And now the *Edmonds–Karp Algorithm* with **french** keywords:
 
 .. literalinclude:: examples/algorithm-edmonds-karp.pseudocode
    :language: algpseudocode-fr
    :lines: 2-
 
-And again the *Edmonds–Karp Algorithm* with german keywords:
+And again the *Edmonds–Karp Algorithm* with **german** keywords:
 
 .. literalinclude:: examples/algorithm-edmonds-karp.pseudocode
    :language: algpseudocode-de