summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-structure.rnc
blob: 78e42ac8b730ff1a8d6eec74bd3696c1457e4078 (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
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
# /=====================================================================\ 
# |  LaTeXML-structure.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=/

default namespace = "http://dlmf.nist.gov/LaTeXML"

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

document =
## The document root.
element document { document_attributes &  document_model }


## The content allowable as the main body of the document.
document.body.class = Para.model & paragraph* & subsubsection* & subsection* & section* & chapter* & part*

## Attributes for \elementref{document}.
document_attributes = Sectional.attributes


## Content model for \elementref{document}.
document_model =
# (FrontMatter.class & SectionalFrontMatter.class & Meta.class & titlepage*),
#  document.body.class,
  BackMatter.class

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

part =
## A part within a document.
element part { part_attributes &  part_model }

## The content allowable as the main body of a part.
part.body.class = Para.model & chapter*

## Attributes for \elementref{part}.
part_attributes = Sectional.attributes

## Content model for \elementref{part}.
part_model = SectionalFrontMatter.class, part.body.class

#----------------------------------------------------------------------

chapter =
## A Chapter within a document.
element chapter { chapter_attributes &  chapter_model }

## The content allowable as the main body of a chapter.
chapter.body.class = Para.model & subparagraph* & paragraph* & subsubsection* & subsection* & section*

## Attributes for \elementref{chapter}.
chapter_attributes = Sectional.attributes

## Content model for \elementref{chapter}.
chapter_model = SectionalFrontMatter.class, chapter.body.class

#----------------------------------------------------------------------

section =
## A Section within a document.
element section { section_attributes &  section_model }

## The content allowable as the main body of a section.
section.body.class = Para.model & subparagraph* & paragraph* & subsubsection* & subsection*

## Attributes for \elementref{section}.
section_attributes = Sectional.attributes

## Content model for \elementref{section}.
section_model = SectionalFrontMatter.class, section.body.class

#----------------------------------------------------------------------

subsection =
## A Subsection within a document.
element subsection { subsection_attributes &  subsection_model }
  
## The content allowable as the main body of a chapter.
subsection.body.class = Para.model & subparagraph* & paragraph* & subsubsection*

## Attributes for \elementref{subsection}.
subsection_attributes = Sectional.attributes

## Content model for \elementref{subsection}.
subsection_model = SectionalFrontMatter.class, subsection.body.class

#----------------------------------------------------------------------

subsubsection =
## A Subsubsection within a document.
element subsubsection { subsubsection_attributes &  subsubsection_model }

## The content allowable as the main body of a chapter.
subsubsection.body.class = Para.model & subparagraph* & paragraph*

## Attributes for \elementref{subsubsection}.
subsubsection_attributes = Sectional.attributes

## Content model for \elementref{subsubsection}.
subsubsection_model = SectionalFrontMatter.class, subsubsection.body.class

#----------------------------------------------------------------------

paragraph =
## A Paragraph within a document. This corresponds to a `formal' marked, possibly labelled
## LaTeX Paragraph,  in distinction from an unlabelled logical paragraph.
element paragraph { paragraph_attributes &  paragraph_model }

## The content allowable as the main body of a chapter.
paragraph.body.class = Para.model & subparagraph*

## Attributes for \elementref{paragraph}.
paragraph_attributes = Sectional.attributes

## Content model for \elementref{paragraph}.
paragraph_model = SectionalFrontMatter.class, paragraph.body.class


#----------------------------------------------------------------------

subparagraph =
## A Subparagraph within a document.
element subparagraph { subparagraph_attributes &  subparagraph_model }

## The content allowable as the main body of a chapter.
subparagraph.body.class = Para.model

## Attributes for \elementref{subparagraph}.
subparagraph_attributes = Sectional.attributes

## Content model for \elementref{subparagraph}.
subparagraph_model = SectionalFrontMatter.class, subparagraph.body.class

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

appendix =
## An Appendix within a document.
element appendix { appendix_attributes &  appendix_model }

## The content allowable as the main body of a chapter.
appendix.body.class = Para.model & subparagraph* & paragraph* & subsubsection* & subsection* & section*

## Attributes for \elementref{appendix}.
appendix_attributes = Sectional.attributes

## Content model for \elementref{appendix}.
appendix_model = SectionalFrontMatter.class, appendix.body.class

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

bibliography =
## A Bibliography within a document.
element bibliography { bibliography_attributes &  bibliography_model }

## The content allowable as the main body of a chapter.
bibliography.body.class = Para.model & biblist

## Attributes for \elementref{bibliography}.
bibliography_attributes = 
  Sectional.attributes & 

  ## the list of bib files used to create the bibliograph.
  attribute files { text }?

## Content model for \elementref{bibliography}.
bibliography_model = FrontMatter.class, SectionalFrontMatter.class, bibliography.body.class

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

index =
## An Index within a document.
element index { index_attributes &  index_model }

## The content allowable as the main body of a chapter.
index.body.class = Para.model  & indexlist*

## Attributes for \elementref{index}.
index_attributes = Sectional.attributes

## Content model for \elementref{index}.
index_model = SectionalFrontMatter.class, index.body.class

#----------------------------------------------------------------------

indexlist =
## A heirarchical index generated. Typically generated during postprocessing
## from the collection of \elementref{indexmark} in the document
## (or document collection).
element indexlist { indexlist_attributes &  indexlist_model }

## Attributes for \elementref{indexlist}.
indexlist_attributes = Common.attributes &  ID.attributes

## Content model for \elementref{indexlist}.
indexlist_model = indexentry*

#----------------------------------------------------------------------

indexentry =
## An entry in an \elementref{indexlist} consisting of a phrase, references to
## points in the document where the phrase was found, and possibly
## a nested \elementref{indexlist} represented index levels below this one.
element indexentry { indexentry_attributes &  indexentry_model }

## Attributes for \elementref{indexentry}.
indexentry_attributes = Common.attributes &  ID.attributes

## Content model for \elementref{indexentry}.
indexentry_model = indexphrase, indexrefs? , indexlist?

#----------------------------------------------------------------------

indexrefs =
## A container for the references (\elementref{ref}) to where an \elementref{indexphrase} was
## encountered in the document. The model is Inline to allow
## arbitrary text, in addition to the expected \elementref{ref}'s.
element indexrefs { indexrefs_attributes &  indexrefs_model }

## Attributes for \elementref{indexrefs}.
indexrefs_attributes = Common.attributes

## Content model for \elementref{indexrefs}.
indexrefs_model = Inline.model

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

title =
## The title of a document, section or similar document structure container.
element title { title_attributes &  title_model }

## Attributes for \elementref{title}.
title_attributes =
  Common.attributes & 

  ## The font prefered for the title.
  attribute font { text }? &

  ## Indicates the text size to use. (See \elementref{text})
  attribute size { "Huge" | "huge" | "LARGE" | "Large" | "large" | "normal"
                 | "small" | "footnote" | "tiny" | text }? &

  ## the color to use; any CSS compatible color specification.
  attribute color { text }?

## Content model for \elementref{title},
## basically Inline.model with tag included (normally, but not necessarily, tag would come first).
title_model = tag* & text & Inline.class & Misc.class & Meta.class

#----------------------------------------------------------------------

toctitle =
## The short form of a title, for use in tables of contents or similar.
element toctitle { toctitle_attributes &  toctitle_model }

## Attributes for \elementref{toctitle}.
toctitle_attributes = Common.attributes

## Content model for \elementref{toctitle}.
toctitle_model = text & Inline.class & Misc.class & Meta.class & tag*

#----------------------------------------------------------------------

subtitle =
## A subtitle, or secondary title.
element subtitle { subtitle_attributes &  subtitle_model }

## Attributes for \elementref{subtitle}.
subtitle_attributes = Common.attributes

## Content model for \elementref{subtitle}.
subtitle_model = Inline.model

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

creator =
## Generalized document creator.
element creator { creator_attributes &  creator_model }

## The content allowed in authors, editors, etc.
Person.class = personname* & contact*

## Attributes for \elementref{creator}.
creator_attributes = 
  Common.attributes &  FrontMatter.attributes & 

  ## indicates the role of the person in creating the docment.
  ## Commonly useful values are specified, but is open-ended to support extension.
  attribute role { "author" | "editor" | "translator" | "contributor" | "translator" | text }?

## Content model for \elementref{creator}.
creator_model = Person.class & Misc.class

#----------------------------------------------------------------------
# NOTE: This should be aligned with Bibname.

personname =
## A person's name.
element personname { personname_attributes &  personname_model }

## Attributes for \elementref{personname}.
personname_attributes = Common.attributes

## Content model for \elementref{personname}.
personname_model = Inline.model

#----------------------------------------------------------------------

contact =
## Generalized contact information for a document creator.
## Note that this element can be repeated to give different types 
## of contact information (using \attr{role}) for the same creator.
element contact { contact_attributes &  contact_model }

## Attributes for \elementref{contact}.
contact_attributes = 
  Common.attributes &  FrontMatter.attributes & 

  ## indicates the type of contact information contained.
  ## Commonly useful values are specified, but is open-ended to support extension.
  attribute role { "affiliation" | "address" | "current_address" | "email" | "url"
                 | "thanks" | "dedicatory" | text }?

## Content model for \elementref{contact}.
contact_model = Inline.model

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

date =
## Generalized document date.
## Note that this element can be repeated to give the dates
## of different events (using \attr{role}) for the same document.
element date { date_attributes &  date_model }

## Attributes for \elementref{date}.
date_attributes = 
  Common.attributes &  FrontMatter.attributes & 

  ## indicates the relevance of the date to the document.
  ## Commonly useful values are specified, but is open-ended to support extension.
  attribute role { "creation" | "conversion" | "posted" | "received"
                 | "revised" | "accepted" | text }?

## Content model for \elementref{date}.
date_model = Inline.model

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

abstract =
## A document abstract.
element abstract { abstract_attributes &  abstract_model }

## Attributes for \elementref{abstract}.
abstract_attributes = Common.attributes &  FrontMatter.attributes

## Content model for \elementref{abstract}.
abstract_model = Block.model

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

acknowledgements =
## Acknowledgements for the document.
element acknowledgements { acknowledgements_attributes &  acknowledgements_model }

## Attributes for \elementref{acknowledgements}.
acknowledgements_attributes = Common.attributes &  FrontMatter.attributes

## Content model for \elementref{acknowledgements}.
acknowledgements_model = Inline.model

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

keywords =
## Keywords for the document. The content is freeform.
element keywords { keywords_attributes &  keywords_model }

## Attributes for \elementref{keywords}.
keywords_attributes = Common.attributes &  FrontMatter.attributes

## Content model for \elementref{keywords}.
keywords_model = Inline.model

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

classification =
## A classification of the document.
element classification { classification_attributes &  classification_model }

## Attributes for \elementref{classification}.
classification_attributes = Common.attributes &  FrontMatter.attributes & 

  ## indicates what classification scheme was used.
  attribute scheme { text }?

## Content model for \elementref{classification}.
classification_model = Inline.model

#======================================================================
# Fallback

titlepage =
## block of random stuff marked as a titlepage
element titlepage { titlepage_attributes &  titlepage_model }

## Attributes for \elementref{titlepage}.
titlepage_attributes = Sectional.attributes

## Content model for \elementref{titlepage}.
titlepage_model = FrontMatter.class & SectionalFrontMatter.class & Block.class

#======================================================================
# TOC & Navigation; generally added by postprocessing

TOC =
## (Generalized) Table Of Contents, represents table of contents
## as well as list of figures, tables, and other such things.
## This will generally be placed by a \cs{tableofcontents} command
## and filled in by postprocessing.
element TOC { TOC_attributes &  TOC_model }

## Attributes for \elementref{TOC}.
TOC_attributes =
   Common.attributes & 
   FrontMatter.attributes & 

   ## indicates the kind of list
   attribute role { ("contents" | "figures" | "tables" | text) }? &

   ## indicates what kind of document elements to list, in the form of
   ## one or more tags such as \texttt{ltx:chapter} separated by \texttt{|}
   ## (suggestive of an xpath expression).
   attribute select { text }? &

   ## indicates how to format the listing
   attribute format { ("normal" | "short" | "veryshort" | text) }?

## Content model for \elementref{TOC}.
TOC_model = toclist?

toclist =
## The actual table of contents list, filled in.
element toclist {toclist_attributes &  toclist_model }

## Attributes for \elementref{toclist}.
toclist_attributes = Common.attributes

## Content model for \elementref{toclist}.
toclist_model = tocentry*

tocentry =
## An entry in a \elementref{toclist}.
element tocentry { tocentry_attributes &  tocentry_model }

## Attributes for \elementref{tocentry}.
tocentry_attributes = Common.attributes

## Content model for \elementref{tocentry}.
tocentry_model =  ref* & toclist*


navigation =
## Records navigation cross-referencing information, links from the
## current page or document to related ones, up, down, previous, next,
## and so forth; these relations are recorded in the \attr{class} attribute
## of the \elementref{ref}.
##
## \emph{Really?}; overload the class attribute!?
## This should be \attr{role}!
## Could also use a navigation name text or something?
element navigation { navigation_attributes &  navigation_model }

## Attributes for \elementref{navigation}.
navigation_attributes = Common.attributes

## Content model for \elementref{navigation}.
navigation_model = ref* & TOC*

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

## Attributes shared by all sectional elements
Sectional.attributes =
  Common.attributes & 
  Labelled.attributes

## Attributes for other elements that can be used in frontmatter.
FrontMatter.attributes =
  ## Records the name of the type of object this is to be used when composing the
  ## presentation.  The value of this attribute is often set by language localization packages.
  attribute name { text }?

## The content allowed for the front matter of each sectional unit,
## and the document.
SectionalFrontMatter.class = title* & toctitle* & creator*

## The content allowed (in addition to \patternref{SectionalFrontMatter.class})
## for the front matter of a document.
FrontMatter.class = subtitle* & date* & abstract* & acknowledgements* & keywords* & classification

## The content allowed a the end of a document.
## Note that this includes random trailing Block and Para material,
## to support articles with figures and similar data appearing `at end'.
BackMatter.class = bibliography* & appendix* & index* & acknowledgements*  & Para.class & Meta.class

Para.class &= TOC* & navigation*

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