summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-block.rng
blob: 52721622c6b3385cfa9e618d14615ee3782376d7 (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
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
<?xml version="1.0" encoding="UTF-8"?>
<!--
  /=====================================================================\ 
  |  LaTeXML-block.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" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <define name="Block.class" combine="choice">
    <a:documentation>The block module defines the following `physical' block elements.</a:documentation>
    <choice>
      <ref name="p"/>
      <ref name="equation"/>
      <ref name="equationgroup"/>
      <ref name="quote"/>
      <ref name="block"/>
      <ref name="listingblock"/>
      <ref name="itemize"/>
      <ref name="enumerate"/>
      <ref name="description"/>
    </choice>
  </define>
  <define name="Misc.class" combine="choice">
    <a:documentation>Additionally, it defines these miscellaneous elements that can appear
in both inline and block contexts.</a:documentation>
    <choice>
      <ref name="inline-block"/>
      <ref name="verbatim"/>
      <ref name="break"/>
      <ref name="graphics"/>
      <ref name="svg"/>
    </choice>
  </define>
  <define name="EquationMeta.class">
    <a:documentation>Additional Metadata that can be present in equations.</a:documentation>
    <ref name="constraint"/>
  </define>
  <!-- ====================================================================== -->
  <define name="p">
    <element name="p">
      <a:documentation>A physical paragraph.</a:documentation>
      <ref name="p_attributes"/>
      <ref name="p_model"/>
    </element>
  </define>
  <define name="p_attributes">
    <a:documentation>Attributes for \elementref{p}.</a:documentation>
    <ref name="Common.attributes"/>
    <ref name="ID.attributes"/>
    <ref name="Positionable.attributes"/>
  </define>
  <define name="p_model">
    <a:documentation>Content model for \elementref{p}.</a:documentation>
    <ref name="Inline.model"/>
  </define>
  <!-- ====================================================================== -->
  <define name="constraint">
    <element name="constraint">
      <a:documentation>A constraint upon an equation.</a:documentation>
      <ref name="constraint_attributes"/>
      <ref name="constraint_model"/>
    </element>
  </define>
  <define name="constraint_attributes">
    <a:documentation>Attributes for \elementref{constraint}.</a:documentation>
    <optional>
      <attribute name="hidden">
        <data type="boolean"/>
      </attribute>
    </optional>
  </define>
  <define name="constraint_model">
    <a:documentation>Content model for \elementref{constraint}.</a:documentation>
    <ref name="Inline.model"/>
  </define>
  <!-- ====================================================================== -->
  <define name="equation">
    <element name="equation">
      <a:documentation>An Equation.  The model is just Inline which includes \elementref{Math},
the main expected ingredient.
However, other things can end up in display math, too, so we use Inline.
Note that tabular is here only because it's a common, if misguided, idiom;
the processor will lift such elements out of math, when possible</a:documentation>
      <ref name="equation_attributes"/>
      <ref name="equation_model"/>
    </element>
  </define>
  <define name="equation_attributes">
    <a:documentation>Attributes for \elementref{equation}.</a:documentation>
    <ref name="Common.attributes"/>
    <ref name="Labelled.attributes"/>
  </define>
  <define name="equation_model">
    <a:documentation>Content model for \elementref{equation}.</a:documentation>
    <zeroOrMore>
      <choice>
        <ref name="Math"/>
        <ref name="MathFork"/>
        <ref name="text"/>
        <ref name="tabular"/>
        <ref name="Meta.class"/>
        <ref name="EquationMeta.class"/>
      </choice>
    </zeroOrMore>
  </define>
  <!-- ====================================================================== -->
  <define name="equationgroup">
    <element name="equationgroup">
      <a:documentation>A group of equations, perhaps aligned (Though this is nowhere recorded).</a:documentation>
      <ref name="equationgroup_attributes"/>
      <ref name="equationgroup_model"/>
    </element>
  </define>
  <define name="equationgroup_attributes">
    <a:documentation>Attributes for \elementref{equationgroup}.</a:documentation>
    <ref name="Common.attributes"/>
    <ref name="Labelled.attributes"/>
  </define>
  <define name="equationgroup_model">
    <a:documentation>Content model for \elementref{equationgroup}.</a:documentation>
    <zeroOrMore>
      <choice>
        <ref name="equationgroup"/>
        <ref name="equation"/>
        <ref name="p"/>
        <ref name="Meta.class"/>
        <ref name="EquationMeta.class"/>
      </choice>
    </zeroOrMore>
  </define>
  <!-- ====================================================================== -->
  <define name="MathFork">
    <element name="MathFork">
      <a:documentation>A wrapper for Math that provides alternative,
but typically less semantically meaningful,
formatted representations.
The first child is the meaningful form,
the extra children provide formatted forms,
for example being table rows or cells arising from an eqnarray.</a:documentation>
      <ref name="MathFork_attributes"/>
      <ref name="MathFork_model"/>
    </element>
  </define>
  <define name="MathFork_attributes">
    <a:documentation>Attributes for \elementref{MathFork}.</a:documentation>
    <ref name="Common.attributes"/>
  </define>
  <define name="MathFork_model">
    <a:documentation>Content model for \elementref{MathFork}.</a:documentation>
    <ref name="Math"/>
    <zeroOrMore>
      <ref name="MathBranch"/>
    </zeroOrMore>
  </define>
  <!-- ====================================================================== -->
  <define name="MathBranch">
    <element name="MathBranch">
      <a:documentation>A container for an alternatively formatted math representation.</a:documentation>
      <ref name="MathBranch_attributes"/>
      <ref name="MathBranch_model"/>
    </element>
  </define>
  <define name="MathBranch_attributes">
    <a:documentation>Attributes for \elementref{MathBranch}.</a:documentation>
    <ref name="Common.attributes"/>
    <optional>
      <attribute name="format"/>
    </optional>
  </define>
  <define name="MathBranch_model">
    <a:documentation>Content model for \elementref{MathBranch}.</a:documentation>
    <zeroOrMore>
      <choice>
        <ref name="Math"/>
        <ref name="tr"/>
        <ref name="td"/>
      </choice>
    </zeroOrMore>
  </define>
  <!-- ====================================================================== -->
  <define name="quote">
    <element name="quote">
      <a:documentation>A quotation.</a:documentation>
      <ref name="quote_attributes"/>
      <ref name="quote_model"/>
    </element>
  </define>
  <define name="quote_attributes">
    <a:documentation>Attributes for \elementref{quote}.</a:documentation>
    <ref name="Common.attributes"/>
    <ref name="ID.attributes"/>
  </define>
  <define name="quote_model">
    <a:documentation>Content model for \elementref{quote}.</a:documentation>
    <ref name="Block.model"/>
  </define>
  <!--
    This was Inline.model, but since quotes can be arbitrarily complex
    including equations, etc, not just verse, should be Block.model, perhaps even Para.model?
  -->
  <!-- ====================================================================== -->
  <define name="block">
    <element name="block">
      <a:documentation>A generic block (fallback).</a:documentation>
      <ref name="block_attributes"/>
      <ref name="block_model"/>
    </element>
  </define>
  <define name="block_attributes">
    <a:documentation>Attributes for \elementref{block}.</a:documentation>
    <ref name="Common.attributes"/>
    <ref name="ID.attributes"/>
    <ref name="Positionable.attributes"/>
  </define>
  <define name="block_model">
    <a:documentation>Content model for \elementref{block}.</a:documentation>
    <ref name="Inline.model"/>
  </define>
  <!-- ====================================================================== -->
  <define name="listingblock">
    <element name="listingblock">
      <a:documentation>An in-block Listing, without caption</a:documentation>
      <ref name="listingblock_attributes"/>
      <ref name="listingblock_model"/>
    </element>
  </define>
  <define name="listingblock_attributes">
    <a:documentation>Attributes for \elementref{listingblock}.</a:documentation>
    <ref name="Common.attributes"/>
    <ref name="Labelled.attributes"/>
  </define>
  <define name="listingblock_model">
    <a:documentation>Content model for \elementref{listingblock}.</a:documentation>
    <zeroOrMore>
      <ref name="Block.model"/>
    </zeroOrMore>
  </define>
  <!-- ====================================================================== -->
  <define name="break">
    <element name="break">
      <a:documentation>A forced line break.</a:documentation>
      <ref name="break_attributes"/>
      <ref name="break_model"/>
    </element>
  </define>
  <define name="break_attributes">
    <a:documentation>Attributes for \elementref{break}.</a:documentation>
    <ref name="Common.attributes"/>
  </define>
  <define name="break_model">
    <a:documentation>Content model for \elementref{break}.</a:documentation>
    <empty/>
  </define>
  <!-- ====================================================================== -->
  <define name="inline-block">
    <element name="inline-block">
      <a:documentation>An inline block. Actually, can appear in inline or block mode, but
typesets its contents as a block.</a:documentation>
      <ref name="inline-block_attributes"/>
      <ref name="inline-block_model"/>
    </element>
  </define>
  <define name="inline-block_attributes">
    <a:documentation>Attributes for \elementref{inline-block}.</a:documentation>
    <ref name="Common.attributes"/>
    <ref name="ID.attributes"/>
    <ref name="Positionable.attributes"/>
  </define>
  <define name="inline-block_model">
    <a:documentation>Content model for \elementref{inline-block}.</a:documentation>
    <ref name="Block.model"/>
  </define>
  <!-- ====================================================================== -->
  <define name="verbatim">
    <element name="verbatim">
      <a:documentation>Verbatim content</a:documentation>
      <ref name="verbatim_attributes"/>
      <ref name="verbatim_model"/>
    </element>
  </define>
  <define name="verbatim_attributes">
    <a:documentation>Attributes for \elementref{verbatim}.</a:documentation>
    <ref name="Common.attributes"/>
    <ref name="ID.attributes"/>
    <optional>
      <attribute name="font">
        <a:documentation>the font to use; generally typewriter.</a:documentation>
      </attribute>
    </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>
  </define>
  <define name="verbatim_model">
    <a:documentation>Content model for \elementref{verbatim}.</a:documentation>
    <ref name="Inline.model"/>
  </define>
  <!-- ====================================================================== -->
  <define name="itemize">
    <element name="itemize">
      <a:documentation>An itemized list.</a:documentation>
      <ref name="itemize_attributes"/>
      <ref name="itemize_model"/>
    </element>
  </define>
  <define name="itemize_attributes">
    <a:documentation>Attributes for \elementref{itemize}.</a:documentation>
    <ref name="Common.attributes"/>
    <ref name="ID.attributes"/>
  </define>
  <define name="itemize_model">
    <a:documentation>Content model for \elementref{itemize}.</a:documentation>
    <zeroOrMore>
      <ref name="item"/>
    </zeroOrMore>
  </define>
  <!-- ====================================================================== -->
  <define name="enumerate">
    <element name="enumerate">
      <a:documentation>An enumerated list.</a:documentation>
      <ref name="enumerate_attributes"/>
      <ref name="enumerate_model"/>
    </element>
  </define>
  <define name="enumerate_attributes">
    <a:documentation>Attributes for \elementref{enumerate}.</a:documentation>
    <ref name="Common.attributes"/>
    <ref name="ID.attributes"/>
  </define>
  <define name="enumerate_model">
    <a:documentation>Content model for \elementref{enumerate}.</a:documentation>
    <zeroOrMore>
      <ref name="item"/>
    </zeroOrMore>
  </define>
  <!-- ====================================================================== -->
  <define name="description">
    <element name="description">
      <a:documentation>A description list. The \elementref{item}s within are expected to have a \elementref{tag}
which represents the term being described in each \elementref{item}.</a:documentation>
      <ref name="description_attributes"/>
      <ref name="description_model"/>
    </element>
  </define>
  <define name="description_attributes">
    <a:documentation>Attributes for \elementref{description}.</a:documentation>
    <ref name="Common.attributes"/>
    <ref name="ID.attributes"/>
  </define>
  <define name="description_model">
    <a:documentation>Content model for \elementref{description}.</a:documentation>
    <zeroOrMore>
      <ref name="item"/>
    </zeroOrMore>
  </define>
  <!-- ====================================================================== -->
  <define name="item">
    <element name="item">
      <a:documentation>An item within a list.</a:documentation>
      <ref name="item_attributes"/>
      <ref name="item_model"/>
    </element>
  </define>
  <define name="item_attributes">
    <a:documentation>Attributes for \elementref{item}.</a:documentation>
    <ref name="Common.attributes"/>
    <ref name="Labelled.attributes"/>
  </define>
  <define name="item_model">
    <a:documentation>Content model for \elementref{item}.</a:documentation>
    <optional>
      <ref name="tag"/>
    </optional>
    <ref name="Para.model"/>
  </define>
  <!-- ====================================================================== -->
  <define name="tag">
    <element name="tag">
      <a:documentation>A tag within an item indicating the term or bullet for a given item.</a:documentation>
      <ref name="tag_attributes"/>
      <ref name="tag_model"/>
    </element>
  </define>
  <define name="tag_attributes">
    <a:documentation>Attributes for \elementref{tag}.</a:documentation>
    <ref name="Common.attributes"/>
    <optional>
      <attribute name="open">
        <a:documentation>specifies an open delimiters used to display the tag.</a:documentation>
      </attribute>
    </optional>
    <optional>
      <attribute name="close">
        <a:documentation>specifies an close delimiters used to display the tag.</a:documentation>
      </attribute>
    </optional>
  </define>
  <define name="tag_model">
    <a:documentation>Content model for \elementref{tag}.</a:documentation>
    <ref name="Inline.model"/>
  </define>
  <!-- ====================================================================== -->
  <define name="graphics">
    <element name="graphics">
      <a:documentation>A graphical insertion of an external file. </a:documentation>
      <ref name="graphics_attributes"/>
      <ref name="graphics_model"/>
    </element>
  </define>
  <define name="graphics_attributes">
    <a:documentation>Attributes for \elementref{graphics}.</a:documentation>
    <ref name="Common.attributes"/>
    <ref name="ID.attributes"/>
    <ref name="Imageable.attributes"/>
    <optional>
      <attribute name="graphic">
        <a:documentation>the path to the graphics file. This is the (often minimally specified) path
to a graphics file omitting the type extension.  Once resolved to a specific
image file, the \attr{imagesrc} (from Imageable.attributes) is used.</a:documentation>
      </attribute>
    </optional>
    <optional>
      <attribute name="candidates">
        <a:documentation>a comma separated list of candidate graphics files that could be used to
for \attr{graphic}.  A post-processor or application may choose from these,
or may make its own selection or synthesis to implement the graphic for a given target.</a:documentation>
      </attribute>
    </optional>
    <optional>
      <attribute name="options">
        <a:documentation>an encoding of the scaling and positioning options
to be used in processing the graphic.</a:documentation>
      </attribute>
    </optional>
  </define>
  <define name="graphics_model">
    <a:documentation>Content model for \elementref{graphics}.</a:documentation>
    <empty/>
  </define>
  <!-- ====================================================================== -->
  <define name="svg">
    <grammar>
      <a:documentation>An SVG (Scalable Vector Graphics) object
[eventually must adapt to put LaTeXML objects in foreignObject]</a:documentation>
      <include href="svg11.rng">
        <define name="SVG.foreignObject.content">
          <parentRef name="Flow.model"/>
        </define>
      </include>
    </grammar>
  </define>
</grammar>
<!-- ====================================================================== -->