summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-picture.rnc
blob: dcf8bf8cf153627c815e1cf5cbd745ef89aeaa7c (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
# /=====================================================================\ 
# |  LaTeXML-picture.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=/

# ======================================================================
# Picture; Experimental, possibly should evolve to SVG?
# ======================================================================

default namespace = "http://dlmf.nist.gov/LaTeXML"
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"

## This module defines a picture environment, roughly a subset of SVG.
## NOTE: Consider whether it is sensible to drop this and incorporate SVG itself.
Misc.class &= picture*

#======================================================================

Picture.class =
  g* & rect* & line* & circle* & path*
 & arc* & wedge* & ellipse* & polygon* & bezier*
 & parabola* & curve* & dots* & grid* & clip*

## These attributes correspond roughly to SVG, but need documentation.
Picture.attributes =
  attribute x { text }? &
  attribute y { text }? &
  attribute r { text }? &
  attribute rx { text }? &
  attribute ry { text }? &
  attribute width { text }? &
  attribute height { text }? &
  attribute fill { text }? &
  attribute stroke { text }? &
  attribute stroke-width { text }? &
  attribute stroke-dasharray { text }? &
  attribute transform { text }? &
  attribute terminators { text }? &
  attribute arrowlength { text }? &
  attribute points { text }? &
  attribute showpoints { text }? &
  attribute displayedpoints { text }? &
  attribute arc { text }? &
  attribute angle1 { text }? &
  attribute angle2 { text }? &
  attribute arcsepA { text }? &
  attribute arcsepB { text }? &
  attribute curvature { text }?

## These attributes correspond roughly to SVG, but need documentation.
PictureGroup.attributes =
  attribute pos { text }? &
  attribute framed {xsd:boolean}? &
  [ a:defaultValue = "rect" ]
  attribute frametype { "rect" | "circle" | "oval" }? &
  attribute fillframe {xsd:boolean }? &
  attribute boxsep { text }? &
  attribute shadowbox {xsd:boolean}? &
  attribute doubleline {xsd:boolean}?

#======================================================================

picture =
## A picture environment.
element picture { picture_attributes &  picture_model }

## Attributes for \elementref{picture}.
picture_attributes = 
  Common.attributes & 
  ID.attributes & 
  Picture.attributes & 
  Imageable.attributes & 
  attribute clip {xsd:boolean}? &
  attribute baseline { text }? &
  attribute unitlength { text }? &
  attribute xunitlength { text }? &
  attribute yunitlength { text }? &
  attribute tex { text }? &
  attribute content-tex { text }?

## Content model for \elementref{picture}.
picture_model = Picture.class & Inline.class & Misc.class & Meta.class

#======================================================================

g =
## A graphical grouping; the content is inherits by the transformations, 
## positioning and other properties.
element g { g_attributes &  g_model }

## Attributes for \elementref{g}.
g_attributes = Common.attributes &  Picture.attributes &  PictureGroup.attributes

## Content model for \elementref{g}.
g_model = Picture.class & Inline.class & Misc.class & Meta.class

#======================================================================

rect =
## A rectangle within a \elementref{picture}.
element rect { rect_attributes &  rect_model }

## Attributes for \elementref{rect}.
rect_attributes = Common.attributes &  Picture.attributes

## Content model for \elementref{rect}.
rect_model = empty

#======================================================================

line =
## A line within a \elementref{picture}.
element line { line_attributes &  line_model }

## Attributes for \elementref{line}.
line_attributes = Common.attributes &  Picture.attributes

## Content model for \elementref{line}.
line_model = empty

#======================================================================

polygon =
## A polygon within a \elementref{picture}.
element polygon { polygon_attributes &  polygon_model }

## Attributes for \elementref{polygon}.
polygon_attributes = Common.attributes &  Picture.attributes

## Content model for \elementref{polygon}.
polygon_model = empty

#======================================================================

wedge =
## A wedge within a \elementref{picture}.
element wedge { wedge_attributes &  wedge_model }

## Attributes for \elementref{wedge}.
wedge_attributes = Common.attributes &  Picture.attributes

## Content model for \elementref{wedge}.
wedge_model = empty

#======================================================================

arc =
## An arc within a \elementref{picture}.
element arc { arc_attributes &  arc_model }

## Attributes for \elementref{arc}.
arc_attributes = Common.attributes &  Picture.attributes

## Content model for \elementref{arc}.
arc_model = empty

#======================================================================

circle =
## A circle within a \elementref{picture}.
element circle { circle_attributes &  circle_model }

## Attributes for \elementref{circle}.
circle_attributes = Common.attributes &  Picture.attributes

## Content model for \elementref{circle}.
circle_model = empty

#======================================================================

ellipse =
## An ellipse within a \elementref{picture}.
element ellipse { ellipse_attributes &  ellipse_model }

## Attributes for \elementref{ellipse}.
ellipse_attributes = Common.attributes &  Picture.attributes

## Content model for \elementref{ellipse}.
ellipse_model = empty

#======================================================================

path =
## A path within a \elementref{picture}.
element path { path_attributes &  path_model }

## Attributes for \elementref{path}.
path_attributes = Common.attributes &  Picture.attributes

## Content model for \elementref{path}.
path_model = empty

#======================================================================

bezier =
## A bezier curve within a \elementref{picture}.
element bezier { bezier_attributes &  bezier_model }

## Attributes for \elementref{bezier}.
bezier_attributes = Common.attributes &  Picture.attributes

## Content model for \elementref{bezier}.
bezier_model = empty

#======================================================================

curve =
## A curve within a \elementref{picture}.
element curve { curve_attributes &  curve_model }

## Attributes for \elementref{curve}.
curve_attributes = Common.attributes &  Picture.attributes

## Content model for \elementref{curve}.
curve_model = empty

#======================================================================

parabola =
## A parabola curve within a \elementref{picture}.
element parabola { parabola_attributes &  parabola_model }

## Attributes for \elementref{parabola}.
parabola_attributes = Common.attributes &  Picture.attributes

## Content model for \elementref{parabola}.
parabola_model = empty

#======================================================================

dots =
## A sequence of dots (?) within a \elementref{picture}.
element dots { dots_attributes &  dots_model }

## Attributes for \elementref{dots}.
dots_attributes = Common.attributes &  Picture.attributes

## Content model for \elementref{dots}.
dots_model = empty

#======================================================================

grid =
## A grid within a \elementref{picture}.
element grid { grid_attributes &  grid_model }

## Attributes for \elementref{grid}.
grid_attributes = Common.attributes &  Picture.attributes

## Content model for \elementref{grid}.
grid_model = empty

#======================================================================

clip =
## Establishes a clipping region within a \elementref{picture}.
element clip { clip_attributes &  clip_model }

## Attributes for \elementref{clip}.
clip_attributes = Common.attributes &  Picture.attributes


## Content model for \elementref{clip}.
clip_model = clippath*

#======================================================================

clippath =
## Establishes a clipping region within a \elementref{picture}.
element clippath { clippath_attributes &  clippath_model }

## Attributes for \elementref{clippath}.
clippath_attributes = Common.attributes &  Picture.attributes

## Content model for \elementref{clippath}.
clippath_model = Picture.class & Inline.class & Misc.class & Meta.class

#======================================================================