File: LaTeXML-misc.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 (126 lines) | stat: -rw-r--r-- 4,574 bytes parent folder | download | duplicates (4)
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
# /=====================================================================\ 
# |  LaTeXML-misc.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"
namespace xhtml = "http://www.w3.org/1999/xhtml"

##  Miscellaneous (Misc) elements are (typically) visible
## elements which don't have clear inline or block character;
## they can appear in both inline and block contexts.
Misc.class  |= inline-block | verbatim | break | graphics | svg | rawhtml | rawliteral

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

inline-block =
## An inline block. Actually, can appear in inline or block mode, but
## typesets its contents as a block.
element inline-block { inline-block_attributes, inline-block_model }

## Attributes for \elementref{inline-block}.
inline-block_attributes =
  Common.attributes,
  ID.attributes,
  Positionable.attributes,
  Transformable.attributes,
  Backgroundable.attributes

## Content model for \elementref{inline-block}.
inline-block_model = Block.model

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

verbatim =
## Verbatim content
element verbatim { verbatim_attributes, verbatim_model }

## Attributes for \elementref{verbatim}.
verbatim_attributes =
  Common.attributes,
  ID.attributes,
  Fontable.attributes,
  Colorable.attributes,
  Backgroundable.attributes

## Content model for \elementref{verbatim}.
verbatim_model = Inline.model

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

break =
## A forced line break.
element break {  break_attributes, break_model }

## Attributes for \elementref{break}.
break_attributes = Common.attributes

## Content model for \elementref{break}.
break_model = empty

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

graphics =
## A graphical insertion of an external file. 
element graphics { graphics_attributes, graphics_model }

## Attributes for \elementref{graphics}.
graphics_attributes =
  Common.attributes,
  ID.attributes,
  Imageable.attributes,

  ## the path to the graphics file. This is the (often minimally specified) path
  ## to a graphics file omitting the type extension.  Once resolved to a specific
  ## image file, the \attr{imagesrc} (from Imageable.attributes) is used.
  attribute graphic { text }?,

  ## a comma separated list of candidate graphics files that could be used to
  ## for \attr{graphic}.  A post-processor or application may choose from these,
  ## or may make its own selection or synthesis to implement the graphic for a given target.
  attribute candidates { text }?,

  ## an encoding of the scaling and positioning options
  ## to be used in processing the graphic.
  attribute options { text }?


## Content model for \elementref{graphics}.
graphics_model = empty

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

svg =
## An SVG (Scalable Vector Graphics) object
## [eventually must adapt to put LaTeXML objects in foreignObject]
grammar {
  include "svg11.rnc"
  { SVG.foreignObject.content = parent Flow.model }
}
#======================================================================

htmlElement = element xhtml:* { (attribute * { text } | text | htmlElement) * }

rawhtml = 
## A container for arbitrary markup in the xhtml namespace
## (not currently validated against any particular html schema)
element rawhtml {  htmlElement * }

#======================================================================
rawliteral =
## A container for even more arbitrary directives like jsp, php, etc
## Doesn't create an element, but an open angle bracket followed by \attr{open}
## then the text content, followed by a close angle bracket followed by \attr{close}.
element rawliteral {
  attribute open { text}?,
  attribute close { text}?,
  text }

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