comparison docs/intro.rst @ 150:4acf578ae93f

Much more details in the documentation
author Franz Glasner <fzglas.hg@dom66.de>
date Thu, 07 May 2026 16:06:59 +0200
parents df9b4962c203
children 4a8c122725b0
comparison
equal deleted inserted replaced
149:380d2607d5c7 150:4acf578ae93f
24 24
25 \PROGRAM {The Pseudoprogram} \IS 25 \PROGRAM {The Pseudoprogram} \IS
26 26
27 \END PROGRAM {The Pseudoprogram} 27 \END PROGRAM {The Pseudoprogram}
28 28
29 And the same with the german variant: 29 And the same with the german variant
30 (using ``.. code-block:: algpseudocode-de`` as language alias):
30 31
31 .. code-block:: algpseudocode-de 32 .. code-block:: algpseudocode-de
32 33
33 \PROGRAM {The Pseudoprogram} \IS 34 \PROGRAM {The Pseudoprogram} \IS
34 35
35 \END PROGRAM {The Pseudoprogram} 36 \END PROGRAM {The Pseudoprogram}
36 37
37 Expressions: 38 A basic documentation for FrPseudocode you find on its
39 :ref:`detail page <fr-pseudocode>`.
38 40
39 - Strings (single-quote, double-quote, triple-single-quote, triple-double-quote) 41 The AlgPseudocode lexer and its friends AlgPseudocodeDE and AlgPseudocodeFR
40 - Numbers (Python style) 42 basically work in three states: `default`, `expression` and `text`.
41 - ``\TEXT{...}``
42 43
43 The curly brace can be quoted with ``\}`` to not end the text mode 44 In expressions it automatically recognizes:
44 45
45 - Names (`Name.Entity`) 46 - Strings (single-quote, double-quote, triple-single-quote,
47 triple-double-quote, `Python`_ style)
48 - Numbers (also `Python`_ style)
49 - (Mathematical) operators and symbols
50 - ``\TEXT{...}``
51
52 To switch in a text-mode that prohibits automatic expression
53 highlighting.
54
55 A closing curly brace can be quoted with ``\}`` to not end the
56 text mode prematurely.
57
58 - ``\NAME``, ``\CALL`` and ``\GETS``
59
60 - ``\REM`` and ``\REMARK`` for remarks (aka comments)
61
62 - Names (`Name.Entity`)
63
64 - :ref:`explicit-token-types`
65
66 In the default-mode it recogzizes expressions and additionally all
67 sorts of comments and commands that are inspired by CTAN's
68 `Algpseudocodex`_.
69
70 In texts it recogzizes:
71
72 - ``\EXPR`` or ``\EXPRESSION``
73
74 To switch to expression-mode.
75
76 A closing curly brace can be quoted with ``\}`` to not end the expression
77 mode prematurely.
78
79 - ``\REM`` and ``\REMARK`` for remarks (aka comments)
80
81 - :ref:`explicit-token-types`
82
83
84 .. rubric:: Some Examples
85
86 A synthetic example with most features:
46 87
47 .. literalinclude:: example-1.pseudocode 88 .. literalinclude:: example-1.pseudocode
48 :language: algpseudocode 89 :language: algpseudocode
49 :lines: 2- 90 :lines: 2-
50 91