# HG changeset patch # User Franz Glasner # Date 1778610167 -7200 # Node ID 95754197f5b3e65d94b8d49b77e5e8ee97bb6413 # Parent b27557f6d3934d4d6a94c5354c3fcd197c941d3f Link to some source code of example pseudocode files diff -r b27557f6d393 -r 95754197f5b3 docs/conf.py --- a/docs/conf.py Tue May 12 19:43:48 2026 +0200 +++ b/docs/conf.py Tue May 12 20:22:47 2026 +0200 @@ -127,7 +127,7 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output html_static_path = ['_static'] -html_extra_path = ['../LICENSES', './examples'] +html_extra_path = ['../LICENSES'] html_copy_source = False html_show_sourcelink = False diff -r b27557f6d393 -r 95754197f5b3 docs/lexer-algpseudocode.rst --- 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