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

## This module defines the following `logical' block elements.
Para.class &= para*
    & theorem* & proof*
    &  figure* & table* & float* & listing*

## Additionally, it defines these miscellaneous elements that can appear
## in both inline and block contexts.
Misc.class  &= inline-para*

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

para =
## A Logical paragraph. It has an \attr{id}, but not a \attr{label}.
element para { para_attributes &  para_model }

## Attributes for \elementref{para}.
para_attributes = Common.attributes &  ID.attributes


## Content model for \elementref{para}.
para_model = Block.model

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

inline-para =
## An inline para. Actually, can appear in inline or block mode, but
## typesets its contents as para.
element inline-para { inline-para_attributes &  inline-para_model }

## Attributes for \elementref{inline-para}.
inline-para_attributes = Common.attributes &  Positionable.attributes

## Content model for \elementref{inline-para}.
inline-para_model = Para.model

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

theorem =
## A theorem or similar object. The \attr{class} attribute can be used to distinguish
## different kinds of theorem.
element theorem { theorem_attributes &  theorem_model }

## Attributes for \elementref{theorem}.
theorem_attributes = Common.attributes &  Labelled.attributes

## Content model for \elementref{theorem}.
theorem_model = title? & Para.model

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

proof =
## A proof or similar object. The \attr{class} attribute can be used to distinguish
## different kinds of proof.
element proof { proof_attributes &  proof_model }

## Attributes for \elementref{proof}.
proof_attributes = Common.attributes &  Labelled.attributes

## Content model for \elementref{proof}.
proof_model = title? & Para.model

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

## These are the additional elements representing figure and
## table captions.
## NOTE: Could title sensibly be reused here, instead?
## Or, should caption be used for theorem and proof?
Caption.class = caption | toccaption

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

figure =
## A  figure, possibly captioned.
element figure { figure_attributes &  figure_model }

## Attributes for \elementref{figure}.
figure_attributes = 
  Common.attributes & 
  Labelled.attributes & 
  Positionable.attributes & 

  ## the vertical floating placement parameter that determines where the object is displayed.
  attribute placement { text }?

### MiKo: only allowing one caption, is this right? same for table, float, and listing below
## Content model for \elementref{figure}.
figure_model = figure* & Block.model & Caption.class

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

table =
## A  Table, possibly captioned. This is not necessarily a \elementref{tabular}.
element table { table_attributes &  table_model }

## Attributes for \elementref{table}.
table_attributes = 
  Common.attributes & 
  Labelled.attributes & 
  Positionable.attributes & 

  ## the vertical floating placement parameter that determines where the object is displayed.
  attribute placement { text }?

## Content model for \elementref{table}.
table_model = table* & Block.model & Caption.class

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

float =
## A generic float, possibly captioned, something other than a table, figure or listing
element float { float_attributes &  float_model }

## Attributes for \elementref{float}.
float_attributes = 
  Common.attributes & 
  Labelled.attributes & 
  Positionable.attributes & 

  ## the vertical floating placement parameter that determines where the object is displayed.
  attribute placement { text }?

## Content model for \elementref{float}.
float_model = float* & Block.model & Caption.class

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

listing =
## A Listing, possibly captioned.
element listing { listing_attributes &  listing_model }

## Attributes for \elementref{listing}.
listing_attributes = 
  Common.attributes & 
  Labelled.attributes & 
  Positionable.attributes & 

  ## the floating placement parameter that determines where the object is displayed.
  attribute placement { text }?

## Content model for \elementref{listing}.
listing_model = Block.model  &  Caption.class

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

caption =
## A caption for a \elementref{table} or \elementref{figure}.
element caption { caption_attributes &  caption_model }

## Attributes for \elementref{caption}.
caption_attributes = 
  Common.attributes & 
  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{caption},
## basically Inline.model with tag included (normally, but not necessarily, tag would come first).
caption_model = tag* & text & Inline.class  &  Misc.class & Meta.class

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

toccaption =
## A short form of \elementref{table} or \elementref{figure} caption,
## used for lists of figures or similar.
element toccaption { toccaption_attributes &  toccaption_model }

## Attributes for \elementref{toccaption}.
toccaption_attributes = Common.attributes

### MiKo: here we allowed multiple tags, but now we can restrict, do we want that?
## Content model for \elementref{toccaption}.
toccaption_model = text  &  Inline.class & Misc.class & Meta.class & tag*
#======================================================================