metanorma-jis 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96fb5369c9530447626770ee760870db7070e6fd45aa3b1967c7dafaab62d4f1
4
- data.tar.gz: 325357b99ed0186f8297579404bed3a0935b9d5bbd4d43456330b18af8387bf0
3
+ metadata.gz: 0ff1a468059b202d18d33ada0b23da0b282c96759e92abc63ed4fa5de1bd1758
4
+ data.tar.gz: 8a9c0567a2aac6d8ee74055e473c38529c5159ecc5dc1ebc4a43e91f4bafe867
5
5
  SHA512:
6
- metadata.gz: 057bb29e1dce2f8a646f7ad95151111dbee6cc38effe9609d51a081b79e04e88eedea5c59eb6a541cce1f731d7036236a7a9be227d6ae5777c0448c2273dc495
7
- data.tar.gz: 2916496bebb78fbf748f177c67503143175abffcaa25adca5c96b3440c2e6d5a064a2d3461ef97816433da1745482ff869edf320f376d6cffc764908b2e72eec
6
+ metadata.gz: 6bd9b580671c15264219ba773d0abdb2213f864c122d4f38ebb94dcacecf5c2ad1a78c1ab482d9d616e7f3d4ecbd732b5c8b0d013386bb53d07af0829f36401d
7
+ data.tar.gz: 63dff5f511d7f9e2cd2867bfadad394d4fc80a27566610633888dbec19efe7d62ac53b71233791ef1b01430702317af83d58eb8a2f9d3ccafd619508a7e7d76a
@@ -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 << " &#x2014; " if @meta.get[:doctitleintro] && @meta.get[:doctitlemain]
36
- p << @meta.get[:doctitlemain]
37
- p << " &#x2014; " 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 << " &#x2014; " if @meta.get[:docsubtitleintro] && @meta.get[:docsubtitlemain]
50
- p << @meta.get[:docsubtitlemain]
51
- p << " &#x2014; " 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 middle(isoxml, out)
106
- middle_title(isoxml, out)
107
- middle_admonitions(isoxml, out)
108
- i = isoxml.at(ns("//sections/introduction")) and
109
- introduction i, out
110
- scope isoxml, out, 0
111
- norm_ref isoxml, out, 0
112
- clause_etc isoxml, out, 0
113
- annex isoxml, out
114
- bibliography isoxml, out
115
- commentary isoxml, out
116
- indexsect isoxml, out
117
- end
118
-
119
- def annex(isoxml, out)
34
+ def annex(node, out)
35
+ node["commentary"] = "true" and return commentary(node, out)
120
36
  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
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
44
  amd(isoxml) and @suppressheadingnumbers = true
132
45
  end
133
46
 
