@amermathsoc/texml-to-html 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/CHANGELOG.md +1414 -0
  2. package/LICENSE +202 -0
  3. package/NOTICE +5 -0
  4. package/README.md +16 -0
  5. package/examples/cli.js +6 -0
  6. package/ldom.js +6 -0
  7. package/lib/doms.js +30 -0
  8. package/lib/elements/abstract.js +34 -0
  9. package/lib/elements/algorithm.js +78 -0
  10. package/lib/elements/app.js +35 -0
  11. package/lib/elements/article-metadata-json.js +167 -0
  12. package/lib/elements/article-title.js +26 -0
  13. package/lib/elements/article.js +28 -0
  14. package/lib/elements/attrib.js +41 -0
  15. package/lib/elements/bold.js +32 -0
  16. package/lib/elements/book-meta-json.js +134 -0
  17. package/lib/elements/book-meta.js +33 -0
  18. package/lib/elements/book-title.js +26 -0
  19. package/lib/elements/boxed-text.js +31 -0
  20. package/lib/elements/break.js +25 -0
  21. package/lib/elements/caption.js +52 -0
  22. package/lib/elements/compound-kwd.js +27 -0
  23. package/lib/elements/def-item.js +26 -0
  24. package/lib/elements/def-list.js +30 -0
  25. package/lib/elements/def.js +29 -0
  26. package/lib/elements/disp-formula-group.js +30 -0
  27. package/lib/elements/disp-quote.js +33 -0
  28. package/lib/elements/email.js +28 -0
  29. package/lib/elements/ext-link.js +38 -0
  30. package/lib/elements/fig.js +32 -0
  31. package/lib/elements/fn.js +42 -0
  32. package/lib/elements/formula.js +51 -0
  33. package/lib/elements/front.js +64 -0
  34. package/lib/elements/funding-group.js +26 -0
  35. package/lib/elements/graphic.js +49 -0
  36. package/lib/elements/img.js +28 -0
  37. package/lib/elements/italic.js +33 -0
  38. package/lib/elements/kwd-group.js +29 -0
  39. package/lib/elements/kwd.js +26 -0
  40. package/lib/elements/label.js +101 -0
  41. package/lib/elements/line.js +31 -0
  42. package/lib/elements/meta-name.js +29 -0
  43. package/lib/elements/meta-value.js +27 -0
  44. package/lib/elements/mixed-citation.js +35 -0
  45. package/lib/elements/monospace.js +35 -0
  46. package/lib/elements/notes.js +36 -0
  47. package/lib/elements/p.js +29 -0
  48. package/lib/elements/preface.js +33 -0
  49. package/lib/elements/ref-list.js +50 -0
  50. package/lib/elements/ref.js +28 -0
  51. package/lib/elements/roman.js +34 -0
  52. package/lib/elements/sans-serif.js +34 -0
  53. package/lib/elements/sc.js +35 -0
  54. package/lib/elements/sec-meta.js +35 -0
  55. package/lib/elements/sec.js +89 -0
  56. package/lib/elements/secheading.js +43 -0
  57. package/lib/elements/simpletabbing.js +29 -0
  58. package/lib/elements/statement.js +31 -0
  59. package/lib/elements/string-name.js +28 -0
  60. package/lib/elements/styled-content.js +32 -0
  61. package/lib/elements/subj-group.js +29 -0
  62. package/lib/elements/subject.js +26 -0
  63. package/lib/elements/subtitle.js +29 -0
  64. package/lib/elements/table.js +28 -0
  65. package/lib/elements/tag.js +50 -0
  66. package/lib/elements/target.js +39 -0
  67. package/lib/elements/term.js +31 -0
  68. package/lib/elements/tex-math.js +34 -0
  69. package/lib/elements/text.js +29 -0
  70. package/lib/elements/toc-entry.js +63 -0
  71. package/lib/elements/toc.js +35 -0
  72. package/lib/elements/underline.js +26 -0
  73. package/lib/elements/x.js +27 -0
  74. package/lib/elements/xref-group.js +36 -0
  75. package/lib/elements/xref.js +89 -0
  76. package/lib/hacks.js +43 -0
  77. package/lib/head.js +38 -0
  78. package/lib/helpers/copyElement.js +29 -0
  79. package/lib/helpers/extractContribGroups.js +94 -0
  80. package/lib/helpers/generateByline.js +35 -0
  81. package/lib/helpers/getParentLevel.js +24 -0
  82. package/lib/helpers/helpers-tex.js +54 -0
  83. package/lib/helpers/mapAttributes.js +54 -0
  84. package/lib/helpers/mapColorAttributes.js +36 -0
  85. package/lib/helpers/unnest.js +34 -0
  86. package/lib/transformer.js +311 -0
  87. package/out.html +550 -0
  88. package/package.json +39 -0
  89. package/test/article--alttitle.xml +146 -0
  90. package/test/article--nometa.xml +40 -0
  91. package/test/article-alttitle-meta-snapshot.json +94 -0
  92. package/test/article-meta-snapshot.json +129 -0
  93. package/test/article-nometa-meta-snapshot.json +46 -0
  94. package/test/article.xml +593 -0
  95. package/test/attribute-content-type.js +26 -0
  96. package/test/attribute-has-qed-box.js +28 -0
  97. package/test/attribute-hidden.js +27 -0
  98. package/test/attribute-rowspan-colspan.js +27 -0
  99. package/test/attribute-specific-use.js +27 -0
  100. package/test/attribute-style.js +27 -0
  101. package/test/book-meta-snapshot.json +78 -0
  102. package/test/book.xml +292 -0
  103. package/test/copyElement.js +38 -0
  104. package/test/element-abstract-title.js +27 -0
  105. package/test/element-algorithm.js +56 -0
  106. package/test/element-article.js +24 -0
  107. package/test/element-attrib.js +27 -0
  108. package/test/element-back-app-group-app.js +28 -0
  109. package/test/element-bold.js +26 -0
  110. package/test/element-book-meta.js +37 -0
  111. package/test/element-book-preface.js +29 -0
  112. package/test/element-book-ref-list.js +32 -0
  113. package/test/element-book.js +33 -0
  114. package/test/element-boxed-text.js +28 -0
  115. package/test/element-break.js +27 -0
  116. package/test/element-citegroup.js +25 -0
  117. package/test/element-compound-kwd.js +24 -0
  118. package/test/element-def-list-def-item-def-term.js +43 -0
  119. package/test/element-disp-formula-group.js +27 -0
  120. package/test/element-disp-quote.js +31 -0
  121. package/test/element-email.js +26 -0
  122. package/test/element-ext-link.js +30 -0
  123. package/test/element-fig-subfig-label.js +38 -0
  124. package/test/element-fn.js +40 -0
  125. package/test/element-front.js +45 -0
  126. package/test/element-funding-group.js +29 -0
  127. package/test/element-graphic-inline-graphic.js +40 -0
  128. package/test/element-img.js +30 -0
  129. package/test/element-inline-formula-disp-formula-tex-math.js +91 -0
  130. package/test/element-italic.js +28 -0
  131. package/test/element-kwd-group.js +28 -0
  132. package/test/element-kwd.js +27 -0
  133. package/test/element-mixed-citation.js +32 -0
  134. package/test/element-monospace.js +27 -0
  135. package/test/element-notes.js +42 -0
  136. package/test/element-p-p.js +27 -0
  137. package/test/element-ref-list-ref-label.js +40 -0
  138. package/test/element-roman.js +27 -0
  139. package/test/element-sans-serif.js +27 -0
  140. package/test/element-sc.js +27 -0
  141. package/test/element-sec-app-front-matter-part-dedication-title-label.js +87 -0
  142. package/test/element-sec-meta.js +43 -0
  143. package/test/element-secheading.js +28 -0
  144. package/test/element-simpletabbing-line.js +31 -0
  145. package/test/element-statement-label-title.js +120 -0
  146. package/test/element-string-name.js +27 -0
  147. package/test/element-stripEmptyLabel.js +26 -0
  148. package/test/element-styled-content.js +28 -0
  149. package/test/element-subtitle.js +36 -0
  150. package/test/element-table-wrap-group.js +30 -0
  151. package/test/element-table-wrap.js +51 -0
  152. package/test/element-table.js +34 -0
  153. package/test/element-tag.js +38 -0
  154. package/test/element-target.js +33 -0
  155. package/test/element-toc-toc-entry.js +77 -0
  156. package/test/element-underline.js +27 -0
  157. package/test/element-verse-group.js +28 -0
  158. package/test/element-x.js +30 -0
  159. package/test/element-xref-group.js +26 -0
  160. package/test/element-xref.js +32 -0
  161. package/test/hacks.js +37 -0
  162. package/test/helper-mapColorAttributes.js +27 -0
  163. package/test/helper.js +26 -0
  164. package/test/setHead.js +32 -0
  165. package/test/unit/abstract.js +35 -0
  166. package/texml-to-html.js +32 -0
