comparison docs/lexer-algpseudocode.rst @ 187:418846a2623c

Also link to exampled from the PDF properly
author Franz Glasner <fzglas.hg@dom66.de>
date Tue, 12 May 2026 21:07:42 +0200
parents 95754197f5b3
children 156bcd310596
comparison
equal deleted inserted replaced
186:95754197f5b3 187:418846a2623c
538 538
539 539
540 Some Examples 540 Some Examples
541 ============= 541 =============
542 542
543 A synthetic example with many features 543 A synthetic example with many features.
544 (its source code is in :download:`examples/example-1.pseudocode`): 544
545 .. only:: builder_html
546
547 Its source code is in :download:`examples/example-1.pseudocode`.
548
549 .. raw:: latex
550
551 Its source code can be found at \url{example-1.pseudocode}.
545 552
546 .. literalinclude:: examples/example-1.pseudocode 553 .. literalinclude:: examples/example-1.pseudocode
547 :language: algpseudocode 554 :language: algpseudocode
548 :lines: 2- 555 :lines: 2-
549 556
554 :language: NoEndAlgPseudocode 561 :language: NoEndAlgPseudocode
555 :lines: 2- 562 :lines: 2-
556 563
557 The second example is Wikipedia's description of *Dinic's Algorithm* 564 The second example is Wikipedia's description of *Dinic's Algorithm*
558 (see https://en.wikipedia.org/wiki/Dinic%27s_algorithm). 565 (see https://en.wikipedia.org/wiki/Dinic%27s_algorithm).
559 Its source code is in :download:`examples/algorithm-dinic.description`: 566
560 567 .. only:: builder_html
561 .. literalinclude:: examples/algorithm-dinic.description 568
569 Its source code is in :download:`examples/algorithm-dinic.pseudocode`.
570
571 .. raw:: latex
572
573 Its source code can be found at \url{algorithm-dinic.pseudocode}
574
575 .. literalinclude:: examples/algorithm-dinic.pseudocode
562 :language: algpseudocode 576 :language: algpseudocode
563 :lines: 2- 577 :lines: 2-
564 578
565 The third example is Wikipedia's pseudocode of the *Ford–Fulkerson Algorithm* 579 The third example is Wikipedia's pseudocode of the *Ford–Fulkerson Algorithm*
566 (see https://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algorithm). 580 (see https://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algorithm).
567 Its source code is in :download:`examples/algorithm-ford-fulkerson.pseudocode`: 581
582 .. only:: builder_html
583
584 Its source code is in
585 :download:`examples/algorithm-ford-fulkerson.pseudocode`.
586
587 .. raw:: latex
588
589 Its source code can be found at \url{algorithm-ford-fulkerson.pseudocode}.
568 590
569 .. literalinclude:: examples/algorithm-ford-fulkerson.pseudocode 591 .. literalinclude:: examples/algorithm-ford-fulkerson.pseudocode
570 :language: algpseudocode 592 :language: algpseudocode
571 :lines: 2- 593 :lines: 2-
572 594
573 The fourth example is Wikipedia's pseudocode of the *Edmonds–Karp Algorithm* 595 The fourth example is Wikipedia's pseudocode of the *Edmonds–Karp Algorithm*
574 (see https://en.wikipedia.org/wiki/Edmonds%E2%80%93Karp_algorithm) 596 (see https://en.wikipedia.org/wiki/Edmonds%E2%80%93Karp_algorithm)
575 with a custom lexer that skip all ``ENDxxx`` keywords. 597 with a custom lexer that skip all ``ENDxxx`` keywords.
576 Its source code is in :download:`examples/algorithm-edmonds-karp.pseudocode`: 598
599 .. only:: builder_html
600
601 Its source code is in
602 :download:`examples/algorithm-edmonds-karp.pseudocode`.
603
604 .. raw:: latex
605
606 Its source code can be found at \url{algorithm-edmonds-karp.pseudocode}.
577 607
578 .. literalinclude:: examples/algorithm-edmonds-karp.pseudocode 608 .. literalinclude:: examples/algorithm-edmonds-karp.pseudocode
579 :language: NoEndAlgPseudocode 609 :language: NoEndAlgPseudocode
580 :lines: 2- 610 :lines: 2-
581 611