@amermathsoc/texml-to-html 18.0.0 → 18.1.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.
- package/CHANGELOG.md +7 -0
- package/README.md +2 -2
- package/lib/elements/sec.js +2 -0
- package/package.json +1 -1
- package/test/book.xml +3 -0
- package/test/element-sec-app-front-matter-part-dedication-title-label.js +2 -1
- package/out.html +0 -696
- package/out2.html +0 -707
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [18.1.0](https://github.com/AmerMathSoc/texml-to-html/compare/v18.0.0...v18.1.0) (2024-09-09)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **sec.js:** support style attribute ([84c7699](https://github.com/AmerMathSoc/texml-to-html/commit/84c769970c4841a696e681766a7348a8a6900b9e)), closes [#461](https://github.com/AmerMathSoc/texml-to-html/issues/461)
|
|
11
|
+
|
|
5
12
|
## [18.0.0](https://github.com/AmerMathSoc/texml-to-html/compare/v18.0.0-0...v18.0.0) (2024-08-16)
|
|
6
13
|
|
|
7
14
|
## [18.0.0-0](https://github.com/AmerMathSoc/texml-to-html/compare/v17.1.0...v18.0.0-0) (2024-08-13)
|
package/README.md
CHANGED
|
@@ -132,7 +132,7 @@ Beyond HTML element and attributes, texml-to-html stores data in custom `data-*`
|
|
|
132
132
|
- underline
|
|
133
133
|
- {disp-quote@specific-use}
|
|
134
134
|
- (inline-)graphic{@specific-use}
|
|
135
|
-
- {@style} [expected: theorem styles]
|
|
135
|
+
- {@style} [expected: theorem styles, sec styles]
|
|
136
136
|
- boxed (from boxed-text)
|
|
137
137
|
- data-ams-ref
|
|
138
138
|
- {@ref-type} [expected: bibr, fn, disp-formula, sec, fig, table, algorithm, list, statement]
|
|
@@ -250,7 +250,7 @@ The following provide a list from the reverse point of view.
|
|
|
250
250
|
- attributes
|
|
251
251
|
- @disp-level => data-ams-doc-level [data-ams-doc-level is also added to some elements that lack disp-level]
|
|
252
252
|
- @content-type => data-ams-content-type
|
|
253
|
-
- @style => data-ams-style
|
|
253
|
+
- @style => data-ams-style [e.g., statement, sec]
|
|
254
254
|
- @specific-use => data-ams-specific-use [sometimes mapped to other attributes, e.g., style]
|
|
255
255
|
- @has-qed-box => data-ams-qed-box
|
|
256
256
|
- @position => data-ams-position
|
package/lib/elements/sec.js
CHANGED
|
@@ -53,6 +53,8 @@ export default function (htmlParentNode, xmlnode) {
|
|
|
53
53
|
});
|
|
54
54
|
htmlParentNode.appendChild(section);
|
|
55
55
|
|
|
56
|
+
if (xmlnode.hasAttribute('style')) section.setAttribute('data-ams-style', xmlnode.getAttribute('style'));
|
|
57
|
+
|
|
56
58
|
if (specificUse === 'part') {
|
|
57
59
|
section.setAttribute('role', 'doc-part');
|
|
58
60
|
}
|
package/package.json
CHANGED
package/test/book.xml
CHANGED
|
@@ -19,7 +19,7 @@ import tape from 'tape';
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
tape('sec, app, front-matter-part, dedication, title, label', async function (t) {
|
|
22
|
-
t.plan(
|
|
22
|
+
t.plan(44);
|
|
23
23
|
const document = article;
|
|
24
24
|
|
|
25
25
|
t.ok(document.querySelector('#ack1[role="doc-acknowledgments"][data-ams-doc-level="1"]'), 'ack to role doc-acknowledgments with data-ams-doc-level');
|
|
@@ -65,6 +65,7 @@ tape('sec, app, front-matter-part, dedication, title, label', async function (t)
|
|
|
65
65
|
t.equal(document2.querySelector('#part').getAttribute('role'), 'doc-part', 'part role');
|
|
66
66
|
t.ok(document2.querySelector('#inparttitle h2'), 'sec with title in chapter in part: heading level reduced');
|
|
67
67
|
t.ok(document2.querySelector('#inpartlabel h2'), 'sec with label in chapter in part: heading level reduced');
|
|
68
|
+
t.equal(document2.querySelector('#xcb').getAttribute('data-ams-style'), 'xcb', 'sec with style, mapped to data-ams-style');
|
|
68
69
|
|
|
69
70
|
t.ok(document2.querySelector('#fmtitle header p[data-ams-doc="subtitle"]'), 'sec with title: subtitle to p with data-ams-doc');
|
|
70
71
|
t.ok(document2.querySelector('#fmlabel header p[data-ams-doc="subtitle"]'), 'sec with title: subtitle to p with data-ams-doc');
|