summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-inline.rng
blob: 8c1d793a9660264ecdf1af17bcc0b235a0272d15 (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
<?xml version="1.0" encoding="UTF-8"?>
<!--
  /=====================================================================\ 
  |  LaTeXML-inline.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="Inline.class" combine="choice">
    <a:documentation>The inline module defines basic inline elements used throughout </a:documentation>
    <choice>
      <ref name="text"/>
      <ref name="emph"/>
      <ref name="acronym"/>
      <ref name="rule"/>
      <ref name="anchor"/>
      <ref name="ref"/>
      <ref name="cite"/>
      <ref name="bibref"/>
    </choice>
  </define>
  <define name="Meta.class" combine="choice">
    <a:documentation>Additionally, it defines these meta elements. These are generally hidden,
and can appear in inline and block contexts.</a:documentation>
    <choice>
      <ref name="note"/>
      <ref name="indexmark"/>
      <ref name="ERROR"/>
    </choice>
  </define>
  <!-- ====================================================================== -->
  <define name="text">
    <element name="text">
      <a:documentation>General container for styled text.
Attributes cover a variety of styling and position shifting properties.</a:documentation>
      <ref name="text_attributes"/>
      <ref name="text_model"/>
    </element>
  </define>
  <define name="text_attributes">
    <a:documentation>Attributes for \elementref{text}.</a:documentation>
    <ref name="Common.attributes"/>
    <ref name="Positionable.attributes"/>
    <optional>
      <attribute name="font">
        <a:documentation>Indicates the font to use. It consists of a space separated sequence
of values representing the
family (\texttt{serif}, \texttt{sansserif}, \texttt{math}, \texttt{typewriter},
    \texttt{caligraphic}, \texttt{fraktur}, \texttt{script}, \ldots),
series (\texttt{medium}, \texttt{bold}, \ldots),
and shape (\texttt{upright}, \texttt{italic}, \texttt{slanted}, \texttt{smallcaps}, \ldots).
Only the values differing from the current context are given.
Each component is open-ended, for extensibility; it is thus unclear
whether unknown values specify family, series or shape.
In postprocessing, these values are carried to the \attr{class} attribute,
and can thus be effected by CSS.</a:documentation>
      </attribute>
    </optional>
    <optional>
      <attribute name="size">
        <a:documentation>Indicates the text size to use. The values are modeled after the
more abstract \LaTeX\ font size switches, rather than point-sizes.
The values are open-ended for extensibility;
In postprocessing, these values are carried to the \attr{class} attribute,
and can thus be effected by CSS.</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.
In postprocessing, these values are carried to the \attr{class} attribute,
and can thus be effected by CSS.</a:documentation>
      </attribute>
    </optional>
    <optional>
      <attribute name="framed">
        <a:documentation>the kind of frame or outline for the text.</a:documentation>
        <choice>
          <value>rectangle</value>
          <value>underline</value>
          <text/>
        </choice>
      </attribute>
    </optional>
  </define>
  <define name="text_model">
    <a:documentation>Content model for \elementref{text}.</a:documentation>
    <ref name="Inline.model"/>
  </define>
  <!-- ====================================================================== -->
  <define name="emph">
    <element name="emph">
      <a:documentation>Emphasized text.</a:documentation>
      <ref name="emph_attributes"/>
      <ref name="emph_model"/>
    </element>
  </define>
  <define name="emph_attributes">
    <a:documentation>Attributes for \elementref{emph}.</a:documentation>
    <ref name="Common.attributes"/>
  </define>
  <define name="emph_model">
    <a:documentation>Content model for \elementref{emph}.</a:documentation>
    <ref name="Inline.model"/>
  </define>
  <!-- ====================================================================== -->
  <define name="acronym">
    <element name="acronym">
      <a:documentation>Represents an acronym.</a:documentation>
      <ref name="acronym_attributes"/>
      <ref name="acronym_model"/>
    </element>
  </define>
  <define name="acronym_attributes">
    <a:documentation>Attributes for \elementref{acronym}.</a:documentation>
    <ref name="Common.attributes"/>
    <optional>
      <attribute name="name">
        <a:documentation>should be used to indicate the expansion of the acronym.</a:documentation>
      </attribute>
    </optional>
  </define>
  <define name="acronym_model">
    <a:documentation>Content model for \elementref{acronym}.</a:documentation>
    <ref name="Inline.model"/>
  </define>
  <!-- ====================================================================== -->
  <define name="rule">
    <element name="rule">
      <a:documentation>A Rule.</a:documentation>
      <ref name="rule_attributes"/>
      <ref name="rule_model"/>
    </element>
  </define>
  <define name="rule_attributes">
    <a:documentation>Attributes for \elementref{rule}.</a:documentation>
    <ref name="Common.attributes"/>
    <ref name="Positionable.attributes"/>
  </define>
  <define name="rule_model">
    <a:documentation>Content model for \elementref{rule}.</a:documentation>
    <empty/>
  </define>
  <!-- ====================================================================== -->
  <define name="ref">
    <element name="ref">
      <a:documentation>A hyperlink reference to some other object. 
When converted to HTML, the content would be the content of the anchor.
The destination can be specified by one of the 
attributes \attr{labelref}, \attr{idref} or \attr{href};
Missing fields will usually be filled in during postprocessing,
based on data extracted from the document(s).</a:documentation>
      <ref name="ref_attributes"/>
      <ref name="ref_model"/>
    </element>
  </define>
  <define name="ref_attributes">
    <a:documentation>Attributes for \elementref{ref}.</a:documentation>
    <ref name="Common.attributes"/>
    <ref name="IDREF.attributes">
      <a:documentation>reference to an internal identifier.</a:documentation>
    </ref>
    <optional>
      <attribute name="labelref">
        <a:documentation>reference to a LaTeX labelled object;
See the \attr{labels} attribute of \patternref{Labelled.attributes}.</a:documentation>
      </attribute>
    </optional>
    <optional>
      <attribute name="href">
        <a:documentation>reference to an arbitrary url.</a:documentation>
      </attribute>
    </optional>
    <optional>
      <attribute name="show">
        <a:documentation>a pattern encoding how the text content should be filled in during
postprocessing, if it is empty.
It consists of the words
  \texttt{type} (standing for the object type, eg. Ch.),
  \texttt{refnum} and \texttt{title}
mixed with arbitrary characters. The 
It can also be \texttt{fulltitle}, which indicates the title 
with prefix and type if section numbering is enabled.</a:documentation>
      </attribute>
    </optional>
    <optional>
      <attribute name="title">
        <a:documentation>gives a longer form description of the target,
this would typically appear as a tooltip in HTML.
Typically filled in by postprocessor.</a:documentation>
      </attribute>
    </optional>
  </define>
  <define name="ref_model">
    <a:documentation>Content model for \elementref{ref}.</a:documentation>
    <ref name="Inline.model"/>
  </define>
  <!-- ====================================================================== -->
  <define name="anchor">
    <element name="anchor">
      <a:documentation>Inline anchor.</a:documentation>
      <ref name="anchor_attributes"/>
      <ref name="anchor_model"/>
    </element>
  </define>
  <define name="anchor_attributes">
    <a:documentation>Attributes for \elementref{anchor}.</a:documentation>
    <ref name="Common.attributes"/>
    <ref name="ID.attributes"/>
  </define>
  <define name="anchor_model">
    <a:documentation>Content model for \elementref{anchor}.</a:documentation>
    <ref name="Inline.model"/>
  </define>
  <!-- ====================================================================== -->
  <define name="cite">
    <element name="cite">
      <a:documentation>A container for a bibliographic citation. The model is inline to
allow arbitrary comments before and after the expected \elementref{bibref}(s)
which are the specific citation.</a:documentation>
      <ref name="cite_attributes"/>
      <ref name="cite_model"/>
    </element>
  </define>
  <define name="cite_attributes">
    <a:documentation>Attributes for \elementref{cite}.</a:documentation>
    <ref name="Common.attributes"/>
  </define>
  <define name="cite_model">
    <a:documentation>Content model for \elementref{cite}.</a:documentation>
    <ref name="Inline.model"/>
  </define>
  <!-- ====================================================================== -->
  <define name="bibref">
    <element name="bibref">
      <a:documentation>A bibliographic citation refering to a specific bibliographic item.</a:documentation>
      <ref name="bibref_attributes"/>
      <ref name="bibref_model"/>
    </element>
  </define>
  <define name="bibref_attributes">
    <a:documentation>Attributes for \elementref{bibref}.</a:documentation>
    <ref name="Common.attributes"/>
    <ref name="IDREF.attributes"/>
    <optional>
      <attribute name="bibrefs">
        <a:documentation>a comma separated list of bibliographic keys.
(See the \attr{key} attribute of \elementref{bibitem} and \elementref{bibentry})</a:documentation>
      </attribute>
    </optional>
    <optional>
      <attribute name="show">
        <a:documentation>a pattern encoding how the text content (of an empty bibref) will be filled in.
Consists of strings \texttt{author}, \texttt{fullauthor}, \texttt{year},
\texttt{number} and \texttt{title}
(to be replaced by data from the bibliographic item)
mixed with arbitrary characters.</a:documentation>
      </attribute>
    </optional>
    <optional>
      <attribute name="separator">
        <a:documentation>separator between formatted references</a:documentation>
      </attribute>
    </optional>
    <optional>
      <attribute name="yyseparator">
        <a:documentation>separator between formatted years when duplicate authors are combined.</a:documentation>
      </attribute>
    </optional>
  </define>
  <define name="bibref_model">
    <a:documentation>Content model for \elementref{bibref}.</a:documentation>
    <zeroOrMore>
      <ref name="bibrefphrase"/>
    </zeroOrMore>
  </define>
  <!-- ====================================================================== -->
  <define name="bibrefphrase">
    <element name="bibrefphrase">
      <a:documentation>A preceding or following phrase used in composing a bibliographic reference,
such as listing pages or chapter.</a:documentation>
      <ref name="bibrefphrase_attributes"/>
      <ref name="bibrefphrase_model"/>
    </element>
  </define>
  <define name="bibrefphrase_attributes">
    <a:documentation>Attributes for \elementref{bibrefphrase}</a:documentation>
    <ref name="Common.attributes"/>
  </define>
  <define name="bibrefphrase_model">
    <a:documentation>Content model for \elementref{bibrefphrase}</a:documentation>
    <ref name="Inline.model"/>
  </define>
  <!-- ====================================================================== -->
  <define name="note">
    <element name="note">
      <a:documentation>Metadata that covers several `out of band' annotations.
It's content allows both inline and block-level content.</a:documentation>
      <ref name="note_attributes"/>
      <ref name="note_model"/>
    </element>
  </define>
  <define name="note_attributes">
    <a:documentation>Attributes for \elementref{note}.</a:documentation>
    <ref name="Common.attributes"/>
    <optional>
      <attribute name="mark">
        <a:documentation>indicates the desired visible marker to be linked to the note.</a:documentation>
      </attribute>
    </optional>
    <optional>
      <attribute name="role">
        <a:documentation>indicates the kind of note</a:documentation>
        <choice>
          <value>footnote</value>
          <text/>
        </choice>
      </attribute>
    </optional>
  </define>
  <define name="note_model">
    <a:documentation>Content model for \elementref{note}.</a:documentation>
    <ref name="Flow.model"/>
  </define>
  <!-- should mark be more like label/refnum ? -->
  <!-- ====================================================================== -->
  <define name="ERROR">
    <element name="ERROR">
      <a:documentation>error object for undefined control sequences, or whatever</a:documentation>
      <ref name="ERROR_attributes"/>
      <ref name="ERROR_model"/>
    </element>
  </define>
  <define name="ERROR_attributes">
    <a:documentation>Attributes for \elementref{ERROR}.</a:documentation>
    <ref name="Common.attributes"/>
  </define>
  <define name="ERROR_model">
    <a:documentation>Content model for \elementref{ERROR}.</a:documentation>
    <zeroOrMore>
      <text/>
    </zeroOrMore>
  </define>
  <!-- ====================================================================== -->
  <define name="indexmark">
    <element name="indexmark">
      <a:documentation>Metadata to record an indexing position. The content is 
a sequence of \elementref{indexphrase}, each representing a level in
a multilevel indexing entry.</a:documentation>
      <ref name="indexmark_attributes"/>
      <ref name="indexmark_model"/>
    </element>
  </define>
  <define name="indexmark_attributes">
    <a:documentation>Attributes for \elementref{indexmark}.</a:documentation>
    <ref name="Common.attributes"/>
    <optional>
      <attribute name="see_also">
        <a:documentation>a flattened form (like \attr{key}) of another \elementref{indexmark},
used to crossreference.</a:documentation>
      </attribute>
    </optional>
    <optional>
      <attribute name="style">
        <a:documentation>NOTE: describe this.</a:documentation>
      </attribute>
    </optional>
  </define>
  <define name="indexmark_model">
    <a:documentation>Content model for \elementref{indexmark}.</a:documentation>
    <zeroOrMore>
      <ref name="indexphrase"/>
    </zeroOrMore>
    <zeroOrMore>
      <ref name="indexsee"/>
    </zeroOrMore>
  </define>
  <!-- ====================================================================== -->
  <define name="indexphrase">
    <element name="indexphrase">
      <a:documentation>A phrase within an \elementref{indexmark}</a:documentation>
      <ref name="indexphrase_attributes"/>
      <ref name="indexphrase_model"/>
    </element>
  </define>
  <define name="indexphrase_attributes">
    <a:documentation>Attributes for \elementref{indexphrase}.</a:documentation>
    <ref name="Common.attributes"/>
    <optional>
      <attribute name="key">
        <a:documentation>a flattened form of the phrase for generating an \attr{ID}.</a:documentation>
      </attribute>
    </optional>
  </define>
  <define name="indexphrase_model">
    <a:documentation>Content model for \elementref{indexphrase}.</a:documentation>
    <ref name="Inline.model"/>
  </define>
  <define name="indexsee">
    <element name="indexsee">
      <a:documentation>A see-also phrase within an \elementref{indexmark}</a:documentation>
      <ref name="indexsee_attributes"/>
      <ref name="indexsee_model"/>
    </element>
  </define>
  <define name="indexsee_attributes">
    <a:documentation>Attributes for \elementref{indexsee}.</a:documentation>
    <ref name="Common.attributes"/>
    <optional>
      <attribute name="key">
        <a:documentation>a flattened form of the phrase for generating an \attr{ID}.</a:documentation>
      </attribute>
    </optional>
    <optional>
      <attribute name="name">
        <a:documentation>a name for the see phrase, such as "see also".</a:documentation>
      </attribute>
    </optional>
  </define>
  <define name="indexsee_model">
    <a:documentation>Content model for \elementref{indexsee}.</a:documentation>
    <ref name="Inline.model"/>
  </define>
</grammar>
<!-- ====================================================================== -->