summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-common.rng
blob: 850da7753e78fa4b41cfa5d3d121e15a8fef420e (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
<?xml version="1.0" encoding="UTF-8"?>
<!--
  /=====================================================================\ 
  |  LaTeXML-classes.rnc                                                |
  | Document Type 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 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">
  <!-- Basic element classes: -->
  <define name="Inline.class">
    <a:documentation>All strictly inline elements.</a:documentation>
    <notAllowed/>
  </define>
  <define name="Block.class">
    <a:documentation>All `physical' block elements. 
A physical block is typically displayed as a block, but
may not constitute a complete logical unit.</a:documentation>
    <notAllowed/>
  </define>
  <define name="Misc.class">
    <a:documentation>Additional miscellaneous elements that can appear in
both inline and block contexts.</a:documentation>
    <notAllowed/>
  </define>
  <define name="Para.class">
    <a:documentation>All logical block level elements.
A logical block typically contains one or more physical block elements.
For example, a common situation might be \elementref{p},\elementref{equation},\elementref{p},
where the entire sequence comprises a single sentence.</a:documentation>
    <notAllowed/>
  </define>
  <define name="Meta.class">
    <a:documentation>All metadata elements, typically representing hidden data.</a:documentation>
    <notAllowed/>
  </define>
  <!--
    ======================================================================
    Attribute types
  -->
  <define name="Length.type">
    <a:documentation>The type for attributes specifying a length.
Should be a number followed by a length, typically px.
NOTE: To be narrowed later.</a:documentation>
    <text/>
  </define>
  <define name="Color.type">
    <a:documentation>The type for attributes specifying a color.
NOTE: To be narrowed later.</a:documentation>
    <text/>
  </define>
  <!-- ====================================================================== -->
  <define name="Common.attributes">
    <a:documentation>Attributes shared by ALL elements.</a:documentation>
    <optional>
      <!--
         ## provides for namespace declaration.
         attribute xmlns { text }?,
      -->
      <attribute name="class">
        <a:documentation>a space separated list of tokens, as in CSS.
The \attr{class} can be used to add differentiate different instances of elements
without introducing new element declarations.
However, this generally shouldn't be used for deep semantic distinctions.
This attribute is carried over to HTML and can be used for CSS selection.
[Note that the default XSLT stylesheets for html and xhtml
add the latexml element names to the class of html elements
for more convenience in using CSS.]</a:documentation>
        <data type="NMTOKENS"/>
      </attribute>
    </optional>
  </define>
  <define name="ID.attributes">
    <a:documentation>Attributes for elements that can be cross-referenced
from inside or outside the document.</a:documentation>
    <optional>
      <attribute name="xml:id">
        <a:documentation>the unique identifier of the element, 
usually generated automatically by the latexml.</a:documentation>
        <data type="ID"/>
      </attribute>
    </optional>
  </define>
  <define name="IDREF.attributes">
    <a:documentation>Attributes for elements that can cross-reference other elements.</a:documentation>
    <optional>
      <attribute name="idref">
        <a:documentation>the identifier of the referred-to element.</a:documentation>
        <data type="IDREF"/>
      </attribute>
    </optional>
  </define>
  <define name="Labelled.attributes">
    <a:documentation>Attributes for elements that can be labelled from within LaTeX.
These attributes deal with assigning a label and generating cross references.</a:documentation>
    <ref name="ID.attributes"/>
    <optional>
      <attribute name="labels">
        <a:documentation>Records the various labels that LaTeX uses for crossreferencing.
(note that \cs{label} can associate more than one label with an object!)
It consists of space separated labels for the element.
The \cs{label} macro provides the label prefixed by \texttt{LABEL:};
Spaces in a label are replaced by underscore.
Other mechanisms (like acro?) might use other prefixes (but \texttt{ID:} is reserved!)</a:documentation>
      </attribute>
    </optional>
    <optional>
      <attribute name="refnum">
        <a:documentation>the reference number (ie. section number, equation number, etc) of the object.</a:documentation>
      </attribute>
    </optional>
    <optional>
      <attribute name="frefnum">
        <a:documentation>the formatted reference number of the object, typically this is the refnum with
the object type prepended, such as "Chapter 2"</a:documentation>
      </attribute>
    </optional>
  </define>
  <define name="Positionable.attributes">
    <a:documentation>Attributes shared by low-level, generic inline and block elements
that can be sized or shifted.</a:documentation>
    <optional>
      <attribute name="width">
        <a:documentation>the desired width of the box</a:documentation>
        <ref name="Length.type"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="height">
        <a:documentation>the desired height of the box</a:documentation>
        <ref name="Length.type"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="depth">
        <a:documentation>the desired depth of the box</a:documentation>
        <ref name="Length.type"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="pad-width">
        <a:documentation>extra width beyond the boxes natural size.</a:documentation>
        <ref name="Length.type"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="pad-height">
        <a:documentation>extra height beyond the boxes natural size.</a:documentation>
        <ref name="Length.type"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="xoffset">
        <a:documentation>horizontal shift the position of the box.</a:documentation>
        <ref name="Length.type"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="yoffset">
        <a:documentation>vertical shift the position of the box.</a:documentation>
        <ref name="Length.type"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="align">
        <a:documentation>alignment of material within the box.</a:documentation>
        <choice>
          <value>left</value>
          <value>center</value>
          <value>right</value>
          <value>justified</value>
        </choice>
      </attribute>
    </optional>
    <optional>
      <attribute name="vattach">
        <a:documentation>specifies which line of the box is aligned to the baseline of the containing object.</a:documentation>
        <choice>
          <value>top</value>
          <value>middle</value>
          <value>bottom</value>
        </choice>
      </attribute>
    </optional>
    <optional>
      <attribute name="float">
        <a:documentation>the horizontal floating placement parameter that determines where the object is displayed.</a:documentation>
        <choice>
          <value>right</value>
          <value>left</value>
          <text/>
        </choice>
      </attribute>
    </optional>
  </define>
  <define name="Imageable.attributes">
    <a:documentation>Attributes for elements that may be converted to image form
during postprocessing, such as math, graphics, pictures, etc.</a:documentation>
    <optional>
      <attribute name="imagesrc">
        <a:documentation>the file, possibly generated from other data.</a:documentation>
        <data type="anyURI"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="imagewidth">
        <a:documentation>the width in pixels of \attr{imagesrc}.</a:documentation>
        <data type="nonNegativeInteger"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="imageheight">
        <a:documentation>the height in pixels of \attr{imagesrc}.</a:documentation>
        <data type="nonNegativeInteger"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="description">
        <a:documentation>a description of the image</a:documentation>
      </attribute>
    </optional>
  </define>
</grammar>