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 +4 -4
- data/lib/isodoc/jis/base_convert.rb +13 -102
- data/lib/isodoc/jis/html/style-human.css +15 -11
- data/lib/isodoc/jis/html/style-human.scss +8 -8
- data/lib/isodoc/jis/html/style-iso.css +26 -22
- data/lib/isodoc/jis/html/style-iso.scss +19 -19
- data/lib/isodoc/jis/jis.international-standard.xsl +262 -67
- data/lib/isodoc/jis/presentation_xml_convert.rb +70 -1
- data/lib/isodoc/jis/word_convert.rb +22 -56
- data/lib/metanorma/jis/isodoc.rng +26 -4
- data/lib/metanorma/jis/version.rb +1 -1
- data/metanorma-jis.gemspec +1 -1
- metadata +4 -4
@@ -63,34 +63,29 @@ module IsoDoc
|
|
63
63
|
olstyle: "l8" }
|
64
64
|
end
|
65
65
|
|
66
|
-
def norm_ref(
|
67
|
-
|
68
|
-
return num
|
66
|
+
def norm_ref(node, out)
|
67
|
+
node["hidden"] != "true" or return
|
69
68
|
out.div class: "normref_div" do |div|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
else biblio_list(f, div, false)
|
69
|
+
clause_name(node, node.at(ns("./title")), div, nil)
|
70
|
+
if node.name == "clause"
|
71
|
+
node.elements.each { |e| parse(e, div) unless e.name == "title" }
|
72
|
+
else biblio_list(node, div, false)
|
75
73
|
end
|
76
74
|
end
|
77
|
-
num
|
78
75
|
end
|
79
76
|
|
80
|
-
def bibliography(
|
81
|
-
|
82
|
-
return
|
77
|
+
def bibliography(node, out)
|
78
|
+
node["hidden"] != "true" or return
|
83
79
|
page_break(out)
|
84
80
|
out.div class: "bibliography" do |div|
|
85
81
|
div.h1 class: "Section3" do |h1|
|
86
|
-
|
82
|
+
node.at(ns("./title"))&.children&.each { |c2| parse(c2, h1) }
|
87
83
|
end
|
88
|
-
biblio_list(
|
84
|
+
biblio_list(node, div, true)
|
89
85
|
end
|
90
86
|
end
|
91
87
|
|
92
88
|
def annex_name(_annex, name, div)
|
93
|
-
preceding_floating_titles(name, div)
|
94
89
|
return if name.nil?
|
95
90
|
|
96
91
|
div.h1 class: "Annex" do |t|
|
@@ -114,32 +109,6 @@ module IsoDoc
|
|
114
109
|
end
|
115
110
|
end
|
116
111
|
|
117
|
-
def make_body2(body, docxml)
|
118
|
-
body.div class: "WordSection2" do |div2|
|
119
|
-
boilerplate docxml, div2
|
120
|
-
front docxml, div2
|
121
|
-
div2.p { |p| p << " " } # placeholder
|
122
|
-
end
|
123
|
-
section_break(body)
|
124
|
-
end
|
125
|
-
|
126
|
-
def middle(isoxml, out)
|
127
|
-
middle_title(isoxml, out)
|
128
|
-
middle_admonitions(isoxml, out)
|
129
|
-
i = isoxml.at(ns("//sections/introduction")) and
|
130
|
-
introduction i, out
|
131
|
-
scope isoxml, out, 0
|
132
|
-
norm_ref isoxml, out, 0
|
133
|
-
clause_etc isoxml, out, 0
|
134
|
-
annex isoxml, out
|
135
|
-
bibliography isoxml, out
|
136
|
-
end
|
137
|
-
|
138
|
-
def make_body3(body, docxml)
|
139
|
-
super
|
140
|
-
commentary docxml, body
|
141
|
-
end
|
142
|
-
|
143
112
|
def footnote_parse(node, out)
|
144
113
|
return table_footnote_parse(node, out) if @in_table || @in_figure # &&
|
145
114
|
|
@@ -161,23 +130,20 @@ module IsoDoc
|
|
161
130
|
@seen_footnote << fn
|
162
131
|
end
|
163
132
|
|
164
|
-
def annex(
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
amd(
|
133
|
+
def annex(node, out)
|
134
|
+
node["commentary"] == "true" and return commentary(node, out)
|
135
|
+
amd(node.document.root) and
|
136
|
+
@suppressheadingnumbers = @oldsuppressheadingnumbers
|
137
|
+
page_break(out)
|
138
|
+
render_annex(out, node)
|
139
|
+
amd(node.document.root) and @suppressheadingnumbers = true
|
171
140
|
end
|
172
141
|
|
173
|
-
def commentary(
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
commentary_title(isoxml, div)
|
179
|
-
render_annex(div, c)
|
180
|
-
end
|
142
|
+
def commentary(node, out)
|
143
|
+
out.span style: "mso-bookmark:PRECOMMENTARYPAGEREF"
|
144
|
+
section_break(out)
|
145
|
+
out.div class: "WordSectionCommentary" do |div|
|
146
|
+
render_annex(div, node)
|
181
147
|
end
|
182
148
|
end
|
183
149
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
these elements; we just want one namespace for any child grammars
|
18
18
|
of this.
|
19
19
|
-->
|
20
|
-
<!-- VERSION v1.2.
|
20
|
+
<!-- VERSION v1.2.3 -->
|
21
21
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
22
22
|
<include href="reqt.rng"/>
|
23
23
|
<include href="basicdoc.rng">
|
@@ -192,9 +192,11 @@
|
|
192
192
|
</attribute>
|
193
193
|
</optional>
|
194
194
|
<attribute name="citeas"/>
|
195
|
-
<
|
196
|
-
<
|
197
|
-
|
195
|
+
<optional>
|
196
|
+
<attribute name="type">
|
197
|
+
<ref name="ReferenceFormat"/>
|
198
|
+
</attribute>
|
199
|
+
</optional>
|
198
200
|
<optional>
|
199
201
|
<attribute name="alt"/>
|
200
202
|
</optional>
|
@@ -836,6 +838,26 @@
|
|
836
838
|
<ref name="paragraph"/>
|
837
839
|
</element>
|
838
840
|
</define>
|
841
|
+
<define name="stem">
|
842
|
+
<element name="stem">
|
843
|
+
<attribute name="type">
|
844
|
+
<choice>
|
845
|
+
<value>MathML</value>
|
846
|
+
<value>AsciiMath</value>
|
847
|
+
<value>LatexMath</value>
|
848
|
+
</choice>
|
849
|
+
</attribute>
|
850
|
+
<attribute name="block">
|
851
|
+
<data type="boolean"/>
|
852
|
+
</attribute>
|
853
|
+
<oneOrMore>
|
854
|
+
<choice>
|
855
|
+
<text/>
|
856
|
+
<ref name="AnyElement"/>
|
857
|
+
</choice>
|
858
|
+
</oneOrMore>
|
859
|
+
</element>
|
860
|
+
</define>
|
839
861
|
<define name="em">
|
840
862
|
<element name="em">
|
841
863
|
<zeroOrMore>
|
data/metanorma-jis.gemspec
CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
31
31
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
32
32
|
|
33
|
-
spec.add_dependency "metanorma-iso", "~> 2.
|
33
|
+
spec.add_dependency "metanorma-iso", "~> 2.5.0"
|
34
34
|
#spec.add_dependency "relaton-bipm", "~> 1.14.8"
|
35
35
|
#spec.add_dependency "relaton-iho", "~> 1.14.3"
|
36
36
|
spec.add_dependency "pubid-jis"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-jis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-iso
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.5.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.5.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pubid-jis
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|