isodoc 2.0.5.3 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/base_style/all.css +227 -0
- data/lib/isodoc/base_style/blocks.css +0 -0
- data/lib/isodoc/base_style/coverpage.css +0 -0
- data/lib/isodoc/base_style/defaults.css +0 -0
- data/lib/isodoc/base_style/metanorma_word.css +47 -0
- data/lib/isodoc/base_style/nav.css +0 -0
- data/lib/isodoc/base_style/reset.css +125 -0
- data/lib/isodoc/base_style/typography.css +0 -0
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/xref/xref_gen.rb +35 -23
- data/spec/isodoc/blocks_spec.rb +43 -0
- metadata +14 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3633136f121834056746917a4af6b5c6b917365ffb941b0561a0941d16ccfb3a
|
4
|
+
data.tar.gz: d15461d2103ff7e43ee22c1afe80d4a4b4e0a240a76c3ee5afe11df47652ab72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 047f237237096490e9a6380675f96d46e1de721025f17eb60a3140face2cfe794d649fb31d992bca7a63e863c42c6d79cd42fa0810c77f6bc09518d905b55fbf
|
7
|
+
data.tar.gz: 7cde47764db6a87866b4fe618550dc8412b85c32c90ea2e60a903083849b6e16325574d723dbb83948a8524062fa63b4c0eb19a50590f0fb3d46164962dc0368
|
@@ -0,0 +1,227 @@
|
|
1
|
+
html, body, div, span, applet, object, iframe,
|
2
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
3
|
+
a, abbr, acronym, address, big, cite, code,
|
4
|
+
del, dfn, em, img, ins, kbd, q, s, samp,
|
5
|
+
small, strike, strong, sub, sup, tt, var,
|
6
|
+
b, u, i, center,
|
7
|
+
ol, ul, li,
|
8
|
+
fieldset, form, label, legend,
|
9
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
10
|
+
article, aside, canvas, details, embed,
|
11
|
+
figure, figcaption, footer, header, hgroup,
|
12
|
+
menu, output, ruby, section, summary,
|
13
|
+
time, mark, audio, video {
|
14
|
+
margin: 0;
|
15
|
+
padding: 0; }
|
16
|
+
|
17
|
+
html, body, div, span, applet, object, iframe,
|
18
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
19
|
+
a, abbr, acronym, address, big, cite, code,
|
20
|
+
del, dfn, em, img, ins, kbd, q, s, samp,
|
21
|
+
small, strike, strong, sub, sup, tt, var,
|
22
|
+
b, u, i, center,
|
23
|
+
dl, dt, dd, ol, ul, li,
|
24
|
+
fieldset, form, label, legend,
|
25
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
26
|
+
article, aside, canvas, details, embed,
|
27
|
+
figure, figcaption, footer, header, hgroup,
|
28
|
+
menu, nav, output, ruby, section, summary,
|
29
|
+
time, mark, audio, video {
|
30
|
+
border: 0;
|
31
|
+
font-size: 100%; }
|
32
|
+
|
33
|
+
html, body, div, span, applet, object, iframe,
|
34
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
35
|
+
a, abbr, acronym, address, big, cite, code,
|
36
|
+
del, dfn, em, img, ins, kbd, q, s, samp,
|
37
|
+
small, strike, strong, tt, var,
|
38
|
+
b, u, i, center,
|
39
|
+
dl, dd, ol, ul, li,
|
40
|
+
fieldset, form, label, legend,
|
41
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
42
|
+
article, aside, canvas, details, embed,
|
43
|
+
figure, figcaption, footer, header, hgroup,
|
44
|
+
menu, nav, output, ruby, section, summary,
|
45
|
+
time, mark, audio, video {
|
46
|
+
vertical-align: baseline; }
|
47
|
+
|
48
|
+
html, body, div, span, applet, object, iframe,
|
49
|
+
p, blockquote,
|
50
|
+
a, abbr, acronym, address, big, cite,
|
51
|
+
del, dfn, em, img, ins, q, s,
|
52
|
+
small, strike, strong, sub, sup, var,
|
53
|
+
b, u, i, center,
|
54
|
+
dl, dt, dd, ol, ul, li,
|
55
|
+
fieldset, form, label, legend,
|
56
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
57
|
+
article, aside, canvas, details, embed,
|
58
|
+
figure, figcaption, footer, header, hgroup,
|
59
|
+
menu, nav, output, ruby, section, summary,
|
60
|
+
time, mark, audio, video {
|
61
|
+
font-family: {{bodyfont}}; }
|
62
|
+
|
63
|
+
code, pre, tt, kbd, samp {
|
64
|
+
font-family: {{monospacefont}};
|
65
|
+
font-variant-ligatures: none; }
|
66
|
+
|
67
|
+
code *, pre *, tt *, kbd *, samp * {
|
68
|
+
font-family: {{monospacefont}} !important;
|
69
|
+
font-variant-ligatures: none; }
|
70
|
+
|
71
|
+
p code, dt code, li code, label code, legend code, caption code, th code, td code,
|
72
|
+
p tt, dt tt, li tt, label tt, legend tt, caption tt, th tt, td tt,
|
73
|
+
p kbd, dt kbd, li kbd, label kbd, legend kbd, caption kbd, th kbd, td kbd,
|
74
|
+
p samp, dt samp, li samp, label samp, legend samp, caption samp, th samp, td samp {
|
75
|
+
font-size: {{monospacefontsize}}; }
|
76
|
+
|
77
|
+
article, aside, details, figcaption, figure,
|
78
|
+
footer, header, hgroup, menu, nav, section {
|
79
|
+
display: block; }
|
80
|
+
|
81
|
+
table {
|
82
|
+
border-collapse: collapse;
|
83
|
+
border-spacing: 0; }
|
84
|
+
|
85
|
+
h1, h2, h3, h4, h5, h6 {
|
86
|
+
font-family: {{headerfont}}; }
|
87
|
+
|
88
|
+
.h1, .h2, .h3, .h4, .h5, .h6 {
|
89
|
+
font-family: {{headerfont}}; }
|
90
|
+
|
91
|
+
blockquote, q {
|
92
|
+
quotes: none; }
|
93
|
+
blockquote:before, blockquote:after, q:before, q:after {
|
94
|
+
content: '';
|
95
|
+
content: none; }
|
96
|
+
|
97
|
+
.h2Annex {
|
98
|
+
font-family: {{headerfont}}; }
|
99
|
+
|
100
|
+
dl {
|
101
|
+
display: grid;
|
102
|
+
grid-template-columns: max-content auto; }
|
103
|
+
dl dt p, dl dd p {
|
104
|
+
margin-top: 0; }
|
105
|
+
dl dt {
|
106
|
+
grid-column-start: 1; }
|
107
|
+
dl dd {
|
108
|
+
grid-column-start: 2; }
|
109
|
+
|
110
|
+
b, strong {
|
111
|
+
font-weight: bold; }
|
112
|
+
|
113
|
+
div.document-stage-band, div.document-type-band {
|
114
|
+
background-color: #333333; }
|
115
|
+
|
116
|
+
a.FootnoteRef + a.FootnoteRef:before {
|
117
|
+
content: ", ";
|
118
|
+
vertical-align: super; }
|
119
|
+
|
120
|
+
.addition {
|
121
|
+
color: blue; }
|
122
|
+
|
123
|
+
.deletion {
|
124
|
+
color: red;
|
125
|
+
text-decoration: line-through; }
|
126
|
+
|
127
|
+
#standard-band {
|
128
|
+
background-color: #0AC442; }
|
129
|
+
|
130
|
+
#standard {
|
131
|
+
border-bottom: solid 3px #0AC442; }
|
132
|
+
|
133
|
+
#directive-band {
|
134
|
+
background-color: #540D6E; }
|
135
|
+
|
136
|
+
#directive {
|
137
|
+
border-bottom: solid 3px #540D6E; }
|
138
|
+
|
139
|
+
#guide-band {
|
140
|
+
background-color: #D183C9; }
|
141
|
+
|
142
|
+
#guide {
|
143
|
+
border-bottom: solid 3px #D183C9; }
|
144
|
+
|
145
|
+
#specification-band {
|
146
|
+
background-color: #65AFFF; }
|
147
|
+
|
148
|
+
#specification {
|
149
|
+
border-bottom: solid 3px #65AFFF; }
|
150
|
+
|
151
|
+
#report-band {
|
152
|
+
background-color: #3A405A; }
|
153
|
+
|
154
|
+
#report {
|
155
|
+
border-bottom: solid 3px #3A405A; }
|
156
|
+
|
157
|
+
#amendment-band {
|
158
|
+
background-color: #F26430; }
|
159
|
+
|
160
|
+
#amendment {
|
161
|
+
border-bottom: solid 3px #F26430; }
|
162
|
+
|
163
|
+
#corrigendum-band {
|
164
|
+
background-color: #C84630; }
|
165
|
+
|
166
|
+
#corrigendum {
|
167
|
+
border-bottom: solid 3px #C84630; }
|
168
|
+
|
169
|
+
#administrative-band {
|
170
|
+
background-color: #BFAE48; }
|
171
|
+
|
172
|
+
#administrative {
|
173
|
+
border-bottom: solid 3px #BFAE48; }
|
174
|
+
|
175
|
+
#advisory-band {
|
176
|
+
background-color: #BD9391; }
|
177
|
+
|
178
|
+
#advisory {
|
179
|
+
border-bottom: solid 3px #BD9391; }
|
180
|
+
|
181
|
+
#proposal-band {
|
182
|
+
background-color: #39A0ED; }
|
183
|
+
|
184
|
+
#proposal {
|
185
|
+
border-bottom: solid 3px #39A0ED; }
|
186
|
+
|
187
|
+
#working-draft-band {
|
188
|
+
background-color: #2D7393; }
|
189
|
+
|
190
|
+
#working-draft {
|
191
|
+
border-bottom: solid 3px #2D7393; }
|
192
|
+
|
193
|
+
#committee-draft-band {
|
194
|
+
background-color: #2A6B7C; }
|
195
|
+
|
196
|
+
#committee-draft {
|
197
|
+
border-bottom: solid 3px #2A6B7C; }
|
198
|
+
|
199
|
+
#draft-standard-band {
|
200
|
+
background-color: #1C7F7A; }
|
201
|
+
|
202
|
+
#draft-standard {
|
203
|
+
border-bottom: solid 3px #1C7F7A; }
|
204
|
+
|
205
|
+
#final-draft-band {
|
206
|
+
background-color: #53C170; }
|
207
|
+
|
208
|
+
#final-draft {
|
209
|
+
border-bottom: solid 3px #53C170; }
|
210
|
+
|
211
|
+
#published-band {
|
212
|
+
background-color: #069E2D; }
|
213
|
+
|
214
|
+
#published {
|
215
|
+
border-bottom: solid 3px #069E2D; }
|
216
|
+
|
217
|
+
#withdrawn-band {
|
218
|
+
background-color: #004E64; }
|
219
|
+
|
220
|
+
#withdrawn {
|
221
|
+
border-bottom: solid 3px #004E64; }
|
222
|
+
|
223
|
+
#cancelled-band {
|
224
|
+
background-color: #2E382E; }
|
225
|
+
|
226
|
+
#cancelled {
|
227
|
+
border-bottom: solid 3px #2E382E; }
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,47 @@
|
|
1
|
+
div.table_container {
|
2
|
+
margin-bottom: 14pt; }
|
3
|
+
|
4
|
+
ol {
|
5
|
+
margin-bottom: 0cm; }
|
6
|
+
|
7
|
+
ul {
|
8
|
+
margin-bottom: 0cm; }
|
9
|
+
|
10
|
+
table.MsoISOTable tr {
|
11
|
+
page-break-inside: avoid; }
|
12
|
+
|
13
|
+
td {
|
14
|
+
page-break-inside: avoid; }
|
15
|
+
|
16
|
+
tr {
|
17
|
+
page-break-after: avoid; }
|
18
|
+
|
19
|
+
table.MsoISOTableBig tr {
|
20
|
+
page-break-inside: auto; }
|
21
|
+
|
22
|
+
table.MsoISOTableBig td {
|
23
|
+
page-break-inside: auto; }
|
24
|
+
|
25
|
+
span.stem {
|
26
|
+
font-family: "Cambria Math",serif;
|
27
|
+
mso-ascii-font-family: "Cambria Math";
|
28
|
+
font-style: italic; }
|
29
|
+
|
30
|
+
dt {
|
31
|
+
page-break-inside: avoid;
|
32
|
+
page-break-after: avoid; }
|
33
|
+
|
34
|
+
br.section {
|
35
|
+
page-break-before: always;
|
36
|
+
mso-break-type: section-break; }
|
37
|
+
|
38
|
+
br.pagebreak {
|
39
|
+
page-break-before: always;
|
40
|
+
mso-special-character: line-break; }
|
41
|
+
|
42
|
+
span.addition {
|
43
|
+
color: blue; }
|
44
|
+
|
45
|
+
span.deletion {
|
46
|
+
color: red;
|
47
|
+
text-decoration: line-through; }
|
File without changes
|
@@ -0,0 +1,125 @@
|
|
1
|
+
html, body, div, span, applet, object, iframe,
|
2
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
3
|
+
a, abbr, acronym, address, big, cite, code,
|
4
|
+
del, dfn, em, img, ins, kbd, q, s, samp,
|
5
|
+
small, strike, strong, sub, sup, tt, var,
|
6
|
+
b, u, i, center,
|
7
|
+
ol, ul, li,
|
8
|
+
fieldset, form, label, legend,
|
9
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
10
|
+
article, aside, canvas, details, embed,
|
11
|
+
figure, figcaption, footer, header, hgroup,
|
12
|
+
menu, output, ruby, section, summary,
|
13
|
+
time, mark, audio, video {
|
14
|
+
margin: 0;
|
15
|
+
padding: 0; }
|
16
|
+
|
17
|
+
html, body, div, span, applet, object, iframe,
|
18
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
19
|
+
a, abbr, acronym, address, big, cite, code,
|
20
|
+
del, dfn, em, img, ins, kbd, q, s, samp,
|
21
|
+
small, strike, strong, sub, sup, tt, var,
|
22
|
+
b, u, i, center,
|
23
|
+
dl, dt, dd, ol, ul, li,
|
24
|
+
fieldset, form, label, legend,
|
25
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
26
|
+
article, aside, canvas, details, embed,
|
27
|
+
figure, figcaption, footer, header, hgroup,
|
28
|
+
menu, nav, output, ruby, section, summary,
|
29
|
+
time, mark, audio, video {
|
30
|
+
border: 0;
|
31
|
+
font-size: 100%; }
|
32
|
+
|
33
|
+
html, body, div, span, applet, object, iframe,
|
34
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
35
|
+
a, abbr, acronym, address, big, cite, code,
|
36
|
+
del, dfn, em, img, ins, kbd, q, s, samp,
|
37
|
+
small, strike, strong, tt, var,
|
38
|
+
b, u, i, center,
|
39
|
+
dl, dd, ol, ul, li,
|
40
|
+
fieldset, form, label, legend,
|
41
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
42
|
+
article, aside, canvas, details, embed,
|
43
|
+
figure, figcaption, footer, header, hgroup,
|
44
|
+
menu, nav, output, ruby, section, summary,
|
45
|
+
time, mark, audio, video {
|
46
|
+
vertical-align: baseline; }
|
47
|
+
|
48
|
+
html, body, div, span, applet, object, iframe,
|
49
|
+
p, blockquote,
|
50
|
+
a, abbr, acronym, address, big, cite,
|
51
|
+
del, dfn, em, img, ins, q, s,
|
52
|
+
small, strike, strong, sub, sup, var,
|
53
|
+
b, u, i, center,
|
54
|
+
dl, dt, dd, ol, ul, li,
|
55
|
+
fieldset, form, label, legend,
|
56
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
57
|
+
article, aside, canvas, details, embed,
|
58
|
+
figure, figcaption, footer, header, hgroup,
|
59
|
+
menu, nav, output, ruby, section, summary,
|
60
|
+
time, mark, audio, video {
|
61
|
+
font-family: {{bodyfont}}; }
|
62
|
+
|
63
|
+
code, pre, tt, kbd, samp {
|
64
|
+
font-family: {{monospacefont}};
|
65
|
+
font-variant-ligatures: none; }
|
66
|
+
|
67
|
+
code *, pre *, tt *, kbd *, samp * {
|
68
|
+
font-family: {{monospacefont}} !important;
|
69
|
+
font-variant-ligatures: none; }
|
70
|
+
|
71
|
+
p code, dt code, li code, label code, legend code, caption code, th code, td code,
|
72
|
+
p tt, dt tt, li tt, label tt, legend tt, caption tt, th tt, td tt,
|
73
|
+
p kbd, dt kbd, li kbd, label kbd, legend kbd, caption kbd, th kbd, td kbd,
|
74
|
+
p samp, dt samp, li samp, label samp, legend samp, caption samp, th samp, td samp {
|
75
|
+
font-size: {{monospacefontsize}}; }
|
76
|
+
|
77
|
+
article, aside, details, figcaption, figure,
|
78
|
+
footer, header, hgroup, menu, nav, section {
|
79
|
+
display: block; }
|
80
|
+
|
81
|
+
table {
|
82
|
+
border-collapse: collapse;
|
83
|
+
border-spacing: 0; }
|
84
|
+
|
85
|
+
h1, h2, h3, h4, h5, h6 {
|
86
|
+
font-family: {{headerfont}}; }
|
87
|
+
|
88
|
+
.h1, .h2, .h3, .h4, .h5, .h6 {
|
89
|
+
font-family: {{headerfont}}; }
|
90
|
+
|
91
|
+
blockquote, q {
|
92
|
+
quotes: none; }
|
93
|
+
blockquote:before, blockquote:after, q:before, q:after {
|
94
|
+
content: '';
|
95
|
+
content: none; }
|
96
|
+
|
97
|
+
.h2Annex {
|
98
|
+
font-family: {{headerfont}}; }
|
99
|
+
|
100
|
+
dl {
|
101
|
+
display: grid;
|
102
|
+
grid-template-columns: max-content auto; }
|
103
|
+
dl dt p, dl dd p {
|
104
|
+
margin-top: 0; }
|
105
|
+
dl dt {
|
106
|
+
grid-column-start: 1; }
|
107
|
+
dl dd {
|
108
|
+
grid-column-start: 2; }
|
109
|
+
|
110
|
+
b, strong {
|
111
|
+
font-weight: bold; }
|
112
|
+
|
113
|
+
div.document-stage-band, div.document-type-band {
|
114
|
+
background-color: #333333; }
|
115
|
+
|
116
|
+
a.FootnoteRef + a.FootnoteRef:before {
|
117
|
+
content: ", ";
|
118
|
+
vertical-align: super; }
|
119
|
+
|
120
|
+
.addition {
|
121
|
+
color: blue; }
|
122
|
+
|
123
|
+
.deletion {
|
124
|
+
color: red;
|
125
|
+
text-decoration: line-through; }
|
File without changes
|
data/lib/isodoc/version.rb
CHANGED
data/lib/isodoc/xref/xref_gen.rb
CHANGED
@@ -87,18 +87,23 @@ module IsoDoc
|
|
87
87
|
|
88
88
|
def note_anchor_names(sections)
|
89
89
|
sections.each do |s|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
@anchors[n["id"]] =
|
95
|
-
anchor_struct(increment_label(notes, n, c), n,
|
96
|
-
@labels["note_xref"], "note", false)
|
97
|
-
end
|
90
|
+
notes = s.xpath(CHILD_NOTES_XPATH) -
|
91
|
+
s.xpath(ns(".//figure//note | .//table//note"))
|
92
|
+
note_anchor_names1(notes, Counter.new)
|
98
93
|
note_anchor_names(s.xpath(ns(CHILD_SECTIONS)))
|
99
94
|
end
|
100
95
|
end
|
101
96
|
|
97
|
+
def note_anchor_names1(notes, counter)
|
98
|
+
notes.each do |n|
|
99
|
+
next if @anchors[n["id"]] || blank?(n["id"])
|
100
|
+
|
101
|
+
@anchors[n["id"]] =
|
102
|
+
anchor_struct(increment_label(notes, n, counter), n,
|
103
|
+
@labels["note_xref"], "note", false)
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
102
107
|
CHILD_EXAMPLES_XPATH =
|
103
108
|
"./*[not(self::xmlns:clause) and not(self::xmlns:appendix) and "\
|
104
109
|
"not(self::xmlns:terms) and not(self::xmlns:definitions)]//"\
|
@@ -109,18 +114,22 @@ module IsoDoc
|
|
109
114
|
|
110
115
|
def example_anchor_names(sections)
|
111
116
|
sections.each do |s|
|
112
|
-
|
113
|
-
(notes
|
114
|
-
next if @anchors[n["id"]] || n["id"].nil? || n["id"].empty?
|
115
|
-
|
116
|
-
@anchors[n["id"]] =
|
117
|
-
anchor_struct(increment_label(notes, n, c), n,
|
118
|
-
@labels["example_xref"], "example", n["unnumbered"])
|
119
|
-
end
|
117
|
+
notes = s.xpath(CHILD_EXAMPLES_XPATH)
|
118
|
+
example_anchor_names1(notes, Counter.new)
|
120
119
|
example_anchor_names(s.xpath(ns(CHILD_SECTIONS)))
|
121
120
|
end
|
122
121
|
end
|
123
122
|
|
123
|
+
def example_anchor_names1(notes, counter)
|
124
|
+
notes.each do |n|
|
125
|
+
next if @anchors[n["id"]] || blank?(n["id"])
|
126
|
+
|
127
|
+
@anchors[n["id"]] =
|
128
|
+
anchor_struct(increment_label(notes, n, counter), n,
|
129
|
+
@labels["example_xref"], "example", n["unnumbered"])
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
124
133
|
def list_anchor_names(sections)
|
125
134
|
sections.each do |s|
|
126
135
|
notes = s.xpath(ns(".//ol")) - s.xpath(ns(".//clause//ol")) -
|
@@ -154,17 +163,20 @@ module IsoDoc
|
|
154
163
|
sections.each do |s|
|
155
164
|
notes = s.xpath(ns(".//dl")) - s.xpath(ns(".//clause//dl")) -
|
156
165
|
s.xpath(ns(".//appendix//dl")) - s.xpath(ns(".//dl//dl"))
|
157
|
-
|
158
|
-
notes.reject { |n| blank?(n["id"]) }.each do |n|
|
159
|
-
@anchors[n["id"]] =
|
160
|
-
anchor_struct(increment_label(notes, n, c), n,
|
161
|
-
@labels["deflist"], "deflist", false)
|
162
|
-
deflist_term_anchor_names(n, @anchors[n["id"]])
|
163
|
-
end
|
166
|
+
deflist_anchor_names1(notes, Counter.new)
|
164
167
|
deflist_anchor_names(s.xpath(ns(CHILD_SECTIONS)))
|
165
168
|
end
|
166
169
|
end
|
167
170
|
|
171
|
+
def deflist_anchor_names1(notes, counter)
|
172
|
+
notes.reject { |n| blank?(n["id"]) }.each do |n|
|
173
|
+
@anchors[n["id"]] =
|
174
|
+
anchor_struct(increment_label(notes, n, counter), n,
|
175
|
+
@labels["deflist"], "deflist", false)
|
176
|
+
deflist_term_anchor_names(n, @anchors[n["id"]])
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
168
180
|
def deflist_term_anchor_names(list, list_anchor)
|
169
181
|
list.xpath(ns("./dt")).each do |li|
|
170
182
|
label = l10n("#{list_anchor[:xref]}: #{dt2xreflabel(li)}")
|
data/spec/isodoc/blocks_spec.rb
CHANGED
@@ -558,6 +558,49 @@ RSpec.describe IsoDoc do
|
|
558
558
|
.convert("test", input, true)))).to be_equivalent_to xmlpp(doc)
|
559
559
|
end
|
560
560
|
|
561
|
+
it "numbers notes in tables and figures separately from notes outside them" do
|
562
|
+
input = <<~INPUT
|
563
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
564
|
+
<preface><foreword>
|
565
|
+
<figure id="F"><note id="FB"><p>XYZ</p></note></figure>
|
566
|
+
<table id="T"><note id="TB"><p>XYZ</p></note></table>
|
567
|
+
<p id="A">ABC <note id="B"><p id="C">XYZ</p></note>
|
568
|
+
</foreword></preface>
|
569
|
+
</iso-standard>
|
570
|
+
INPUT
|
571
|
+
output = <<~OUTPUT
|
572
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
|
573
|
+
<preface>
|
574
|
+
<foreword displayorder='1'>
|
575
|
+
<figure id='F'>
|
576
|
+
<name>Figure 1</name>
|
577
|
+
<note id='FB'>
|
578
|
+
<name>NOTE</name>
|
579
|
+
<p>XYZ</p>
|
580
|
+
</note>
|
581
|
+
</figure>
|
582
|
+
<table id='T'>
|
583
|
+
<name>Table 1</name>
|
584
|
+
<note id='TB'>
|
585
|
+
<name>NOTE</name>
|
586
|
+
<p>XYZ</p>
|
587
|
+
</note>
|
588
|
+
</table>
|
589
|
+
<p id='A'>
|
590
|
+
ABC
|
591
|
+
<note id='B'>
|
592
|
+
<name>NOTE</name>
|
593
|
+
<p id='C'>XYZ</p>
|
594
|
+
</note>
|
595
|
+
</p>
|
596
|
+
</foreword>
|
597
|
+
</preface>
|
598
|
+
</iso-standard>
|
599
|
+
OUTPUT
|
600
|
+
expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
|
601
|
+
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
602
|
+
end
|
603
|
+
|
561
604
|
it "processes figures" do
|
562
605
|
input = <<~INPUT
|
563
606
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isodoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciimath
|
@@ -391,15 +391,23 @@ files:
|
|
391
391
|
- lib/isodoc-yaml/i18n-ru.yaml
|
392
392
|
- lib/isodoc-yaml/i18n-zh-Hans.yaml
|
393
393
|
- lib/isodoc.rb
|
394
|
+
- lib/isodoc/base_style/all.css
|
394
395
|
- lib/isodoc/base_style/all.scss
|
395
396
|
- lib/isodoc/base_style/bands.scss
|
397
|
+
- lib/isodoc/base_style/blocks.css
|
396
398
|
- lib/isodoc/base_style/blocks.scss
|
399
|
+
- lib/isodoc/base_style/coverpage.css
|
397
400
|
- lib/isodoc/base_style/coverpage.scss
|
401
|
+
- lib/isodoc/base_style/defaults.css
|
398
402
|
- lib/isodoc/base_style/defaults.scss
|
403
|
+
- lib/isodoc/base_style/metanorma_word.css
|
399
404
|
- lib/isodoc/base_style/metanorma_word.scss
|
405
|
+
- lib/isodoc/base_style/nav.css
|
400
406
|
- lib/isodoc/base_style/nav.scss
|
407
|
+
- lib/isodoc/base_style/reset.css
|
401
408
|
- lib/isodoc/base_style/reset.scss
|
402
409
|
- lib/isodoc/base_style/scripts.html
|
410
|
+
- lib/isodoc/base_style/typography.css
|
403
411
|
- lib/isodoc/base_style/typography.scss
|
404
412
|
- lib/isodoc/class_utils.rb
|
405
413
|
- lib/isodoc/common.rb
|
@@ -512,7 +520,7 @@ homepage: https://github.com/metanorma/isodoc
|
|
512
520
|
licenses:
|
513
521
|
- BSD-2-Clause
|
514
522
|
metadata: {}
|
515
|
-
post_install_message:
|
523
|
+
post_install_message:
|
516
524
|
rdoc_options: []
|
517
525
|
require_paths:
|
518
526
|
- lib
|
@@ -527,8 +535,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
527
535
|
- !ruby/object:Gem::Version
|
528
536
|
version: '0'
|
529
537
|
requirements: []
|
530
|
-
rubygems_version: 3.
|
531
|
-
signing_key:
|
538
|
+
rubygems_version: 3.3.9
|
539
|
+
signing_key:
|
532
540
|
specification_version: 4
|
533
541
|
summary: Convert documents in IsoDoc into Word and HTML in AsciiDoc.
|
534
542
|
test_files: []
|