134
- def commentary(isoxml, out)
135
- isoxml.xpath(ns("//annex[@commentary = 'true']")).each do |c|
136
- page_break(out)
137
- out.div **attr_code(annex_attrs(c)) do |s|
138
- c.elements.each do |c1|
139
- if c1.name == "title" then annex_name(c, c1, s)
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
@@ -97,7 +97,7 @@ h1, h2, h3, h4, h5, h6 {
97
97
 
98
98
  blockquote, q {
99
99
  quotes: none; }
100
- blockquote:before, blockquote:after, q:before, q:after {
100
+ blockquote::before, blockquote::after, q::before, q::after {
101
101
  content: '';
102
102
  content: none; }
103
103
 
@@ -120,14 +120,18 @@ b, strong {
120
120
  div.document-stage-band, div.document-type-band {
121
121
  background-color: #333333; }
122
122
 
123
- a.FootnoteRef + a.FootnoteRef:before {
123
+ a.FootnoteRef + a.FootnoteRef::before {
124
124
  content: ", ";
125
125
  vertical-align: super; }
126
126
 
127
- a.TableFootnoteRef + a.TableFootnoteRef:before {
127
+ a.TableFootnoteRef + a.TableFootnoteRef::before {
128
128
  content: ", ";
129
129
  vertical-align: super; }
130
130
 
131
+ a.TableFootnoteRef, span.TableFootnoteRef,
132
+ a.FootnoteRef, span.FootnoteRef {
133
+ vertical-align: super; }
134
+
131
135
  .addition {
132
136
  color: blue; }
133
137
 
@@ -297,10 +301,10 @@ blockquote,
297
301
  q {
298
302
  quotes: none; }
299
303
 
300
- blockquote:before,
301
- blockquote:after,
302
- q:before,
303
- q:after {
304
+ blockquote::before,
305
+ blockquote::after,
306
+ q::before,
307
+ q::after {
304
308
  content: '';
305
309
  content: none; }
306
310
 
@@ -454,7 +458,7 @@ h2 p, .h2 p {
454
458
  ul > li {
455
459
  list-style: none; }
456
460
 
457
- ul > li > p:first-child:before {
461
+ ul > li > p:first-child::before {
458
462
  content: "\2014";
459
463
  display: inline-block;
460
464
  width: 1em;
@@ -466,7 +470,7 @@ li p {
466
470
  margin-bottom: 0.6em;
467
471
  line-height: 1.2; }
468
472
 
469
- #toc li:before {
473
+ #toc li::before {
470
474
  content: " ";
471
475
  display: none; }
472
476
 
@@ -517,7 +521,7 @@ p.Terms {
517
521
  #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
518
522
  padding: 0 1.5em;
519
523
  overflow: visible; } }
520
- #toc li:before, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:before {
524
+ #toc li::before, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li::before {
521
525
  content: " ";
522
526
  display: none; }
523
527
 
@@ -1026,7 +1030,7 @@ ol.footnotes-list p,
1026
1030
  aside.footnote {
1027
1031
  display: inline; }
1028
1032
 
1029
- ol > li > p:before {
1033
+ ol > li > p::before {
1030
1034
  content: "";
1031
1035
  display: none; }
1032
1036
 
@@ -38,10 +38,10 @@ q {
38
38
  quotes: none;
39
39
  }
40
40
 
41
- blockquote:before,
42
- blockquote:after,
43
- q:before,
44
- q:after {
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:before {
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:before {
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:before {
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:before {
697
+ ol>li>p::before {
698
698
  content: "";
699
699
  display: none;
700
700
  }
@@ -97,7 +97,7 @@ h1, h2, h3, h4, h5, h6 {
97
97
 
98
98
  blockquote, q {
99
99
  quotes: none; }
100
- blockquote:before, blockquote:after, q:before, q:after {
100
+ blockquote::before, blockquote::after, q::before, q::after {
101
101
  content: '';
102
102
  content: none; }
103
103
 
@@ -120,14 +120,18 @@ b, strong {
120
120
  div.document-stage-band, div.document-type-band {
121
121
  background-color: #333333; }
122
122
 
123
- a.FootnoteRef + a.FootnoteRef:before {
123
+ a.FootnoteRef + a.FootnoteRef::before {
124
124
  content: ", ";
125
125
  vertical-align: super; }
126
126
 
127
- a.TableFootnoteRef + a.TableFootnoteRef:before {
127
+ a.TableFootnoteRef + a.TableFootnoteRef::before {
128
128
  content: ", ";
129
129
  vertical-align: super; }
130
130
 
131
+ a.TableFootnoteRef, span.TableFootnoteRef,
132
+ a.FootnoteRef, span.FootnoteRef {
133
+ vertical-align: super; }
134
+
131
135
  .addition {
132
136
  color: blue; }
133
137
 
@@ -291,8 +295,8 @@ body {
291
295
  blockquote, q {
292
296
  quotes: none; }
293
297
 
294
- blockquote:before, blockquote:after,
295
- q:before, q:after {
298
+ blockquote::before, blockquote::after,
299
+ q::before, q::after {
296
300
  content: '';
297
301
  content: none; }
298
302
 
@@ -406,7 +410,7 @@ h2 p, .h2 p {
406
410
  ul > li {
407
411
  list-style: none; }
408
412
 
409
- ul > li > p:first-child:before {
413
+ ul > li > p:first-child::before {
410
414
  content: "\2014";
411
415
  display: inline-block;
412
416
  width: 1em;
@@ -469,7 +473,7 @@ p.Terms {
469
473
  #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
470
474
  box-shadow: 0px 1px 0px 0px black !important;
471
475
  background: none; }
472
- #toc li:before, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:before {
476
+ #toc li::before, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li::before {
473
477
  content: " ";
474
478
  display: none; }
475
479
 
@@ -789,57 +793,57 @@ ol > li {
789
793
  list-style: none;
790
794
  position: relative; }
791
795
 
792
- ol > li:before {
796
+ ol > li::before {
793
797
  position: absolute;
794
798
  left: -1.4em; }
795
799
 
796
- ol[class="roman"] > li:before {
800
+ ol[class="roman"] > li::before {
797
801
  left: -2.0em; }
798
802
 
799
- ol[class="roman_upper"] > li:before {
803
+ ol[class="roman_upper"] > li::before {
800
804
  left: -2.3em; }
801
805
 
802
- ol[class="alphabet"] > li:before {
806
+ ol[class="alphabet"] > li::before {
803
807
  counter-increment: alphabet;
804
808
  content: counter(alphabet, lower-alpha) ") "; }
805
809
 
806
- ol[class="arabic"] > li:before {
810
+ ol[class="arabic"] > li::before {
807
811
  counter-increment: arabic;
808
812
  content: counter(arabic, decimal) ") "; }
809
813
 
810
- ol[class="roman"] > li:before {
814
+ ol[class="roman"] > li::before {
811
815
  counter-increment: roman;
812
816
  content: counter(roman, lower-roman) ") "; }
813
817
 
814
- ol[class="alphabet_upper"] > li:before {
818
+ ol[class="alphabet_upper"] > li::before {
815
819
  counter-increment: alphabet_upper;
816
820
  content: counter(alphabet_upper, upper-alpha) ") "; }
817
821
 
818
- ol[class="roman_upper"] > li:before {
822
+ ol[class="roman_upper"] > li::before {
819
823
  counter-increment: roman_upper;
820
824
  content: counter(roman_upper, upper-roman) ") "; }
821
825
 
822
- ol > li:before {
826
+ ol > li::before {
823
827
  counter-increment: alphabet;
824
828
  content: counter(alphabet, lower-alpha) ") "; }
825
829
 
826
- ol[class="alphabet"] ol[class="alphabet"] > li:before {
830
+ ol[class="alphabet"] ol[class="alphabet"] > li::before {
827
831
  counter-increment: alphabet2;
828
832
  content: counter(alphabet2, lower-alpha) ") "; }
829
833
 
830
- ol[class="arabic"] ol[class="arabic"] > li:before {
834
+ ol[class="arabic"] ol[class="arabic"] > li::before {
831
835
  counter-increment: arabic2;
832
836
  content: counter(arabic2, decimal) ") "; }
833
837
 
834
- ol[class="roman"] ol[class="roman"] > li:before {
838
+ ol[class="roman"] ol[class="roman"] > li::before {
835
839
  counter-increment: roman2;
836
840
  content: counter(roman2, lower-roman) ") "; }
837
841
 
838
- ol[class="alphabet_upper"] ol[class="alphabet_upper"] > li:before {
842
+ ol[class="alphabet_upper"] ol[class="alphabet_upper"] > li::before {
839
843
  counter-increment: alphabet_upper2;
840
844
  content: counter(alphabet_upper2, upper-alpha) ") "; }
841
845
 
842
- ol[class="roman_upper"] ol[class="roman_upper"] > li:before {
846
+ ol[class="roman_upper"] ol[class="roman_upper"] > li::before {
843
847
  counter-increment: roman_upper2;
844
848
  content: counter(roman_upper2, upper-roman) ") "; }
845
849
 
@@ -1063,7 +1067,7 @@ ol.footnotes-list:first-child {
1063
1067
  ol.footnotes-list p, aside.footnote p {
1064
1068
  display: inline; }
1065
1069
 
1066
- ol > li > p:before {
1070
+ ol > li > p::before {
1067
1071
  content: "";
1068
1072
  display: none; }
1069
1073
 
@@ -27,8 +27,8 @@ body {
27
27
  blockquote, q {
28
28
  quotes: none;
29
29
  }
30
- blockquote:before, blockquote:after,
31
- q:before, q:after {
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:before {
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:before {
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:before {
461
+ ol > li::before {
462
462
  position: absolute;
463
463
  left: -1.4em;
464
464
  }
465
- ol[class="roman"] > li:before {
465
+ ol[class="roman"] > li::before {
466
466
  left: -2.0em;
467
467
  }
468
- ol[class="roman_upper"] > li:before {
468
+ ol[class="roman_upper"] > li::before {
469
469
  left: -2.3em;
470
470
  }
471
- ol[class="alphabet"] > li:before {
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:before {
475
+ ol[class="arabic"] > li::before {
476
476
  counter-increment: arabic;
477
477
  content: counter(arabic, decimal)") "
478
478
  }
479
- ol[class="roman"] > li:before {
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:before {
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:before {
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:before {
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:before {
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:before {
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:before {
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:before {
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:before {
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:before {
726
+ ol > li > p::before {
727
727
  content: "";
728
728
  display: none;
729
729
  }