03_test_environment.ini 2.53 KB
Newer Older
Eckhart Arnold's avatar
Eckhart Arnold committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[match:block_environment]
1 : """\begin{generic}
    A generic block element is a block element
    that is unknown to DHParser.

    Unknown begin-end-structures are always
    considered as block elements and not
    as inline elements.
    \end{generic}
    """

2 : """\begin{generic}
    a single block paragraph
    \end{generic} % ending with
    % a comment
    """

3 : \begin{quote}
    a known block element
    \end{quote}


[fail:block_environment]
Eckhart Arnold's avatar
Eckhart Arnold committed
24
25
1 : """\begin{generic}inline environment\end{generic}
    """
Eckhart Arnold's avatar
Eckhart Arnold committed
26
27
28
29
30
31
32
33
34
35
36

2 : """\begin{generic}inline environment
    \end{generic}
    """

3 : """\begin{generic}
    invalid enivronment \end{generic}
    """


[match:inline_environment]
Eckhart Arnold's avatar
Eckhart Arnold committed
37
1 : """\begin{generic}inline environment\end{generic}"""
Eckhart Arnold's avatar
Eckhart Arnold committed
38
39

2 : """\begin{generic}inline environment
Eckhart Arnold's avatar
Eckhart Arnold committed
40
    \end{generic}"""
Eckhart Arnold's avatar
Eckhart Arnold committed
41
42
43

3 : "$ inline math $"

Eckhart Arnold's avatar
Eckhart Arnold committed
44

Eckhart Arnold's avatar
Eckhart Arnold committed
45
46
47
48
49
[fail:inline_environment]
3 : """\begin{generic}
    invalid enivronment \end{generic}
    """

Eckhart Arnold's avatar
Eckhart Arnold committed
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
[match:itemize]
1 : \begin{itemize}
    \item Items doe not need to be
    \item separated by empty lines.
    \end{itemize}

2 : \begin{itemize}

    \item But items may be

    \item separated by blank lines.

    \item

    Empty lines at the beginning of an item will be ignored.

    \end{itemize}

3 : \begin{itemize}
    \item Items can consist of

          several paragraphs.
    \item Or of one paragraph
    \end{itemize}

4 : \begin{itemize}
    \item
      \begin{itemize}
        \item Item-lists can be nested!
      \end{itemize}
    \end{itemize}

82
83
84
5 : \begin{itemize}
    \item Item-lists may consist of just one item.
    \end{itemize}
Eckhart Arnold's avatar
Eckhart Arnold committed
85
86
87
88
89
90
91
92
93
94
95
96
97

[fail:itemize]
1 : \begin{itemize}
    Free text is not allowed within an itemized environment!
    \end{itemize}


[match:enumerate]
1 : \begin{enumerate}
    \item Enumerations work just like item-lists.
    \item Only that the bullets are numbers.
    \end{enumerate}

Eckhart Arnold's avatar
Eckhart Arnold committed
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
2 : \begin{enumerate}
    \item \begin{itemize}
          \item Item-lists and
          \item Enumeration-lists
             \begin{enumerate}
                \item can be nested
                \item arbitrarily
             \end{enumerate}
          \item Another item
          \end{itemize}
    \item Plain numerated item.
    \end{enumerate}

3 : \begin{enumerate} % comment


    % more comments and paragraph separators
    % yet some more


    \item %another comment
          finally, the first item


    % comment


    \end{enumerate}

4 : \begin{enumerate}
    \item An item

          \begin{itemize}
          \item with an enumeration
          \end{itemize}
         as a separate paragraph
    \end{enumerate}