@@ -0,0 +1,593 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD with MathML3 v1.1d1 20130915//EN" "JATS-archivearticle1-mathml3.dtd">
3
+ <article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:html="http://www.w3.org/1999/html">
4
+ <front>
5
+ <article-meta>
6
+ <kwd-group
7
+ vocab="MSC scheme"
8
+ vocab-identifier="https://mathscinet.ams.org/msc/msc2020.html">
9
+ <compound-kwd content-type="primary">
10
+ <compound-kwd-part content-type="code">key1</compound-kwd-part>
11
+ <compound-kwd-part content-type="text">Formal groups, <inline-formula content-type="math/tex"><tex-math>p</tex-math></inline-formula>-divisible groups</compound-kwd-part>
12
+ </compound-kwd>
13
+ <compound-kwd content-type="primary">
14
+ <compound-kwd-part content-type="code">key2</compound-kwd-part>
15
+ <compound-kwd-part content-type="text">desc2</compound-kwd-part>
16
+ </compound-kwd>
17
+ <compound-kwd content-type="secondary">
18
+ <compound-kwd-part content-type="code">key3</compound-kwd-part>
19
+ <compound-kwd-part content-type="text">desc3</compound-kwd-part>
20
+ </compound-kwd>
21
+ <compound-kwd content-type="secondary">
22
+ <compound-kwd-part content-type="code">key4</compound-kwd-part>
23
+ <compound-kwd-part content-type="text">desc4</compound-kwd-part>
24
+ </compound-kwd>
25
+ </kwd-group>
26
+ <contrib-group content-type="contribAs">
27
+ <contrib contrib-type="contribA">
28
+ <contrib-id contrib-id-type="mrauth">mrauthid</contrib-id>
29
+ <contrib-id contrib-id-type="orcid">orcidid</contrib-id>
30
+ <name name-style="western">
31
+ <surname>Sur</surname>
32
+ <given-names>Given</given-names>
33
+ </name>
34
+ <xref ref-type="aff" rid="aff"/>
35
+ <email>email</email>
36
+ <uri>uri</uri>
37
+ </contrib>
38
+ <contrib contrib-type="contribA">
39
+ <contrib-id contrib-id-type="mrauth">mrauthid</contrib-id>
40
+ <contrib-id contrib-id-type="orcid">orcidid</contrib-id>
41
+ <name name-style="western">
42
+ <surname>Sur2</surname>
43
+ <given-names>Given2</given-names>
44
+ </name>
45
+ <xref ref-type="aff" rid="aff"/>
46
+ <email>email</email>
47
+ <uri>uri</uri>
48
+ </contrib>
49
+ <aff id="aff">aff</aff>
50
+ <author-comment>comment</author-comment>
51
+ </contrib-group>
52
+ <contrib-group content-type="contribBs">
53
+ <contrib contrib-type="contribB">
54
+ <contrib-id contrib-id-type="mrauth">mrauthid</contrib-id>
55
+ <contrib-id contrib-id-type="orcid">orcidid</contrib-id>
56
+ <name name-style="western">
57
+ <surname>Sur</surname>
58
+ <given-names>Given</given-names>
59
+ <suffix>Jr.</suffix>
60
+ </name>
61
+ <xref ref-type="aff" rid="aff1"/>
62
+ <xref ref-type="aff" rid="aff2"/>
63
+ <email>address1</email>
64
+ <email>address2</email>
65
+ <uri>uri</uri>
66
+ </contrib>
67
+ <aff id="aff1" specific-use="current">Aff1</aff>
68
+ <aff id="aff2">Aff2</aff>
69
+ <author-comment>comment</author-comment>
70
+ </contrib-group>
71
+ <funding-group>
72
+ <funding-statement>Funding 1</funding-statement>
73
+ <funding-statement>Funding 2.</funding-statement>
74
+ </funding-group>
75
+ <permissions>
76
+ <copyright-statement/>
77
+ </permissions>
78
+ <self-uri xlink:href="href" content-type="abstract"/>
79
+ <self-uri xlink:href="href" content-type="pdf"/>
80
+ <related-article related-article-type="erratum-forward">
81
+ <pub-id pub-id-type="pii">S0894-0347-2023-01025-2</pub-id>
82
+ <ext-link ext-link="https://www.ams.org/jams/2023-36-04/S0894-0347-2023-01025-2/">J. Amer. Math. Soc. 36 (2023), 1305-1308.</ext-link>
83
+ </related-article>
84
+ <article-citation/>
85
+ <kwd-group>
86
+ <kwd>keyword</kwd>
87
+ </kwd-group>
88
+ <custom-meta-group>
89
+ <custom-meta specific-use="communicated-by">
90
+ <meta-name>meta-name</meta-name>
91
+ <meta-value>meta-value</meta-value>
92
+ </custom-meta>
93
+ </custom-meta-group>
94
+ <custom-meta-group>
95
+ <custom-meta specific-use="titlepic">
96
+ <meta-name>titlepic</meta-name>
97
+ <meta-value>
98
+ <inline-graphic height="218pt" mimetype="image/svg+xml" width="493pt" xlink:href="Images/imgc920fa78a62d5705041ab0ad31b3c7df.svg"/>
99
+ </meta-value>
100
+ </custom-meta>
101
+ </custom-meta-group>
102
+ <title-group>
103
+ <article-title>article-title</article-title>
104
+ </title-group>
105
+ <volume>volume</volume>
106
+ <issue>issue</issue>
107
+ <pub-date date-type="pub" iso-8601-date="2000-04-13" publication-format="electronic">
108
+ <day>13</day>
109
+ <month>4</month>
110
+ <year>2000</year>
111
+ </pub-date>
112
+ <history>
113
+ <date date-type="received" iso-8601-date="1999-09-15">
114
+ <day>15</day>
115
+ <month>9</month>
116
+ <year>1999</year>
117
+ </date>
118
+ <date date-type="rev-recd" iso-8601-date="2000-07-01">
119
+ <day>1</day>
120
+ <month>7</month>
121
+ <year>2000</year>
122
+ </date>
123
+ <date date-type="rev-recd" iso-8601-date="2000-07-02">
124
+ <day>2</day>
125
+ <month>7</month>
126
+ <year>2000</year>
127
+ </date>
128
+ <date date-type="xml-last-modified" iso-8601-date="2019-07-04T02:36:54Z">
129
+ <string-date>2019-07-04T02:36:54Z</string-date>
130
+ </date>
131
+ </history>
132
+ <volume>1</volume>
133
+ <issue>11</issue>
134
+ <article-id pub-id-type="doi">doi</article-id>
135
+ <article-id pub-id-type="pii">pii</article-id>
136
+ <article-id pub-id-type="mr">mr</article-id>
137
+ <article-id pub-id-type="manuscript">manuscriptId</article-id>
138
+ <abstract>
139
+ <title>Abstract</title>
140
+ </abstract>
141
+ </article-meta>
142
+ <journal-meta>
143
+ <journal-id journal-id-type="publisher">journalId</journal-id>
144
+ <journal-title-group>
145
+ <journal-title>journal-title</journal-title>
146
+ <abbrev-journal-title>abbrev-journal-title</abbrev-journal-title>
147
+ </journal-title-group>
148
+ <issn publication-format="print">print</issn>
149
+ <issn publication-format="electronic">electronic</issn>
150
+ <publisher>
151
+ <publisher-name>publisher-name</publisher-name>
152
+ <publisher-loc>publisher-loc</publisher-loc>
153
+ </publisher>
154
+ <self-uri xlink:href="href"/>
155
+ </journal-meta>
156
+ <notes notes-type="dedication"/>
157
+ </front>
158
+ <body>
159
+ <sec id="sec" disp-level="1" specific-use="section">
160
+ <styled-content style-type="type"/>
161
+ <italic/>
162
+ <italic toggle="yes"/>
163
+ <bold/>
164
+ <roman/>
165
+ <sc/>
166
+ <monospace/>
167
+ <underline/>
168
+ <sans-serif/>
169
+ <disp-quote specific-use="use">
170
+ <attrib/>
171
+ </disp-quote>
172
+ <boxed-text content-type="framed">
173
+ <p>A boxed paragraph from framed input</p>
174
+ </boxed-text>
175
+ <boxed-text content-type="tcolorbox" position="anchor" border-color="black" background-color="lightgray" border-style="solid" border-width="medium">
176
+ <p>A boxed paragraph from tcolorbox input</p>
177
+ </boxed-text>
178
+ <p>
179
+ <disp-quote specific-use="use">
180
+ <attrib/>
181
+ </disp-quote>
182
+ </p>
183
+ <p>
184
+ <disp-quote content-type="epigraph">
185
+ <attrib/>
186
+ </disp-quote>
187
+ </p>
188
+ <fig id="figattrib">
189
+ <caption>Caption</caption>
190
+ <attrib>Attrib</attrib>
191
+ </fig>
192
+ <xref ref-type="type" rid="rid1">ref</xref>
193
+ <xref ref-type="fn" rid="rid2">ref</xref>
194
+ <xref ref-type="bibr" rid="rid3">ref</xref>
195
+ <xref ref-type="bibr" rid="rid4">ref<x>,</x> note</xref>
196
+ <xref ref-type="type" rid="rid5"><x>Context</x> ref</xref>
197
+ <xref ref-type="type">ref</xref>
198
+ <xref ref-type="nested" rid="rid6"><ext-link xlink:href="https://nested"></ext-link></xref>
199
+ <ext-link xlink:href="https://nested2"><xref ref-type="nested" rid="rid6"></xref></ext-link>
200
+ <fn><label>Label</label></fn>
201
+ <p id="pwithx">Is <x>not</x> ignored.</p>
202
+ <!-- element-p-p.js -->
203
+ <p id="pid1"><p/></p>
204
+ <def-list id="pid2">
205
+ <def-item id="term1">
206
+ <term>•</term>
207
+ <def><p/></def>
208
+ </def-item>
209
+ </def-list>
210
+ <fn id="pid3"><label/><p/></fn>
211
+ <def-list id="dlist1" content-type="itemize" html:style="list-style-type: disc">
212
+ <def-item id="ditem1">
213
+ <term>•</term>
214
+ <def><p>Item 1</p></def>
215
+ </def-item>
216
+ </def-list>
217
+ <ext-link xlink:href="https://"></ext-link>
218
+ <table-wrap>
219
+ <label>Table 1</label>
220
+ <caption>Caption</caption>
221
+ <table class="tbl"><thead><tr><th>Head 1</th><th>Head 2</th></tr></thead><tbody><tr><td id="tdattributes" colspan="1" rowspan="2"></td><td hidden="true"/></tr></tbody></table>
222
+ </table-wrap>
223
+ <table-wrap-group>
224
+ <label>Table with subtables</label>
225
+ <caption>Caption</caption>
226
+ <table-wrap>
227
+ <label>a</label>
228
+ <caption>Sub-caption</caption>
229
+ <table class="tbl"></table>
230
+ </table-wrap>
231
+ <table-wrap>
232
+ <label>b</label>
233
+ <caption>Sub-caption</caption>
234
+ <table class="tbl"></table>
235
+ </table-wrap>
236
+ </table-wrap-group>
237
+ <break></break>
238
+ <string-name></string-name>
239
+ <target id="target"></target>
240
+ <verse-group></verse-group>
241
+ <statement id="emptyLabel">
242
+ <label/>
243
+ </statement>
244
+ <statement id="titleEmptyLabel">
245
+ <label/>
246
+ <title>Title</title>
247
+ </statement>
248
+ <sup>1</sup>
249
+ <sub>1</sub>
250
+ <pre>preformatted</pre>
251
+ <hr/>
252
+ </sec>
253
+ <!-- sec, ack, app, front-matter-part, dedication & their title, label -->
254
+ <ack id="ack1" disp-level="1">
255
+ </ack>
256
+ <front-matter-part id="ack2" disp-level="1">
257
+ <title>Acknowledg</title>
258
+ </front-matter-part>
259
+ <front-matter-part id="intro1" disp-level="1">
260
+ <title>Introduction</title>
261
+ </front-matter-part>
262
+ <sec id="ack3" disp-level="1" specific-use="section">
263
+ <title>Acknowledg</title>
264
+ </sec>
265
+ <sec id="intro2" disp-level="1" specific-use="section">
266
+ <title>Introduction</title>
267
+ </sec>
268
+ <front-matter>
269
+ <dedication id="ded"/>
270
+ </front-matter>
271
+
272
+ <sec id="subsec" disp-level="2" specific-use="subsection">
273
+ <label>Subsection</label>
274
+ </sec>
275
+ <sec id="seclabeltitle" disp-level="1" specific-use="section">
276
+ <label>Label</label>
277
+ <title>Title</title>
278
+ </sec>
279
+ <sec id="seclabel" disp-level="1" specific-use="section">
280
+ <label>Label</label>
281
+ <subtitle>Subtitle</subtitle>
282
+ </sec>
283
+ <sec id="sectitle" disp-level="1" specific-use="section">
284
+ <title>Title</title>
285
+ <subtitle>Subtitle</subtitle>
286
+ </sec>
287
+ <sec id="refhead" disp-level="1" specific-use="refhead">
288
+ <title>Refhead</title>
289
+ </sec>
290
+ <!-- statement -->
291
+ <sec disp-level="1" id="statements" specific-use="section">
292
+ <statement content-type="content type" id="statement1" style="style">
293
+ <label>Label 1</label>
294
+ <title>Title 1</title>
295
+ <p></p>
296
+ </statement>
297
+ <statement content-type="content type" id="statement2" style="style">
298
+ <label>Label 2</label>
299
+ <p></p>
300
+ </statement>
301
+ <statement content-type="content type" id="statement3" style="style">
302
+ <title>Title 3</title>
303
+ <p></p>
304
+ </statement>
305
+ <statement content-type="content type" id="statement-title-period" style="style">
306
+ <title>Title 4.</title>
307
+ <p></p>
308
+ </statement>
309
+ <statement content-type="proof proof" has-qed-box="true" id="statement4">
310
+ <title>Proof</title>
311
+ <secheading id="statement4secheading" disp-level="3" specific-use="subsection">
312
+ <title>secheading</title>
313
+ </secheading>
314
+ </statement>
315
+ <statement content-type="proof proof" has-qed-box="true" id="statement5">
316
+ <label>Label 5</label>
317
+ <title>Proof</title>
318
+ <secheading id="statement5secheading" disp-level="3" specific-use="subsection">
319
+ <label>secheading</label>
320
+ </secheading>
321
+ </statement>
322
+ <statement content-type="proof proof" has-qed-box="true" id="statement6">
323
+ <secheading id="statement6secheading" disp-level="3" specific-use="subsection">
324
+ <label>Label 6</label>
325
+ <title>secheading</title>
326
+ </secheading>
327
+ </statement>
328
+ <statement content-type="proof proof" has-qed-box="true" id="statement7">
329
+ <statement content-type="content type" id="statement8" style="style">
330
+ <label>Nested Theorem</label>
331
+ </statement>
332
+ </statement>
333
+ <def-list id="statementlist">
334
+ <def-item id="statementlistterm">
335
+ <term>•</term>
336
+ <def>
337
+ <statement content-type="content type" id="statement9" style="style">
338
+ <label>Label 1</label>
339
+ <title>Title 1</title>
340
+ <p></p>
341
+ </statement>
342
+ </def>
343
+ </def-item>
344
+ </def-list>
345
+ </sec>
346
+ <!-- fig, fig-group, caption, label -->
347
+ <sec disp-level="1" id="figures" specific-use="section">
348
+ <fig position="anchor" id="position">
349
+ <label>Label 1</label>
350
+ <caption>Caption 1</caption>
351
+ </fig>
352
+ <fig-group specific-use="special">
353
+ <label>Grouplabel 1</label>
354
+ <caption>Groupcaption 1</caption>
355
+ <fig>
356
+ <label>Sublabel 1</label>
357
+ <caption>Subcaption 1</caption>
358
+ </fig>
359
+ </fig-group>
360
+ <fig>
361
+ <label>Label 2</label>
362
+ </fig>
363
+ <fig-group>
364
+ <label>Grouplabel 2</label>
365
+ <fig>
366
+ <label>Sublabel 2</label>
367
+ </fig>
368
+ </fig-group>
369
+ </sec>
370
+ <!-- graphic, inline-graphic, img -->
371
+ <sec disp-level="1" id="graphics" specific-use="section">
372
+ <fig>
373
+ <graphic height="100pt" mimetype="mime" width="100" xlink:href="file" specific-use="use"/>
374
+ <alt-text>text</alt-text>
375
+ </fig>
376
+ <inline-graphic height="height" mimetype="mime" width="width" xlink:href="file" specific-use="use"/>
377
+ <img src="file" alt="text"></img>
378
+ </sec>
379
+ <!-- inline-formula, disp-formula, tex-math -->
380
+ <sec disp-level="1" id="equations" specific-use="section">
381
+ <p>
382
+ <inline-formula has-qed-box="true">
383
+ <!-- NOTE thinspace in text element to test preservation of unicode spacing characters -->
384
+ <tex-math><text>Te#t </text><xref ref-type="fn" rid="fnid1">1</xref><fn id="fnid"><label>1</label><p><xref ref-type="fn" rid="fnid1">1</xref></p></fn><xref ref-type="other" rid="otherid1"></xref></tex-math>
385
+ </inline-formula>
386
+ </p>
387
+ <disp-formula><tex-math has-qed-box="true"><xref ref-type="fn" rid="fnid2">2</xref><fn id="fnid2"><label/></fn><text>Start<xref ref-type="other" rid="otherid2">$</xref>End</text></tex-math></disp-formula>
388
+ <disp-formula>
389
+ <tex-math>
390
+ <text><roman>roman#</roman> <sc>sc$</sc> <italic>italic_</italic> <bold>bold$</bold> <sans-serif>sans-serif&amp;</sans-serif> <monospace>monospace</monospace> <ext-link xlink:href="https://ext~">ext-link~</ext-link> inside text</text>
391
+ </tex-math>
392
+ </disp-formula>
393
+ <disp-formula-group id="disp-formula-group">
394
+ <label>Formula Group</label>
395
+ <disp-formula><tex-math>x</tex-math></disp-formula>
396
+ </disp-formula-group>
397
+ <p>
398
+ <inline-formula>
399
+ <tex-math><text>Te$t<inline-formula><tex-math>x^2</tex-math></inline-formula></text></tex-math>
400
+ </inline-formula>
401
+ </p>
402
+ <disp-formula content-type="math/tex">
403
+ <tex-math>
404
+ x = <inline-graphic height="12pt" mimetype="image/svg+xml" width="12pt" xlink:href="Images/test.svg"/>
405
+ </tex-math>
406
+ </disp-formula>
407
+ <!-- formula with footnote with formula -->
408
+ <disp-formula><tex-math><xref ref-type="fn" rid="fnid5">5</xref><fn id="fnid5"><label/><inline-formula><tex-math>x</tex-math></inline-formula></fn>y</tex-math></disp-formula>
409
+ <!-- formula with nested math but implicit text context -->
410
+ <disp-formula><tex-math><tag parens="yes"><inline-formula><tex-math>x</tex-math></inline-formula></tag></tex-math></disp-formula>
411
+ <!-- formula with nested math but implicit text context -->
412
+ <disp-formula><tex-math><target id="targetMath">_<tag parens="yes"><inline-formula><tex-math>x</tex-math></inline-formula></tag></target></tex-math></disp-formula>
413
+ <!-- formula with multiple tags -->
414
+ <disp-formula><tex-math><tag parens="yes">PlainTag</tag><target id="targetMath2"><tag parens="yes"><inline-formula><tex-math>\mathbb{N}</tex-math></inline-formula></tag></target><target id="targetMath3"><tag parens="yes">TextTag</tag></target></tex-math></disp-formula>
415
+ <disp-formula><tex-math><tag parens="no">tag*</tag></tex-math></disp-formula>
416
+ <disp-formula content-type="text">
417
+ <p>Some lengthy complex text fragment.</p>
418
+ <target id="textEquation">
419
+ <tag parens="yes">T</tag>
420
+ </target>
421
+ </disp-formula>
422
+ </sec>
423
+ <!-- inline-formula, disp-formula, tex-math -->
424
+ <sec disp-level="1" id="citegroup" specific-use="section">
425
+ <cite-group><x>[</x><xref ref-type="type" rid="rid1">ref</xref><x>, </x><xref ref-type="fn" rid="rid2">ref</xref><x>]</x></cite-group>
426
+ </sec>
427
+
428
+ <!-- alt-title -->
429
+ <sec disp-level="1" id="alttitle" specific-use="section">
430
+ <title>Title</title>
431
+ <alt-title>Alt title</alt-title>
432
+ </sec>
433
+
434
+ <!-- styled content with color -->
435
+ <sec disp-level="1" id="styled_color" specific-use="section">
436
+ <title>Color</title>
437
+ <styled-content background-color="rgb(0.000%, 0.000%, 1.000%)" border-color="rgb(0, 140, 10)" border-width="thin" border-style="solid" text-color="Teal">Styled content with color</styled-content>
438
+ </sec>
439
+ <!-- multiple footnotes -->
440
+ <p id="multifootnotes">
441
+ <xref ref-type="fn" rid="fnid3">4</xref><fn id="fnid3"><label>3</label><p>Footnote 3</p></fn>
442
+ <xref ref-type="fn" rid="fnid4">4</xref><fn id="fnid4"><label>4</label><p>Footnote 4</p></fn>
443
+ </p>
444
+ <sec disp-level="1" id="alg:algorithm" specific-use="section">
445
+ <title>Algorithm sample</title>
446
+ <alg:algorithm linenodelimiter=":">
447
+ <alg:line>
448
+ <alg:require>
449
+ <bold>Require:</bold> something</alg:require>
450
+ </alg:line>
451
+ <alg:line>
452
+ <alg:statement>Statement</alg:statement>
453
+ <alg:comment>Comment</alg-comment>
454
+ </alg:line>
455
+ <alg:if>
456
+ <alg:condition>
457
+ <alg:line>
458
+ <alg:statement>
459
+ <bold>if</bold> condition <bold>then</bold></alg:statement>
460
+ </alg:line>
461
+ </alg:condition>
462
+ <alg:block>
463
+ <alg:line lineno="3">
464
+ <alg:statement>true</alg:statement>
465
+ </alg:line>
466
+ </alg:block>
467
+ <alg:else>
468
+ <alg:line lineno="6">
469
+ <alg:statement>
470
+ <bold>else</bold>
471
+ </alg:statement>
472
+ </alg:line>
473
+ <alg:block>
474
+ <alg:line>
475
+ <alg:statement>false</alg:statement>
476
+ </alg:line>
477
+ <alg:block>
478
+ <alg:line lineno="8">
479
+ <alg:statement>Nested for loop</alg:statement>
480
+ </alg:line>
481
+ <alg:for>
482
+ <alg:condition>
483
+ <alg:line lineno="9">
484
+ <alg:statement>
485
+ <bold>for</bold> condition <bold>do</bold></alg:statement>
486
+ </alg:line>
487
+ </alg:condition>
488
+ <alg:block>
489
+ <alg:line lineno="10">
490
+ <alg:statement>loop</alg:statement>
491
+ </alg:line>
492
+ </alg:block>
493
+ <alg:line lineno="">
494
+ <alg:statement>
495
+ <bold>end</bold> <bold>for</bold></alg:statement>
496
+ </alg:line>
497
+ </alg:for>
498
+ </alg:block>
499
+ </alg:block>
500
+ </alg:else>
501
+ <alg:line>
502
+ <alg:statement><bold>end</bold> <bold>if</bold></alg:statement>
503
+ </alg:line>
504
+ </alg:if>
505
+ <alg:function>
506
+ <alg:line><alg:statement><bold>Function</bold> <sc>Check</sc></alg:line>
507
+ </alg:function>
508
+ <alg:procedure>
509
+ <alg:line><alg:statement><bold>Procedure</bold> <sc>Do</sc></alg:line>
510
+ </alg:procedure>
511
+ </alg:algorithm>
512
+ </sec>
513
+ <sec disp-level="1">
514
+ <p>Email <email>email</email> in content, not metadata.</p>
515
+ </sec>
516
+ <sec disp-level="1" id="hacks">
517
+ <!-- DLs will be moved after p (but text node remains) -->
518
+ <p>
519
+ text node
520
+ <def-list>
521
+ <def-item>
522
+ <term>1</term>
523
+ <def><p/></def>
524
+ </def-item>
525
+ </def-list>
526
+ <def-list>
527
+ <def-item>
528
+ <term>2</term>
529
+ <def><p/></def>
530
+ </def-item>
531
+ </def-list>
532
+ </p>
533
+ <!-- paragraph will be trimmed after hack -->
534
+ <p>
535
+ <def-list>
536
+ </def-list>
537
+ </p>
538
+ </sec>
539
+ <sec id="xrefgroup">
540
+ <p>See groups <xref-group first="xrefgroup1" last="xrefgroup4" middle="xrefgroup2 xrefgroup3" ref-subtype="group" ref-type="grp"><x>(</x><xref ref-subtype="group" ref-type="grp" rid="xrefgroup1" specific-use="ref">2</xref><x>)</x>–<xref ref-subtype="group" ref-type="grp" rid="xrefgroup4" specific-use="ref">5</xref></xref-group></p>
541
+ </sec>
542
+ </body>
543
+ <back>
544
+ <app-group>
545
+ <!-- sec, ack, app, front-matter-part, dedication & their title, label -->
546
+ <ack id="ack1" disp-level="1">
547
+ <title/>
548
+ </ack>
549
+ <app id="applabeltitle" disp-level="1" specific-use="section">
550
+ <label>Label</label>
551
+ <title>Title</title>
552
+ </app>
553
+ <app id="applabel" disp-level="1" specific-use="section">
554
+ <label>Label</label>
555
+ <subtitle>Subtitle</subtitle>
556
+ </app>
557
+ <app id="apptitle" disp-level="1" specific-use="section">
558
+ <title>Title</title>
559
+ <subtitle>Subtitle</subtitle>
560
+ </app>
561
+ <!-- NOTE sec-meta special treatment (see notes in code and tests)-->
562
+ <app id="secmeta" disp-level="1" specific-use="section">
563
+ <label>Appendix 1</label>
564
+ <title>A criterion for kitchen representations</title>
565
+ <sec-meta>
566
+ <contrib-group content-type="authors">
567
+ <contrib contrib-type="author">
568
+ <name name-style="western">
569
+ <surname>Surname</surname>
570
+ <given-names>GivenName</given-names>
571
+ </name>
572
+ </contrib>
573
+ </contrib-group>
574
+ </sec-meta>
575
+ </app>
576
+ <app id="appack" disp-level="1" specific-use="section">
577
+ <title>Acknowledg</title>
578
+ </app>
579
+ </app-group>
580
+ <ref-list content-type="biblist" id="reflist">
581
+ <title>References</title>
582
+ <ref id="ref">
583
+ <label>Label</label>
584
+ <raw-citation>Raw</raw-citation>
585
+ <mixed-citation>Mixed</mixed-citation>
586
+ </ref>
587
+ <ref id="refnolabel">
588
+ <mixed-citation>Mixed</mixed-citation>
589
+ </ref>
590
+ </ref-list>
591
+ </back>
592
+
593
+ </article>
@@ -0,0 +1,26 @@
1
+ /*!
2
+ * Copyright (c) 2023 American Mathematical Society
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { article } from './helper.js';
18
+ import tape from 'tape';
19
+
20
+ tape('Template: @content-type', async function (t) {
21
+ t.plan(1);
22
+ const document = article;
23
+ const style = document.querySelector('[data-ams-content-type]');
24
+ t.ok(style, 'Element with data-ams-content-type attribute');
25
+ });
26
+
@@ -0,0 +1,28 @@
1
+ /*!
2
+ * Copyright (c) 2023 American Mathematical Society
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { article } from './helper.js';
18
+ import tape from 'tape';
19
+
20
+
21
+ tape('Template: @has-qed-box', async function(t) {
22
+ t.plan(2);
23
+ const document = article;
24
+ const qedboxEl = document.querySelector('[data-ams-qed-box]');
25
+ t.ok(qedboxEl, 'Element with data-ams-qed-box attribute');
26
+ t.notOk(document.querySelector('[data-ams-doc="math inline"][data-ams-qed-box]'), 'has-qed-box ignored on inline-formula');
27
+ });
28
+