metanorma-jis 0.0.10 → 0.1.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/jis/base_convert.rb +15 -104
- data/lib/isodoc/jis/html/style-human.css +8 -8
- data/lib/isodoc/jis/html/style-human.scss +8 -8
- data/lib/isodoc/jis/html/style-iso.css +19 -19
- data/lib/isodoc/jis/html/style-iso.scss +19 -19
- data/lib/isodoc/jis/jis.international-standard.xsl +238 -63
- data/lib/isodoc/jis/presentation_xml_convert.rb +68 -16
- data/lib/isodoc/jis/word_convert.rb +22 -56
- data/lib/isodoc/jis/xref.rb +36 -11
- data/lib/metanorma/jis/front.rb +106 -18
- data/lib/metanorma/jis/isodoc.rng +29 -4
- data/lib/metanorma/jis/version.rb +1 -1
- data/metanorma-jis.gemspec +1 -3
- 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: 4366e5bb7877d5bf27560046213279fdac21ff1b21a7cfcf2cb1456f39a03091
|
4
|
+
data.tar.gz: fdc359c5a0d15c34f767b6d7529a6837ef5e9b8a394edfeed15c9e6726e9f4b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92ccc85ff096d361680d9736b684adc199547be3a4edabdcbd923b1ff5d03af47f255ebc33602efc5b2d03085d2aa0a09f064dfec756e8093c7f0474d97796fa
|
7
|
+
data.tar.gz: bffef6682d58e65c5f85614a80baf4d0c99449b20e5a4b90200592dcaa05f64c597383b8a095e441597a1fe2bc859ef3c49bbb4dd254ea73d98ed91c07439d4d
|
@@ -4,73 +4,6 @@ require "metanorma-iso"
|
|
4
4
|
module IsoDoc
|
5
5
|
module JIS
|
6
6
|
module BaseConvert
|
7
|
-
def middle_title(_isoxml, out)
|
8
|
-
middle_title_hdr(out)
|
9
|
-
middle_title_main(out, "zzSTDTitle1")
|
10
|
-
middle_subtitle_main(out)
|
11
|
-
# middle_title_amd(out)
|
12
|
-
end
|
13
|
-
|
14
|
-
def middle_title_hdr(out)
|
15
|
-
out.p(class: "JapaneseIndustrialStandard") do |p|
|
16
|
-
p << @i18n.jis
|
17
|
-
@meta.get[:unpublished] and p << @i18n.l10n("(#{@i18n.draft_label})")
|
18
|
-
insert_tab(p, 7)
|
19
|
-
p << "<span class='JIS'>JIS</span>"
|
20
|
-
end
|
21
|
-
out.p(class: "StandardNumber") do |p|
|
22
|
-
insert_tab(p, 1)
|
23
|
-
p << @meta.get[:docnumber_undated]
|
24
|
-
if yr = @meta.get[:docyear]
|
25
|
-
p << ": "
|
26
|
-
p << "<span class='EffectiveYear'>#{yr}</span>"
|
27
|
-
end
|
28
|
-
end
|
29
|
-
out.p(class: "IDT")
|
30
|
-
end
|
31
|
-
|
32
|
-
def middle_title_main(out, style)
|
33
|
-
out.p(class: style) do |p|
|
34
|
-
p << @meta.get[:doctitleintro]
|
35
|
-
p << " — " if @meta.get[:doctitleintro] && @meta.get[:doctitlemain]
|
36
|
-
p << @meta.get[:doctitlemain]
|
37
|
-
p << " — " if @meta.get[:doctitlemain] && @meta.get[:doctitlepart]
|
38
|
-
end
|
39
|
-
a = @meta.get[:doctitlepart] and out.p(class: "zzSTDTitle1") do |p|
|
40
|
-
b = @meta.get[:doctitlepartlabel] and p << "#{b}: "
|
41
|
-
p << "<br/><b>#{a}</b>"
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
def middle_subtitle_main(out)
|
46
|
-
@meta.get[:docsubtitlemain] or return
|
47
|
-
out.p(class: "zzSTDTitle2") do |p|
|
48
|
-
p << @meta.get[:docsubtitleintro]
|
49
|
-
p << " — " if @meta.get[:docsubtitleintro] && @meta.get[:docsubtitlemain]
|
50
|
-
p << @meta.get[:docsubtitlemain]
|
51
|
-
p << " — " if @meta.get[:docsubtitlemain] && @meta.get[:docsubtitlepart]
|
52
|
-
end
|
53
|
-
a = @meta.get[:docsubtitlepart] and out.p(class: "zzSTDTitle2") do |p|
|
54
|
-
b = @meta.get[:docsubtitlepartlabel] and p << "#{b}: "
|
55
|
-
p << "<br/><b>#{a}</b>"
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
def commentary_title(_isoxml, out)
|
60
|
-
commentary_title_hdr(out)
|
61
|
-
middle_title_main(out, "CommentaryStandardName")
|
62
|
-
end
|
63
|
-
|
64
|
-
def commentary_title_hdr(out)
|
65
|
-
out.p(class: "CommentaryStandardNumber") do |p|
|
66
|
-
p << "JIS #{@meta.get[:docnumber_undated]}"
|
67
|
-
if yr = @meta.get[:docyear]
|
68
|
-
p << ": "
|
69
|
-
p << "<span class='CommentaryEffectiveYear'>#{yr}</span>"
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
7
|
def termnote_parse(node, out)
|
75
8
|
name = node.at(ns("./name"))&.remove
|
76
9
|
out.div **note_attrs(node) do |div|
|
@@ -93,52 +26,30 @@ module IsoDoc
|
|
93
26
|
end
|
94
27
|
end
|
95
28
|
|
96
|
-
def para_class(node)
|
97
|
-
super || node["class"]
|
98
|
-
end
|
99
|
-
|
100
29
|
def make_tr_attr(cell, row, totalrows, header, bordered)
|
101
30
|
cell["border"] == "0" and bordered = false
|
102
31
|
super
|
103
32
|
end
|
104
33
|
|
105
|
-
def
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
annex isoxml, out
|
114
|
-
bibliography isoxml, out
|
115
|
-
commentary isoxml, out
|
116
|
-
indexsect isoxml, out
|
117
|
-
end
|
118
|
-
|
119
|
-
def annex(isoxml, out)
|
120
|
-
amd(isoxml) and @suppressheadingnumbers = @oldsuppressheadingnumbers
|
121
|
-
isoxml.xpath(ns("//annex[not(@commentary = 'true')]")).each do |c|
|
122
|
-
page_break(out)
|
123
|
-
out.div **attr_code(annex_attrs(c)) do |s|
|
124
|
-
c.elements.each do |c1|
|
125
|
-
if c1.name == "title" then annex_name(c, c1, s)
|
126
|
-
else parse(c1, s)
|
127
|
-
end
|
128
|
-
end
|
34
|
+
def annex(node, out)
|
35
|
+
node["commentary"] = "true" and return commentary(node, out)
|
36
|
+
amd?(isoxml) and @suppressheadingnumbers = @oldsuppressheadingnumbers
|
37
|
+
page_break(out)
|
38
|
+
out.div **attr_code(annex_attrs(node)) do |s|
|
39
|
+
node.elements.each do |c1|
|
40
|
+
if c1.name == "title" then annex_name(node, c1, s)
|
41
|
+
else parse(c1, s) end
|
129
42
|
end
|
130
43
|
end
|
131
|
-
amd(isoxml) and @suppressheadingnumbers = true
|
44
|
+
amd?(isoxml) and @suppressheadingnumbers = true
|
132
45
|
end
|
133
46
|
|
134
|
-
def commentary(
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
else parse(c1, s)
|
141
|
-
end
|
47
|
+
def commentary(node, out)
|
48
|
+
page_break(out)
|
49
|
+
out.div **attr_code(annex_attrs(node)) do |s|
|
50
|
+
node.elements.each do |c1|
|
51
|
+
if c1.name == "title" then annex_name(node, c1, s)
|
52
|
+
else parse(c1, s)
|
142
53
|
end
|
143
54
|
end
|
144
55
|
end
|
@@ -301,10 +301,10 @@ blockquote,
|
|
301
301
|
q {
|
302
302
|
quotes: none; }
|
303
303
|
|
304
|
-
blockquote
|
305
|
-
blockquote
|
306
|
-
q
|
307
|
-
q
|
304
|
+
blockquote::before,
|
305
|
+
blockquote::after,
|
306
|
+
q::before,
|
307
|
+
q::after {
|
308
308
|
content: '';
|
309
309
|
content: none; }
|
310
310
|
|
@@ -458,7 +458,7 @@ h2 p, .h2 p {
|
|
458
458
|
ul > li {
|
459
459
|
list-style: none; }
|
460
460
|
|
461
|
-
ul > li > p:first-child
|
461
|
+
ul > li > p:first-child::before {
|
462
462
|
content: "\2014";
|
463
463
|
display: inline-block;
|
464
464
|
width: 1em;
|
@@ -470,7 +470,7 @@ li p {
|
|
470
470
|
margin-bottom: 0.6em;
|
471
471
|
line-height: 1.2; }
|
472
472
|
|
473
|
-
#toc li
|
473
|
+
#toc li::before {
|
474
474
|
content: " ";
|
475
475
|
display: none; }
|
476
476
|
|
@@ -521,7 +521,7 @@ p.Terms {
|
|
521
521
|
#toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
522
522
|
padding: 0 1.5em;
|
523
523
|
overflow: visible; } }
|
524
|
-
#toc li
|
524
|
+
#toc li::before, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li::before {
|
525
525
|
content: " ";
|
526
526
|
display: none; }
|
527
527
|
|
@@ -1030,7 +1030,7 @@ ol.footnotes-list p,
|
|
1030
1030
|
aside.footnote {
|
1031
1031
|
display: inline; }
|
1032
1032
|
|
1033
|
-
ol > li > p
|
1033
|
+
ol > li > p::before {
|
1034
1034
|
content: "";
|
1035
1035
|
display: none; }
|
1036
1036
|
|
@@ -38,10 +38,10 @@ q {
|
|
38
38
|
quotes: none;
|
39
39
|
}
|
40
40
|
|
41
|
-
blockquote
|
42
|
-
blockquote
|
43
|
-
q
|
44
|
-
q
|
41
|
+
blockquote::before,
|
42
|
+
blockquote::after,
|
43
|
+
q::before,
|
44
|
+
q::after {
|
45
45
|
content: '';
|
46
46
|
content: none;
|
47
47
|
}
|
@@ -232,7 +232,7 @@ ul>li {
|
|
232
232
|
list-style: none;
|
233
233
|
}
|
234
234
|
|
235
|
-
ul>li>p:first-child
|
235
|
+
ul>li>p:first-child::before {
|
236
236
|
content: "\2014";
|
237
237
|
display: inline-block;
|
238
238
|
width: 1em;
|
@@ -246,7 +246,7 @@ li p {
|
|
246
246
|
line-height: 1.2;
|
247
247
|
}
|
248
248
|
|
249
|
-
#toc li
|
249
|
+
#toc li::before {
|
250
250
|
content: " ";
|
251
251
|
display: none;
|
252
252
|
}
|
@@ -271,7 +271,7 @@ p.Terms {
|
|
271
271
|
// box-shadow: inset -5px 0px 10px -5px #1d1d1d !important;
|
272
272
|
// }
|
273
273
|
|
274
|
-
li
|
274
|
+
li::before {
|
275
275
|
content: " ";
|
276
276
|
display: none;
|
277
277
|
}
|
@@ -694,7 +694,7 @@ aside.footnote {
|
|
694
694
|
display: inline;
|
695
695
|
}
|
696
696
|
|
697
|
-
ol>li>p
|
697
|
+
ol>li>p::before {
|
698
698
|
content: "";
|
699
699
|
display: none;
|
700
700
|
}
|
@@ -295,8 +295,8 @@ body {
|
|
295
295
|
blockquote, q {
|
296
296
|
quotes: none; }
|
297
297
|
|
298
|
-
blockquote
|
299
|
-
q
|
298
|
+
blockquote::before, blockquote::after,
|
299
|
+
q::before, q::after {
|
300
300
|
content: '';
|
301
301
|
content: none; }
|
302
302
|
|
@@ -410,7 +410,7 @@ h2 p, .h2 p {
|
|
410
410
|
ul > li {
|
411
411
|
list-style: none; }
|
412
412
|
|
413
|
-
ul > li > p:first-child
|
413
|
+
ul > li > p:first-child::before {
|
414
414
|
content: "\2014";
|
415
415
|
display: inline-block;
|
416
416
|
width: 1em;
|
@@ -473,7 +473,7 @@ p.Terms {
|
|
473
473
|
#toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
|
474
474
|
box-shadow: 0px 1px 0px 0px black !important;
|
475
475
|
background: none; }
|
476
|
-
#toc li
|
476
|
+
#toc li::before, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li::before {
|
477
477
|
content: " ";
|
478
478
|
display: none; }
|
479
479
|
|
@@ -793,57 +793,57 @@ ol > li {
|
|
793
793
|
list-style: none;
|
794
794
|
position: relative; }
|
795
795
|
|
796
|
-
ol > li
|
796
|
+
ol > li::before {
|
797
797
|
position: absolute;
|
798
798
|
left: -1.4em; }
|
799
799
|
|
800
|
-
ol[class="roman"] > li
|
800
|
+
ol[class="roman"] > li::before {
|
801
801
|
left: -2.0em; }
|
802
802
|
|
803
|
-
ol[class="roman_upper"] > li
|
803
|
+
ol[class="roman_upper"] > li::before {
|
804
804
|
left: -2.3em; }
|
805
805
|
|
806
|
-
ol[class="alphabet"] > li
|
806
|
+
ol[class="alphabet"] > li::before {
|
807
807
|
counter-increment: alphabet;
|
808
808
|
content: counter(alphabet, lower-alpha) ") "; }
|
809
809
|
|
810
|
-
ol[class="arabic"] > li
|
810
|
+
ol[class="arabic"] > li::before {
|
811
811
|
counter-increment: arabic;
|
812
812
|
content: counter(arabic, decimal) ") "; }
|
813
813
|
|
814
|
-
ol[class="roman"] > li
|
814
|
+
ol[class="roman"] > li::before {
|
815
815
|
counter-increment: roman;
|
816
816
|
content: counter(roman, lower-roman) ") "; }
|
817
817
|
|
818
|
-
ol[class="alphabet_upper"] > li
|
818
|
+
ol[class="alphabet_upper"] > li::before {
|
819
819
|
counter-increment: alphabet_upper;
|
820
820
|
content: counter(alphabet_upper, upper-alpha) ") "; }
|
821
821
|
|
822
|
-
ol[class="roman_upper"] > li
|
822
|
+
ol[class="roman_upper"] > li::before {
|
823
823
|
counter-increment: roman_upper;
|
824
824
|
content: counter(roman_upper, upper-roman) ") "; }
|
825
825
|
|
826
|
-
ol > li
|
826
|
+
ol > li::before {
|
827
827
|
counter-increment: alphabet;
|
828
828
|
content: counter(alphabet, lower-alpha) ") "; }
|
829
829
|
|
830
|
-
ol[class="alphabet"] ol[class="alphabet"] > li
|
830
|
+
ol[class="alphabet"] ol[class="alphabet"] > li::before {
|
831
831
|
counter-increment: alphabet2;
|
832
832
|
content: counter(alphabet2, lower-alpha) ") "; }
|
833
833
|
|
834
|
-
ol[class="arabic"] ol[class="arabic"] > li
|
834
|
+
ol[class="arabic"] ol[class="arabic"] > li::before {
|
835
835
|
counter-increment: arabic2;
|
836
836
|
content: counter(arabic2, decimal) ") "; }
|
837
837
|
|
838
|
-
ol[class="roman"] ol[class="roman"] > li
|
838
|
+
ol[class="roman"] ol[class="roman"] > li::before {
|
839
839
|
counter-increment: roman2;
|
840
840
|
content: counter(roman2, lower-roman) ") "; }
|
841
841
|
|
842
|
-
ol[class="alphabet_upper"] ol[class="alphabet_upper"] > li
|
842
|
+
ol[class="alphabet_upper"] ol[class="alphabet_upper"] > li::before {
|
843
843
|
counter-increment: alphabet_upper2;
|
844
844
|
content: counter(alphabet_upper2, upper-alpha) ") "; }
|
845
845
|
|
846
|
-
ol[class="roman_upper"] ol[class="roman_upper"] > li
|
846
|
+
ol[class="roman_upper"] ol[class="roman_upper"] > li::before {
|
847
847
|
counter-increment: roman_upper2;
|
848
848
|
content: counter(roman_upper2, upper-roman) ") "; }
|
849
849
|
|
@@ -1067,7 +1067,7 @@ ol.footnotes-list:first-child {
|
|
1067
1067
|
ol.footnotes-list p, aside.footnote p {
|
1068
1068
|
display: inline; }
|
1069
1069
|
|
1070
|
-
ol > li > p
|
1070
|
+
ol > li > p::before {
|
1071
1071
|
content: "";
|
1072
1072
|
display: none; }
|
1073
1073
|
|
@@ -27,8 +27,8 @@ body {
|
|
27
27
|
blockquote, q {
|
28
28
|
quotes: none;
|
29
29
|
}
|
30
|
-
blockquote
|
31
|
-
q
|
30
|
+
blockquote::before, blockquote::after,
|
31
|
+
q::before, q::after {
|
32
32
|
content: '';
|
33
33
|
content: none;
|
34
34
|
}
|
@@ -177,7 +177,7 @@ ul > li {
|
|
177
177
|
list-style: none;
|
178
178
|
}
|
179
179
|
|
180
|
-
ul > li > p:first-child
|
180
|
+
ul > li > p:first-child::before {
|
181
181
|
content: "\2014";
|
182
182
|
display: inline-block;
|
183
183
|
width: 1em;
|
@@ -210,7 +210,7 @@ p.Terms {
|
|
210
210
|
background: none;
|
211
211
|
}
|
212
212
|
|
213
|
-
li
|
213
|
+
li::before {
|
214
214
|
content: " ";
|
215
215
|
display: none;
|
216
216
|
}
|
@@ -458,57 +458,57 @@ ol > li {
|
|
458
458
|
list-style: none;
|
459
459
|
position: relative;
|
460
460
|
}
|
461
|
-
ol > li
|
461
|
+
ol > li::before {
|
462
462
|
position: absolute;
|
463
463
|
left: -1.4em;
|
464
464
|
}
|
465
|
-
ol[class="roman"] > li
|
465
|
+
ol[class="roman"] > li::before {
|
466
466
|
left: -2.0em;
|
467
467
|
}
|
468
|
-
ol[class="roman_upper"] > li
|
468
|
+
ol[class="roman_upper"] > li::before {
|
469
469
|
left: -2.3em;
|
470
470
|
}
|
471
|
-
ol[class="alphabet"] > li
|
471
|
+
ol[class="alphabet"] > li::before {
|
472
472
|
counter-increment: alphabet;
|
473
473
|
content: counter(alphabet, lower-alpha)") "
|
474
474
|
}
|
475
|
-
ol[class="arabic"] > li
|
475
|
+
ol[class="arabic"] > li::before {
|
476
476
|
counter-increment: arabic;
|
477
477
|
content: counter(arabic, decimal)") "
|
478
478
|
}
|
479
|
-
ol[class="roman"] > li
|
479
|
+
ol[class="roman"] > li::before {
|
480
480
|
counter-increment: roman;
|
481
481
|
content: counter(roman, lower-roman)") "
|
482
482
|
}
|
483
|
-
ol[class="alphabet_upper"] > li
|
483
|
+
ol[class="alphabet_upper"] > li::before {
|
484
484
|
counter-increment: alphabet_upper;
|
485
485
|
content: counter(alphabet_upper, upper-alpha)") "
|
486
486
|
}
|
487
|
-
ol[class="roman_upper"] > li
|
487
|
+
ol[class="roman_upper"] > li::before {
|
488
488
|
counter-increment: roman_upper;
|
489
489
|
content: counter(roman_upper, upper-roman)") "
|
490
490
|
}
|
491
|
-
ol > li
|
491
|
+
ol > li::before {
|
492
492
|
counter-increment: alphabet;
|
493
493
|
content: counter(alphabet, lower-alpha)") "
|
494
494
|
}
|
495
|
-
ol[class="alphabet"] ol[class="alphabet"] > li
|
495
|
+
ol[class="alphabet"] ol[class="alphabet"] > li::before {
|
496
496
|
counter-increment: alphabet2;
|
497
497
|
content: counter(alphabet2, lower-alpha)") "
|
498
498
|
}
|
499
|
-
ol[class="arabic"] ol[class="arabic"] > li
|
499
|
+
ol[class="arabic"] ol[class="arabic"] > li::before {
|
500
500
|
counter-increment: arabic2;
|
501
501
|
content: counter(arabic2, decimal)") "
|
502
502
|
}
|
503
|
-
ol[class="roman"] ol[class="roman"] > li
|
503
|
+
ol[class="roman"] ol[class="roman"] > li::before {
|
504
504
|
counter-increment: roman2;
|
505
505
|
content: counter(roman2, lower-roman)") "
|
506
506
|
}
|
507
|
-
ol[class="alphabet_upper"] ol[class="alphabet_upper"] > li
|
507
|
+
ol[class="alphabet_upper"] ol[class="alphabet_upper"] > li::before {
|
508
508
|
counter-increment: alphabet_upper2;
|
509
509
|
content: counter(alphabet_upper2, upper-alpha)") "
|
510
510
|
}
|
511
|
-
ol[class="roman_upper"] ol[class="roman_upper"] > li
|
511
|
+
ol[class="roman_upper"] ol[class="roman_upper"] > li::before {
|
512
512
|
counter-increment: roman_upper2;
|
513
513
|
content: counter(roman_upper2, upper-roman)") "
|
514
514
|
}
|
@@ -723,7 +723,7 @@ ol.footnotes-list p, aside.footnote p {
|
|
723
723
|
display: inline;
|
724
724
|
}
|
725
725
|
|
726
|
-
ol > li > p
|
726
|
+
ol > li > p::before {
|
727
727
|
content: "";
|
728
728
|
display: none;
|
729
729
|
}
|