File: LaTeXML-structure.rnc

package info (click to toggle)
latexml 0.8.5-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 27,120 kB
  • sloc: xml: 85,800; perl: 27,488; sh: 245; javascript: 26; makefile: 13
file content (627 lines) | stat: -rw-r--r-- 22,019 bytes parent folder | download
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
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
# /=====================================================================\ 
# |  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 | slide | sidebar

## 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 |  subparagraph | paragraph
   | subsubsection | subsection | section | chapter  | slide | sidebar

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

## Content model for \elementref{part}.
part_model = SectionalFrontMatter.class*, (part.body.class | BackMatter.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 | slide | sidebar

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

## Content model for \elementref{chapter}.
chapter_model = SectionalFrontMatter.class*, (chapter.body.class | BackMatter.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  | slide | sidebar

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

## Content model for \elementref{section}.
section_model = SectionalFrontMatter.class*, (section.body.class | BackMatter.class)*

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

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

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

## Content model for \elementref{subsection}.
subsection_model = SectionalFrontMatter.class*, (subsection.body.class | BackMatter.class)*

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

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

## The content allowable as the main body of a subsubsection.
subsubsection.body.class = Para.model | subparagraph | paragraph | slide | sidebar

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

## Content model for \elementref{subsubsection}.
subsubsection_model = SectionalFrontMatter.class*, (subsubsection.body.class | BackMatter.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 paragraph.
paragraph.body.class = Para.model | subparagraph | slide | sidebar

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

## Content model for \elementref{paragraph}.
paragraph_model = SectionalFrontMatter.class*, (paragraph.body.class | BackMatter.class)*


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

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

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

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

## Content model for \elementref{subparagraph}.
subparagraph_model = SectionalFrontMatter.class*, (subparagraph.body.class | BackMatter.class)*

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

slide =
## A Slide within a slideshow.
## The model currently doesn't enforce this, but the idea is that
## a slideshow document can contain section headings, but all
## real content should be confined to slides.
element slide { slide_attributes, slide_model }

## The content allowable as the main body of a \elementref{slide}.
slide.body.class = Para.model

## Attributes for \elementref{slide}.
slide_attributes = Sectional.attributes

## Content model for \elementref{slide}.
slide_model = SectionalFrontMatter.class*, (slide.body.class | BackMatter.class)*

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

sidebar =
## A Sidebar; a short section-like object that floats outside the main flow.
element sidebar { sidebar_attributes, sidebar_model }

## The content allowable as the main body of a \elementref{sidebar}.
sidebar.body.class = Para.model

## Attributes for \elementref{sidebar}.
sidebar_attributes = Sectional.attributes

## Content model for \elementref{sidebar}.
sidebar_model = (FrontMatter.class | SectionalFrontMatter.class)*, (sidebar.body.class | BackMatter.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  | slide | sidebar

## 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,
  Listing.attributes,

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

  ## the bibliographic style to be used to format the bibliography
  ## (presumably a BibTeX bst file name)
  attribute bibstyle { text }?,

  ## the citation style to be used when citing items from the bibliography
  attribute citestyle { text }?,

  ## whether the bibliographic items should be sorted or in order of citation.
  attribute sort { xsd:boolean }?

## 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,
  Listing.attributes,

  ## The kind of index (obsolete?)
  attribute role { text }?

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

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

indexlist =
## A heirarchical index structure 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

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

glossary =
## An Glossary within a document.
element glossary { glossary_attributes, glossary_model }

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

## Attributes for \elementref{glossary}.
glossary_attributes = 
  Sectional.attributes,
  Listing.attributes,

  ## The kind of glossary
  attribute role { text }?

## Content model for \elementref{glossary}.
glossary_model = SectionalFrontMatter.class*, glossary.body.class*

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

glossarylist =
## A glossary list typically generated during postprocessing
## from the collection of \elementref{glossaryphrase}'s in the document
## (or document collection).
element glossarylist { glossarylist_attributes, glossarylist_model }

## Attributes for \elementref{glossarylist}.
glossarylist_attributes = Common.attributes, ID.attributes

## Content model for \elementref{glossarylist}.
## The model allows loose \elementref{glossaryphrase}'s for data definitions,
## but they are not displayed as part of the list.
glossarylist_model = glossaryentry*

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

glossaryentry =
## An entry in an \elementref{glossarylist} consisting of a phrase,
## (one or more, presumably in increasing detail?), possibly a definition,
## and references to points in the document where the phrase was found.
element glossaryentry { glossaryentry_attributes, glossaryentry_model }

## Attributes for \elementref{glossaryentry}.
glossaryentry_attributes = Common.attributes, ID.attributes,
  ## The kind of glossary
  attribute role { text }?,
  ## a flattened form of the phrase for generating an \attr{ID}.
  attribute key { text }?

## Content model for \elementref{glossaryentry}.
glossaryentry_model = glossaryphrase*, indexrefs?

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

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,
  Fontable.attributes,
  Colorable.attributes,
  Backgroundable.attributes

## 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 = (tag | text | Inline.class | Misc.class | Meta.class)*

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

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 }?,

  ## specifies opening text to display before this creator in a formatted titlepage.
  ## This would be typically appear outside the author information, like "and".
  attribute before { text }?,

  ## specifies closing text, punctuation or conjunction to display after
  ## this creator in a formatted titlepage.
  attribute after { 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,
  Refable.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,
  Refable.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)*

#======================================================================
# Table(s) of Contents

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 lists; space separated names of lists like "toc","lof", etc.
   attribute lists { 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 the scope set of elements to include:
   ## \texttt{current} (default) is all in current document;
   ## \texttt{global} indicates all in the document set;
   ## otherwise an xml:id
   attribute scope { ("current" | "global" | text) }?,

   ## indicates what things to show in each entry
   attribute show { text }?,
   
   ## indicates how to format the listing
   attribute format { ("normal" | "short" | "veryshort" | text) }?

## Content model for \elementref{TOC}.
TOC_model = title?, 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 )*

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

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

  ## Stores RDFa prefixes as space separated pairs,
  ## with the pairs being prefix and url separated by a colon;
  ## this should only appear at the root element.
  attribute rdf-prefixes { text }?

## 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 = tags? | 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 | glossary | acknowledgements
                 | Para.class | Meta.class

Para.class |= TOC

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