summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-para.rng
blob: 5b54f77ddfea9e484e2e33e327e4ee33225f6297 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
<?xml version="1.0" encoding="UTF-8"?>
<!--
  /=====================================================================\ 
  |  LaTeXML-para.rnc                                                   |
  | RelaxNG model for LaTeXML generated documents                       |
  |=====================================================================|
  | Part of LaTeXML:                                                    |
  |  Public domain software, produced as part of work done by the       |
  |  United States Government & not subject to copyright in the US.     |
  |=====================================================================|
  | Bruce Miller <bruce.miller@nist.gov>                        #_#     |
  | http://dlmf.nist.gov/LaTeXML/                              (o o)    |
  \=========================================================ooo==U==ooo=/
-->
<grammar ns="http://dlmf.nist.gov/LaTeXML" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
  <define name="Para.class" combine="interleave">
    <a:documentation>This module defines the following `logical' block elements.</a:documentation>
    <interleave>
      <zeroOrMore>
        <ref name="para"/>
      </zeroOrMore>
      <zeroOrMore>
        <ref name="theorem"/>
      </zeroOrMore>
      <zeroOrMore>
        <ref name="proof"/>
      </zeroOrMore>
      <zeroOrMore>
        <ref name="figure"/>
      </zeroOrMore>
      <zeroOrMore>
        <ref name="table"/>
      </zeroOrMore>
      <zeroOrMore>
        <ref name="float"/>
      </zeroOrMore>
      <zeroOrMore>
        <ref name="listing"/>
      </zeroOrMore>
    </interleave>
  </define>
  <define name="Misc.class" combine="interleave">
    <a:documentation>Additionally, it defines these miscellaneous elements that can appear
in both inline and block contexts.</a:documentation>
    <zeroOrMore>
      <ref name="inline-para"/>
    </zeroOrMore>
  </define>
  <!-- ====================================================================== -->
  <define name="para">
    <element name="para">
      <a:documentation>A Logical paragraph. It has an \attr{id}, but not a \attr{label}.</a:documentation>
      <interleave>
        <ref name="para_attributes"/>
        <ref name="para_model"/>
      </interleave>
    </element>
  </define>
  <define name="para_attributes">
    <a:documentation>Attributes for \elementref{para}.</a:documentation>
    <interleave>
      <ref name="Common.attributes"/>
      <ref name="ID.attributes"/>
    </interleave>
  </define>
  <define name="para_model">
    <a:documentation>Content model for \elementref{para}.</a:documentation>
    <ref name="Block.model"/>
  </define>
  <!-- ====================================================================== -->
  <define name="inline-para">
    <element name="inline-para">
      <a:documentation>An inline para. Actually, can appear in inline or block mode, but
typesets its contents as para.</a:documentation>
      <interleave>
        <ref name="inline-para_attributes"/>
        <ref name="inline-para_model"/>
      </interleave>
    </element>
  </define>
  <define name="inline-para_attributes">
    <a:documentation>Attributes for \elementref{inline-para}.</a:documentation>
    <interleave>
      <ref name="Common.attributes"/>
      <ref name="Positionable.attributes"/>
    </interleave>
  </define>
  <define name="inline-para_model">
    <a:documentation>Content model for \elementref{inline-para}.</a:documentation>
    <ref name="Para.model"/>
  </define>
  <!-- ====================================================================== -->
  <define name="theorem">
    <element name="theorem">
      <a:documentation>A theorem or similar object. The \attr{class} attribute can be used to distinguish
different kinds of theorem.</a:documentation>
      <interleave>
        <ref name="theorem_attributes"/>
        <ref name="theorem_model"/>
      </interleave>
    </element>
  </define>
  <define name="theorem_attributes">
    <a:documentation>Attributes for \elementref{theorem}.</a:documentation>
    <interleave>
      <ref name="Common.attributes"/>
      <ref name="Labelled.attributes"/>
    </interleave>
  </define>
  <define name="theorem_model">
    <a:documentation>Content model for \elementref{theorem}.</a:documentation>
    <interleave>
      <optional>
        <ref name="title"/>
      </optional>
      <ref name="Para.model"/>
    </interleave>
  </define>
  <!-- ====================================================================== -->
  <define name="proof">
    <element name="proof">
      <a:documentation>A proof or similar object. The \attr{class} attribute can be used to distinguish
different kinds of proof.</a:documentation>
      <interleave>
        <ref name="proof_attributes"/>
        <ref name="proof_model"/>
      </interleave>
    </element>
  </define>
  <define name="proof_attributes">
    <a:documentation>Attributes for \elementref{proof}.</a:documentation>
    <interleave>
      <ref name="Common.attributes"/>
      <ref name="Labelled.attributes"/>
    </interleave>
  </define>
  <define name="proof_model">
    <a:documentation>Content model for \elementref{proof}.</a:documentation>
    <interleave>
      <optional>
        <ref name="title"/>
      </optional>
      <ref name="Para.model"/>
    </interleave>
  </define>
  <!-- ====================================================================== -->
  <define name="Caption.class">
    <a:documentation>These are the additional elements representing figure and
table captions.
NOTE: Could title sensibly be reused here, instead?
Or, should caption be used for theorem and proof?</a:documentation>
    <choice>
      <ref name="caption"/>
      <ref name="toccaption"/>
    </choice>
  </define>
  <!-- ====================================================================== -->
  <define name="figure">
    <element name="figure">
      <a:documentation>A  figure, possibly captioned.</a:documentation>
      <interleave>
        <ref name="figure_attributes"/>
        <ref name="figure_model"/>
      </interleave>
    </element>
  </define>
  <define name="figure_attributes">
    <a:documentation>Attributes for \elementref{figure}.</a:documentation>
    <interleave>
      <ref name="Common.attributes"/>
      <ref name="Labelled.attributes"/>
      <ref name="Positionable.attributes"/>
      <optional>
        <attribute name="placement">
          <a:documentation>the vertical floating placement parameter that determines where the object is displayed.</a:documentation>
        </attribute>
      </optional>
    </interleave>
  </define>
  <define name="figure_model">
    <a:documentation>MiKo: only allowing one caption, is this right? same for table, float, and listing below
Content model for \elementref{figure}.</a:documentation>
    <interleave>
      <zeroOrMore>
        <ref name="figure"/>
      </zeroOrMore>
      <ref name="Block.model"/>
      <ref name="Caption.class"/>
    </interleave>
  </define>
  <!-- ====================================================================== -->
  <define name="table">
    <element name="table">
      <a:documentation>A  Table, possibly captioned. This is not necessarily a \elementref{tabular}.</a:documentation>
      <interleave>
        <ref name="table_attributes"/>
        <ref name="table_model"/>
      </interleave>
    </element>
  </define>
  <define name="table_attributes">
    <a:documentation>Attributes for \elementref{table}.</a:documentation>
    <interleave>
      <ref name="Common.attributes"/>
      <ref name="Labelled.attributes"/>
      <ref name="Positionable.attributes"/>
      <optional>
        <attribute name="placement">
          <a:documentation>the vertical floating placement parameter that determines where the object is displayed.</a:documentation>
        </attribute>
      </optional>
    </interleave>
  </define>
  <define name="table_model">
    <a:documentation>Content model for \elementref{table}.</a:documentation>
    <interleave>
      <zeroOrMore>
        <ref name="table"/>
      </zeroOrMore>
      <ref name="Block.model"/>
      <ref name="Caption.class"/>
    </interleave>
  </define>
  <!-- ====================================================================== -->
  <define name="float">
    <element name="float">
      <a:documentation>A generic float, possibly captioned, something other than a table, figure or listing</a:documentation>
      <interleave>
        <ref name="float_attributes"/>
        <ref name="float_model"/>
      </interleave>
    </element>
  </define>
  <define name="float_attributes">
    <a:documentation>Attributes for \elementref{float}.</a:documentation>
    <interleave>
      <ref name="Common.attributes"/>
      <ref name="Labelled.attributes"/>
      <ref name="Positionable.attributes"/>
      <optional>
        <attribute name="placement">
          <a:documentation>the vertical floating placement parameter that determines where the object is displayed.</a:documentation>
        </attribute>
      </optional>
    </interleave>
  </define>
  <define name="float_model">
    <a:documentation>Content model for \elementref{float}.</a:documentation>
    <interleave>
      <zeroOrMore>
        <ref name="float"/>
      </zeroOrMore>
      <ref name="Block.model"/>
      <ref name="Caption.class"/>
    </interleave>
  </define>
  <!-- ====================================================================== -->
  <define name="listing">
    <element name="listing">
      <a:documentation>A Listing, possibly captioned.</a:documentation>
      <interleave>
        <ref name="listing_attributes"/>
        <ref name="listing_model"/>
      </interleave>
    </element>
  </define>
  <define name="listing_attributes">
    <a:documentation>Attributes for \elementref{listing}.</a:documentation>
    <interleave>
      <ref name="Common.attributes"/>
      <ref name="Labelled.attributes"/>
      <ref name="Positionable.attributes"/>
      <optional>
        <attribute name="placement">
          <a:documentation>the floating placement parameter that determines where the object is displayed.</a:documentation>
        </attribute>
      </optional>
    </interleave>
  </define>
  <define name="listing_model">
    <a:documentation>Content model for \elementref{listing}.</a:documentation>
    <interleave>
      <ref name="Block.model"/>
      <ref name="Caption.class"/>
    </interleave>
  </define>
  <!-- ====================================================================== -->
  <define name="caption">
    <element name="caption">
      <a:documentation>A caption for a \elementref{table} or \elementref{figure}.</a:documentation>
      <interleave>
        <ref name="caption_attributes"/>
        <ref name="caption_model"/>
      </interleave>
    </element>
  </define>
  <define name="caption_attributes">
    <a:documentation>Attributes for \elementref{caption}.</a:documentation>
    <interleave>
      <ref name="Common.attributes"/>
      <optional>
        <attribute name="font"/>
      </optional>
      <optional>
        <attribute name="size">
          <a:documentation>Indicates the text size to use. (See \elementref{text})</a:documentation>
          <choice>
            <value>Huge</value>
            <value>huge</value>
            <value>LARGE</value>
            <value>Large</value>
            <value>large</value>
            <value>normal</value>
            <value>small</value>
            <value>footnote</value>
            <value>tiny</value>
            <text/>
          </choice>
        </attribute>
      </optional>
      <optional>
        <attribute name="color">
          <a:documentation>the color to use; any CSS compatible color specification.</a:documentation>
        </attribute>
      </optional>
    </interleave>
  </define>
  <define name="caption_model">
    <a:documentation>Content model for \elementref{caption},
basically Inline.model with tag included (normally, but not necessarily, tag would come first).</a:documentation>
    <interleave>
      <zeroOrMore>
        <ref name="tag"/>
      </zeroOrMore>
      <text/>
      <ref name="Inline.class"/>
      <ref name="Misc.class"/>
      <ref name="Meta.class"/>
    </interleave>
  </define>
  <!-- ====================================================================== -->
  <define name="toccaption">
    <element name="toccaption">
      <a:documentation>A short form of \elementref{table} or \elementref{figure} caption,
used for lists of figures or similar.</a:documentation>
      <interleave>
        <ref name="toccaption_attributes"/>
        <ref name="toccaption_model"/>
      </interleave>
    </element>
  </define>
  <define name="toccaption_attributes">
    <a:documentation>Attributes for \elementref{toccaption}.</a:documentation>
    <ref name="Common.attributes"/>
  </define>
  <define name="toccaption_model">
    <a:documentation>MiKo: here we allowed multiple tags, but now we can restrict, do we want that?
Content model for \elementref{toccaption}.</a:documentation>
    <interleave>
      <text/>
      <ref name="Inline.class"/>
      <ref name="Misc.class"/>
      <ref name="Meta.class"/>
      <zeroOrMore>
        <ref name="tag"/>
      </zeroOrMore>
    </interleave>
  </define>
</grammar>
<!-- ====================================================================== -->