metanorma-jis 0.0.5 → 0.0.6
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/html/header.html +70 -33
- data/lib/isodoc/jis/html/wordstyle.css +10 -13
- data/lib/isodoc/jis/html/wordstyle.scss +10 -13
- data/lib/isodoc/jis/jis.international-standard.xsl +588 -59
- data/lib/isodoc/jis/word_convert.rb +1 -0
- data/lib/metanorma/jis/cleanup.rb +23 -0
- data/lib/metanorma/jis/converter.rb +5 -0
- data/lib/metanorma/jis/isodoc.rng +5 -1
- data/lib/metanorma/jis/version.rb +1 -1
- data/metanorma-jis.gemspec +2 -0
- metadata +2 -2
@@ -172,6 +172,7 @@ module IsoDoc
|
|
172
172
|
|
173
173
|
def commentary(isoxml, out)
|
174
174
|
isoxml.xpath(ns("//annex[@commentary = 'true']")).each do |c|
|
175
|
+
out.span style: "mso-bookmark:PRECOMMENTARYPAGEREF"
|
175
176
|
section_break(out)
|
176
177
|
out.div class: "WordSectionCommentary" do |div|
|
177
178
|
commentary_title(isoxml, div)
|
@@ -38,6 +38,29 @@ module Metanorma
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def docidentifier_cleanup(xmldoc); end
|
41
|
+
|
42
|
+
def note_cleanup(xmldoc)
|
43
|
+
note_example_to_table(xmldoc)
|
44
|
+
super
|
45
|
+
clean_example_keep_separate(xmldoc)
|
46
|
+
end
|
47
|
+
|
48
|
+
def note_example_to_table(xmldoc)
|
49
|
+
xmldoc.xpath("//table").each do |t|
|
50
|
+
t.xpath("./following-sibling::*").each do |n|
|
51
|
+
%w(note example).include?(n.name) or break
|
52
|
+
n["keep-separate"] == "true" and break
|
53
|
+
n.parent = t
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def clean_example_keep_separate(xmldoc)
|
59
|
+
xmldoc.xpath("//example[@keep-separate] | " \
|
60
|
+
"//termexample[@keep-separate]").each do |n|
|
61
|
+
n.delete("keep-separate")
|
62
|
+
end
|
63
|
+
end
|
41
64
|
end
|
42
65
|
end
|
43
66
|
end
|
@@ -39,6 +39,11 @@ module Metanorma
|
|
39
39
|
ret
|
40
40
|
end
|
41
41
|
|
42
|
+
def example_attrs(node)
|
43
|
+
attr_code(id_unnum_attrs(node).merge(keep_attrs(node))
|
44
|
+
.merge("keep-separate": node.attr("keep-separate")))
|
45
|
+
end
|
46
|
+
|
42
47
|
def html_converter(node)
|
43
48
|
if node.nil?
|
44
49
|
IsoDoc::JIS::HtmlConvert.new({})
|
@@ -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.2 -->
|
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">
|
@@ -211,6 +211,9 @@
|
|
211
211
|
<data type="boolean"/>
|
212
212
|
</attribute>
|
213
213
|
</optional>
|
214
|
+
<optional>
|
215
|
+
<attribute name="style"/>
|
216
|
+
</optional>
|
214
217
|
<ref name="CitationType"/>
|
215
218
|
<oneOrMore>
|
216
219
|
<ref name="PureTextElement"/>
|
@@ -2136,6 +2139,7 @@
|
|
2136
2139
|
<choice>
|
2137
2140
|
<value>identical</value>
|
2138
2141
|
<value>modified</value>
|
2142
|
+
<value>adapted</value>
|
2139
2143
|
<value>restyled</value>
|
2140
2144
|
<value>context-added</value>
|
2141
2145
|
<value>generalisation</value>
|
data/metanorma-jis.gemspec
CHANGED
@@ -31,6 +31,8 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
32
32
|
|
33
33
|
spec.add_dependency "metanorma-iso", "~> 2.4.2"
|
34
|
+
#spec.add_dependency "relaton-bipm", "~> 1.14.8"
|
35
|
+
#spec.add_dependency "relaton-iho", "~> 1.14.3"
|
34
36
|
spec.add_dependency "pubid-jis"
|
35
37
|
|
36
38
|
spec.add_development_dependency "debug"
|
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.0.6
|
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-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-iso
|