metanorma-iso 3.3.0 → 3.3.1
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.
- checksums.yaml +4 -4
- data/lib/isodoc/iso/base_convert.rb +22 -16
- data/lib/isodoc/iso/html/style-human.css +14 -11
- data/lib/isodoc/iso/html/style-human.scss +11 -8
- data/lib/isodoc/iso/html/style-iso.css +14 -10
- data/lib/isodoc/iso/html/style-iso.scss +11 -7
- data/lib/isodoc/iso/iso.amendment.xsl +318 -139
- data/lib/isodoc/iso/iso.international-standard.xsl +318 -139
- data/lib/isodoc/iso/sections.rb +1 -1
- data/lib/isodoc/iso/word_convert.rb +19 -11
- data/lib/isodoc/iso/word_dis_convert.rb +2 -2
- data/lib/metanorma/iso/basicdoc.rng +5 -1
- data/lib/metanorma/iso/cleanup.rb +5 -1
- data/lib/metanorma/iso/cleanup_biblio.rb +3 -3
- data/lib/metanorma/iso/validate.rb +13 -7
- data/lib/metanorma/iso/validate_list.rb +1 -1
- data/lib/metanorma/iso/validate_numeric.rb +1 -1
- data/lib/metanorma/iso/validate_requirements.rb +1 -1
- data/lib/metanorma/iso/validate_section.rb +1 -1
- data/lib/metanorma/iso/validate_style.rb +1 -1
- data/lib/metanorma/iso/validate_title.rb +1 -1
- data/lib/metanorma/iso/validate_xref.rb +1 -1
- data/lib/metanorma/iso/version.rb +1 -1
- data/lib/metanorma-iso.rb +2 -0
- data/metanorma-iso.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3627f1a989c6d2de4b3cdb643cec42761bdc8fae0e2717d760d02abd1b78e195
|
|
4
|
+
data.tar.gz: 64820748297125b29676d224abacd67e27cbdf10198241dde7985bceaae263af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3b553a3d16a9379f973d03592a38a84955579d5c44b2fe36cefbb350ef350b42312d951c6b75a35882a6ee50d336b145c0be36682c4913f48a89b150b439cad4
|
|
7
|
+
data.tar.gz: dfe4f25fa5c06fff908bf343cee16d355488d538df8906759f2c9b14076a574d09d183dfdafe16c2f6f84cb84ffa1257708fcc59d0719daf80358f9c6e93d56f
|
|
@@ -27,7 +27,7 @@ module IsoDoc
|
|
|
27
27
|
def example_p_parse(node, div)
|
|
28
28
|
name = node.at(ns("./fmt-name"))
|
|
29
29
|
para = node.at(ns("./p")) || node.at(ns("./semx/p"))
|
|
30
|
-
div.p
|
|
30
|
+
div.p(**attr_code(class: example_p_class)) do |p|
|
|
31
31
|
name and p.span class: "example_label" do |s|
|
|
32
32
|
name.children.each { |n| parse(n, s) }
|
|
33
33
|
end
|
|
@@ -83,13 +83,6 @@ module IsoDoc
|
|
|
83
83
|
para << " "
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
-
def figure_name_parse(_node, div, name)
|
|
87
|
-
name.nil? and return
|
|
88
|
-
div.p class: "FigureTitle", style: "text-align:center;" do |p|
|
|
89
|
-
name.children.each { |n| parse(n, p) }
|
|
90
|
-
end
|
|
91
|
-
end
|
|
92
|
-
|
|
93
86
|
def top_element_render(elem, out)
|
|
94
87
|
if %w(clause terms definitions).include?(elem.name) &&
|
|
95
88
|
elem.parent.name == "sections" &&
|
|
@@ -100,10 +93,10 @@ module IsoDoc
|
|
|
100
93
|
end
|
|
101
94
|
|
|
102
95
|
def clause_etc1(clause, out, num)
|
|
103
|
-
out.div
|
|
96
|
+
out.div(**attr_code(
|
|
104
97
|
id: clause["id"],
|
|
105
98
|
class: clause.name == "definitions" ? "Symbols" : nil,
|
|
106
|
-
) do |div|
|
|
99
|
+
)) do |div|
|
|
107
100
|
num = num + 1
|
|
108
101
|
clause_name(clause, clause&.at(ns("./fmt-title")), div, nil)
|
|
109
102
|
clause.elements.each do |e|
|
|
@@ -114,15 +107,28 @@ module IsoDoc
|
|
|
114
107
|
|
|
115
108
|
def table_parse(node, out)
|
|
116
109
|
@in_table = true
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
out.table **table_attrs(node) do |t|
|
|
110
|
+
out.table(**table_attrs(node)) do |t|
|
|
111
|
+
table_title_parse(node, t)
|
|
120
112
|
table_parse_core(node, t)
|
|
121
113
|
table_parse_tail(node, t)
|
|
122
114
|
end
|
|
123
115
|
@in_table = false
|
|
124
116
|
end
|
|
125
117
|
|
|
118
|
+
def table_title_parse(node, out)
|
|
119
|
+
name = node.at(ns("./fmt-name"))
|
|
120
|
+
summ = node["summary"]
|
|
121
|
+
meas = node.at(ns("./note[@type = 'units']"))
|
|
122
|
+
name || summ || meas or return
|
|
123
|
+
out.caption do |p|
|
|
124
|
+
children_parse(name, p)
|
|
125
|
+
measurement_units(node, p)
|
|
126
|
+
summ and p.span style: "display:none" do |s|
|
|
127
|
+
s << summ
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
126
132
|
def table_parse_tail(node, out)
|
|
127
133
|
(key = node.at(ns("./key"))) && parse(key, out)
|
|
128
134
|
node.xpath(ns("./fmt-source")).each { |n| parse(n, out) }
|
|
@@ -134,8 +140,8 @@ module IsoDoc
|
|
|
134
140
|
end
|
|
135
141
|
|
|
136
142
|
def figure_parse1(node, out)
|
|
137
|
-
|
|
138
|
-
|
|
143
|
+
out.figure(**figure_attrs(node)) do |div|
|
|
144
|
+
measurement_units(node, out)
|
|
139
145
|
node.children.each do |n|
|
|
140
146
|
n.name == "note" && n["type"] == "units" and next
|
|
141
147
|
parse(n, div) unless n.name == "fmt-name"
|
|
@@ -158,7 +164,7 @@ module IsoDoc
|
|
|
158
164
|
super
|
|
159
165
|
docxml.xpath("//tfoot//div[@class = 'figdl']/p[@class = 'ListTitle']")
|
|
160
166
|
.each do |p|
|
|
161
|
-
|
|
167
|
+
p["align"] = "left"
|
|
162
168
|
end
|
|
163
169
|
docxml
|
|
164
170
|
end
|
|
@@ -865,14 +865,14 @@ nav {
|
|
|
865
865
|
width: 100%;
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
|
-
|
|
868
|
+
figure .SourceTitle,
|
|
869
869
|
pre .SourceTitle,
|
|
870
870
|
.pseudocode .SourceTitle {
|
|
871
871
|
font-weight: 700;
|
|
872
872
|
font-size: 1em;
|
|
873
873
|
text-align: center;
|
|
874
874
|
}
|
|
875
|
-
|
|
875
|
+
figure,
|
|
876
876
|
pre,
|
|
877
877
|
.pseudocode {
|
|
878
878
|
background-color: #f7f7f7;
|
|
@@ -884,26 +884,26 @@ pre,
|
|
|
884
884
|
font-size: {{normalfontsize}};
|
|
885
885
|
}
|
|
886
886
|
|
|
887
|
-
|
|
887
|
+
figure figcaption {
|
|
888
888
|
font-weight: 700;
|
|
889
889
|
font-size: 1em;
|
|
890
890
|
text-align: center;
|
|
891
891
|
}
|
|
892
|
-
|
|
892
|
+
figure > img, figure > svg {
|
|
893
893
|
margin-left: auto;
|
|
894
894
|
margin-right: auto;
|
|
895
895
|
display: block;
|
|
896
896
|
max-width: 100%;
|
|
897
897
|
height: auto;
|
|
898
898
|
}
|
|
899
|
-
|
|
899
|
+
figure {
|
|
900
900
|
line-height: 1.6em;
|
|
901
901
|
padding: 1.5em;
|
|
902
902
|
margin: 2em 0 1em 0;
|
|
903
903
|
overflow: auto;
|
|
904
904
|
}
|
|
905
905
|
|
|
906
|
-
table
|
|
906
|
+
table figure {
|
|
907
907
|
padding: 0;
|
|
908
908
|
margin: 0;
|
|
909
909
|
}
|
|
@@ -1130,17 +1130,21 @@ p.NormRef, div.Biblio, div.NormRef {
|
|
|
1130
1130
|
margin-left: 2em;
|
|
1131
1131
|
}
|
|
1132
1132
|
|
|
1133
|
+
.Biblio.note, .Biblio.Note, .NormRef.note, .NormRef.Note {
|
|
1134
|
+
margin-left: 3.5em;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1133
1137
|
/*
|
|
1134
1138
|
3.6 Source Code + figures
|
|
1135
1139
|
*/
|
|
1136
|
-
|
|
1140
|
+
figure .SourceTitle,
|
|
1137
1141
|
pre .SourceTitle,
|
|
1138
1142
|
.pseudocode .SourceTitle {
|
|
1139
1143
|
font-weight: 700;
|
|
1140
1144
|
font-size: 1em;
|
|
1141
1145
|
text-align: center;
|
|
1142
1146
|
}
|
|
1143
|
-
|
|
1147
|
+
figure,
|
|
1144
1148
|
pre,
|
|
1145
1149
|
.pseudocode {
|
|
1146
1150
|
background-color: #f7f7f7;
|
|
@@ -1176,8 +1180,7 @@ pre {
|
|
|
1176
1180
|
text-align: left;
|
|
1177
1181
|
}
|
|
1178
1182
|
|
|
1179
|
-
|
|
1180
|
-
.FigureTitle,
|
|
1183
|
+
figcaption,
|
|
1181
1184
|
.SourceTitle,
|
|
1182
1185
|
.AdmonitionTitle,
|
|
1183
1186
|
.RecommendationTitle {
|
|
@@ -1291,7 +1294,7 @@ table.rouge-line-table td, table.rouge-line-table th {
|
|
|
1291
1294
|
padding: 0em !important;
|
|
1292
1295
|
}
|
|
1293
1296
|
|
|
1294
|
-
|
|
1297
|
+
table > caption {
|
|
1295
1298
|
text-align: center;
|
|
1296
1299
|
margin-top: 2.5em;
|
|
1297
1300
|
font-weight: 800;
|
|
@@ -330,18 +330,18 @@ nav {
|
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
-
|
|
333
|
+
figure,
|
|
334
334
|
pre,
|
|
335
335
|
.pseudocode {
|
|
336
336
|
@include pseudocodeBlock(#f7f7f7);
|
|
337
337
|
font-size: $normalfontsize;
|
|
338
338
|
}
|
|
339
339
|
|
|
340
|
-
|
|
340
|
+
figure {
|
|
341
341
|
@include figureBlock();
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
-
table
|
|
344
|
+
table figure {
|
|
345
345
|
padding: 0;
|
|
346
346
|
margin: 0;
|
|
347
347
|
}
|
|
@@ -496,11 +496,15 @@ p.NormRef, div.Biblio, div.NormRef {
|
|
|
496
496
|
margin-left: 2em;
|
|
497
497
|
}
|
|
498
498
|
|
|
499
|
+
.Biblio.note, .Biblio.Note, .NormRef.note, .NormRef.Note {
|
|
500
|
+
margin-left: 3.5em;
|
|
501
|
+
}
|
|
502
|
+
|
|
499
503
|
/*
|
|
500
504
|
3.6 Source Code + figures
|
|
501
505
|
*/
|
|
502
506
|
|
|
503
|
-
|
|
507
|
+
figure,
|
|
504
508
|
pre,
|
|
505
509
|
.pseudocode {
|
|
506
510
|
@include pseudocodeBlock(#f7f7f7);
|
|
@@ -515,15 +519,14 @@ pre {
|
|
|
515
519
|
@include recommendationBlock();
|
|
516
520
|
@include listBlock();
|
|
517
521
|
|
|
518
|
-
|
|
519
|
-
.FigureTitle,
|
|
522
|
+
figcaption,
|
|
520
523
|
.SourceTitle,
|
|
521
524
|
.AdmonitionTitle,
|
|
522
525
|
.RecommendationTitle {
|
|
523
526
|
@include blockTitle()
|
|
524
527
|
}
|
|
525
528
|
|
|
526
|
-
|
|
529
|
+
figure dl {
|
|
527
530
|
}
|
|
528
531
|
|
|
529
532
|
/*
|
|
@@ -601,7 +604,7 @@ table.rouge-line-table td, table.rouge-line-table th {
|
|
|
601
604
|
padding: 0em !important;
|
|
602
605
|
}
|
|
603
606
|
|
|
604
|
-
|
|
607
|
+
table > caption {
|
|
605
608
|
text-align: center;
|
|
606
609
|
margin-top: 2.5em;
|
|
607
610
|
font-weight: 800;
|
|
@@ -814,14 +814,14 @@ nav {
|
|
|
814
814
|
width: 100%;
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
|
-
|
|
817
|
+
figure .SourceTitle,
|
|
818
818
|
pre .SourceTitle,
|
|
819
819
|
.pseudocode .SourceTitle {
|
|
820
820
|
font-weight: 700;
|
|
821
821
|
font-size: 1em;
|
|
822
822
|
text-align: center;
|
|
823
823
|
}
|
|
824
|
-
|
|
824
|
+
figure,
|
|
825
825
|
pre,
|
|
826
826
|
.pseudocode {
|
|
827
827
|
background-color: #f7f7f7;
|
|
@@ -833,26 +833,26 @@ pre,
|
|
|
833
833
|
font-size: {{normalfontsize}};
|
|
834
834
|
}
|
|
835
835
|
|
|
836
|
-
|
|
836
|
+
figure figcaption {
|
|
837
837
|
font-weight: 700;
|
|
838
838
|
font-size: 1em;
|
|
839
839
|
text-align: center;
|
|
840
840
|
}
|
|
841
|
-
|
|
841
|
+
figure > img, figure > svg {
|
|
842
842
|
margin-left: auto;
|
|
843
843
|
margin-right: auto;
|
|
844
844
|
display: block;
|
|
845
845
|
max-width: 100%;
|
|
846
846
|
height: auto;
|
|
847
847
|
}
|
|
848
|
-
|
|
848
|
+
figure {
|
|
849
849
|
line-height: 1.6em;
|
|
850
850
|
padding: 1.5em;
|
|
851
851
|
margin: 2em 0 1em 0;
|
|
852
852
|
overflow: auto;
|
|
853
853
|
}
|
|
854
854
|
|
|
855
|
-
table
|
|
855
|
+
table figure {
|
|
856
856
|
padding: 0;
|
|
857
857
|
margin: 0;
|
|
858
858
|
}
|
|
@@ -1195,17 +1195,21 @@ p.Biblio, p.NormRef, div.Biblio, div.NormRef {
|
|
|
1195
1195
|
margin-left: 2em;
|
|
1196
1196
|
}
|
|
1197
1197
|
|
|
1198
|
+
.Biblio.note, .Biblio.Note, .NormRef.note, .NormRef.Note {
|
|
1199
|
+
margin-left: 3.5em;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1198
1202
|
/*
|
|
1199
1203
|
3.6 Source Code + figures
|
|
1200
1204
|
*/
|
|
1201
|
-
|
|
1205
|
+
figure .SourceTitle,
|
|
1202
1206
|
pre .SourceTitle,
|
|
1203
1207
|
.pseudocode .SourceTitle {
|
|
1204
1208
|
font-weight: 700;
|
|
1205
1209
|
font-size: 1em;
|
|
1206
1210
|
text-align: center;
|
|
1207
1211
|
}
|
|
1208
|
-
|
|
1212
|
+
figure,
|
|
1209
1213
|
pre,
|
|
1210
1214
|
.pseudocode {
|
|
1211
1215
|
background-color: #f7f7f7;
|
|
@@ -1241,7 +1245,7 @@ pre {
|
|
|
1241
1245
|
text-align: left;
|
|
1242
1246
|
}
|
|
1243
1247
|
|
|
1244
|
-
|
|
1248
|
+
figcaption, .SourceTitle, .AdmonitionTitle, .RecommendationTitle {
|
|
1245
1249
|
font-weight: 700;
|
|
1246
1250
|
font-size: 1em;
|
|
1247
1251
|
text-align: center;
|
|
@@ -1357,7 +1361,7 @@ td > p:last-child, th > p:last-child {
|
|
|
1357
1361
|
margin-bottom: 0em;
|
|
1358
1362
|
}
|
|
1359
1363
|
|
|
1360
|
-
|
|
1364
|
+
table > caption {
|
|
1361
1365
|
text-align: center;
|
|
1362
1366
|
margin-top: 2.5em;
|
|
1363
1367
|
font-weight: 800;
|
|
@@ -270,18 +270,18 @@ nav {
|
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
|
|
273
|
+
figure,
|
|
274
274
|
pre,
|
|
275
275
|
.pseudocode {
|
|
276
276
|
@include pseudocodeBlock(#f7f7f7);
|
|
277
277
|
font-size: $normalfontsize;
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
|
|
280
|
+
figure {
|
|
281
281
|
@include figureBlock();
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
-
table
|
|
284
|
+
table figure {
|
|
285
285
|
padding: 0;
|
|
286
286
|
margin: 0;
|
|
287
287
|
}
|
|
@@ -530,11 +530,15 @@ p.Biblio, p.NormRef, div.Biblio, div.NormRef {
|
|
|
530
530
|
margin-left: 2em;
|
|
531
531
|
}
|
|
532
532
|
|
|
533
|
+
.Biblio.note, .Biblio.Note, .NormRef.note, .NormRef.Note {
|
|
534
|
+
margin-left: 3.5em;
|
|
535
|
+
}
|
|
536
|
+
|
|
533
537
|
/*
|
|
534
538
|
3.6 Source Code + figures
|
|
535
539
|
*/
|
|
536
540
|
|
|
537
|
-
|
|
541
|
+
figure,
|
|
538
542
|
pre,
|
|
539
543
|
.pseudocode {
|
|
540
544
|
@include pseudocodeBlock(#f7f7f7);
|
|
@@ -549,11 +553,11 @@ pre {
|
|
|
549
553
|
@include recommendationBlock();
|
|
550
554
|
@include listBlock();
|
|
551
555
|
|
|
552
|
-
|
|
556
|
+
figcaption, .SourceTitle, .AdmonitionTitle, .RecommendationTitle {
|
|
553
557
|
@include blockTitle()
|
|
554
558
|
}
|
|
555
559
|
|
|
556
|
-
|
|
560
|
+
figure dl {
|
|
557
561
|
}
|
|
558
562
|
|
|
559
563
|
/*
|
|
@@ -636,7 +640,7 @@ td > p:last-child, th > p:last-child {
|
|
|
636
640
|
}
|
|
637
641
|
|
|
638
642
|
|
|
639
|
-
|
|
643
|
+
table > caption {
|
|
640
644
|
text-align: center;
|
|
641
645
|
margin-top: 2.5em;
|
|
642
646
|
font-weight: 800;
|