isodoc 0.8.1 → 0.8.3
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/.travis.yml +13 -0
- data/Gemfile.lock +8 -10
- data/isodoc.gemspec +2 -4
- data/lib/isodoc-yaml/i18n-zh-Hans.yaml +1 -1
- data/lib/isodoc/convert.rb +1 -0
- data/lib/isodoc/function/blocks.rb +7 -5
- data/lib/isodoc/function/cleanup.rb +0 -5
- data/lib/isodoc/function/inline.rb +7 -1
- data/lib/isodoc/function/lists.rb +2 -1
- data/lib/isodoc/function/references.rb +1 -1
- data/lib/isodoc/function/section.rb +1 -1
- data/lib/isodoc/function/terms.rb +1 -1
- data/lib/isodoc/function/to_word_html.rb +1 -1
- data/lib/isodoc/html_function/html.rb +8 -27
- data/lib/isodoc/iso/html/isodoc.scss +17 -0
- data/lib/isodoc/iso/html/style-human.scss +2 -2
- data/lib/isodoc/iso/html/style-iso.scss +2 -2
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_function/body.rb +56 -0
- data/lib/isodoc/word_function/postprocess.rb +8 -0
- data/spec/isodoc/blocks_spec.rb +99 -11
- data/spec/isodoc/i18n_spec.rb +4 -4
- data/spec/isodoc/lists_spec.rb +1 -1
- data/spec/isodoc/postproc_spec.rb +6 -1
- data/spec/isodoc/ref_spec.rb +1 -1
- data/spec/isodoc/section_spec.rb +2 -2
- data/spec/isodoc/table_spec.rb +1 -1
- data/spec/isodoc/terms_spec.rb +105 -2
- data/spec/isodoc/xref_spec.rb +20 -20
- data/spec/spec_helper.rb +17 -0
- metadata +8 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0321e7f3851982b8a41f0b4ad71cb942c8e559121780f3089bc3954ea06438d4
|
4
|
+
data.tar.gz: 5f86453bbf454a1d430a31b8cfaa5bab753b19b7117e5fec70ae34b15dad419b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '01875c7a9de4657a22eec95a6a9a613e1f227ab5d345015d8ff83478cb03019a5dec57fea43e8c08e114fd05ac3597e285c1d0cdf757d6a51a71a73ab8e6522d'
|
7
|
+
data.tar.gz: a7160ab90056650b4e72ab7df23549442f9938ec1a3c9b96cb8ef32b6b700fa4dd6c30edadb380bf85d3e131b0ddb4871c2e005c5b135cdbc3435bd19eea5725
|
data/.travis.yml
ADDED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
GIT
|
2
2
|
remote: https://github.com/riboseinc/html2doc.git
|
3
|
-
revision:
|
3
|
+
revision: e9c0077be0c3d36bb09fa35743a79b00dd5ac560
|
4
4
|
specs:
|
5
|
-
html2doc (0.8.
|
5
|
+
html2doc (0.8.1)
|
6
6
|
asciimath
|
7
7
|
htmlentities (~> 4.3.4)
|
8
8
|
image_size
|
@@ -15,13 +15,11 @@ GIT
|
|
15
15
|
PATH
|
16
16
|
remote: .
|
17
17
|
specs:
|
18
|
-
isodoc (0.8)
|
18
|
+
isodoc (0.8.3)
|
19
19
|
asciimath
|
20
|
-
html2doc (
|
20
|
+
html2doc (~> 0.8.1)
|
21
21
|
htmlentities (~> 4.3.4)
|
22
|
-
image_size
|
23
22
|
liquid
|
24
|
-
mime-types
|
25
23
|
nokogiri
|
26
24
|
roman-numerals
|
27
25
|
ruby-xslt
|
@@ -72,13 +70,13 @@ GEM
|
|
72
70
|
mime-types-data (3.2016.0521)
|
73
71
|
mini_portile2 (2.3.0)
|
74
72
|
nenv (0.3.0)
|
75
|
-
nokogiri (1.8.
|
73
|
+
nokogiri (1.8.4)
|
76
74
|
mini_portile2 (~> 2.3.0)
|
77
75
|
notiffany (0.1.1)
|
78
76
|
nenv (~> 0.1)
|
79
77
|
shellany (~> 0.0)
|
80
78
|
parallel (1.12.1)
|
81
|
-
parser (2.5.1.
|
79
|
+
parser (2.5.1.2)
|
82
80
|
ast (~> 2.4.0)
|
83
81
|
powerpack (0.1.2)
|
84
82
|
pry (0.11.3)
|
@@ -103,10 +101,10 @@ GEM
|
|
103
101
|
diff-lcs (>= 1.2.0, < 2.0)
|
104
102
|
rspec-support (~> 3.7.0)
|
105
103
|
rspec-support (3.7.1)
|
106
|
-
rubocop (0.
|
104
|
+
rubocop (0.58.1)
|
107
105
|
jaro_winkler (~> 1.5.1)
|
108
106
|
parallel (~> 1.10)
|
109
|
-
parser (>= 2.5)
|
107
|
+
parser (>= 2.5, != 2.5.1.1)
|
110
108
|
powerpack (~> 0.1)
|
111
109
|
rainbow (>= 2.2.2, < 4.0)
|
112
110
|
ruby-progressbar (~> 1.7)
|
data/isodoc.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
DESCRIPTION
|
21
21
|
|
22
22
|
spec.homepage = "https://github.com/riboseinc/isodoc"
|
23
|
-
spec.license = "
|
23
|
+
spec.license = "BSD-2-Clause"
|
24
24
|
|
25
25
|
spec.bindir = "bin"
|
26
26
|
spec.require_paths = ["lib"]
|
@@ -30,13 +30,11 @@ Gem::Specification.new do |spec|
|
|
30
30
|
|
31
31
|
spec.add_dependency "asciimath"
|
32
32
|
spec.add_dependency "htmlentities", "~> 4.3.4"
|
33
|
-
spec.add_dependency "image_size"
|
34
|
-
spec.add_dependency "mime-types"
|
35
33
|
spec.add_dependency "nokogiri"
|
36
34
|
spec.add_dependency "ruby-xslt"
|
37
35
|
spec.add_dependency "thread_safe"
|
38
36
|
spec.add_dependency "uuidtools"
|
39
|
-
spec.add_dependency "html2doc", "
|
37
|
+
spec.add_dependency "html2doc", "~> 0.8.1"
|
40
38
|
spec.add_dependency "liquid"
|
41
39
|
spec.add_dependency "roman-numerals"
|
42
40
|
spec.add_dependency "sass"
|
data/lib/isodoc/convert.rb
CHANGED
@@ -9,7 +9,7 @@ module IsoDoc::Function
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def note_p_parse(node, div)
|
12
|
-
div.p
|
12
|
+
div.p do |p|
|
13
13
|
p.span **{ class: "note_label" } do |s|
|
14
14
|
s << note_label(node)
|
15
15
|
end
|
@@ -20,7 +20,7 @@ module IsoDoc::Function
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def note_parse1(node, div)
|
23
|
-
div.p
|
23
|
+
div.p do |p|
|
24
24
|
p.span **{ class: "note_label" } do |s|
|
25
25
|
s << note_label(node)
|
26
26
|
end
|
@@ -155,7 +155,6 @@ module IsoDoc::Function
|
|
155
155
|
|
156
156
|
def para_attrs(node)
|
157
157
|
classtype = nil
|
158
|
-
classtype = "Note" if @note
|
159
158
|
classtype = "MsoCommentText" if in_comment
|
160
159
|
classtype = "Sourcecode" if @annotation
|
161
160
|
attrs = { class: classtype, id: node["id"] }
|
@@ -204,8 +203,11 @@ module IsoDoc::Function
|
|
204
203
|
end
|
205
204
|
end
|
206
205
|
|
207
|
-
def image_parse(
|
208
|
-
|
206
|
+
def image_parse(node, out, caption)
|
207
|
+
attrs = { src: node["src"],
|
208
|
+
height: node["height"] || "auto",
|
209
|
+
width: node["width"] || "auto" }
|
210
|
+
out.img **attr_code(attrs)
|
209
211
|
image_title_parse(out, caption)
|
210
212
|
end
|
211
213
|
end
|
@@ -143,11 +143,6 @@ module IsoDoc::Function
|
|
143
143
|
d.parent = insert_here
|
144
144
|
end
|
145
145
|
end
|
146
|
-
# preempt html2doc putting MsoNormal there
|
147
|
-
docxml.xpath("//p[not(self::*[@class])]"\
|
148
|
-
"[ancestor::*[@class = 'Note']]").each do |p|
|
149
|
-
p["class"] = "Note"
|
150
|
-
end
|
151
146
|
end
|
152
147
|
|
153
148
|
def table_cleanup(docxml)
|
@@ -11,7 +11,13 @@ module IsoDoc::Function
|
|
11
11
|
def link_parse(node, out)
|
12
12
|
linktext = node.text
|
13
13
|
linktext = node["target"] if linktext.empty?
|
14
|
-
out.a(**{ "href": node["target"] })
|
14
|
+
out.a(**{ "href": node["target"] }) do |l|
|
15
|
+
if node.text.empty?
|
16
|
+
l << linktext
|
17
|
+
else
|
18
|
+
node.children.each { |n| parse(n, l) }
|
19
|
+
end
|
20
|
+
end
|
15
21
|
end
|
16
22
|
|
17
23
|
def callout_parse(node, out)
|
@@ -73,7 +73,7 @@ module IsoDoc::Function
|
|
73
73
|
|
74
74
|
# TODO generate formatted ref if not present
|
75
75
|
def noniso_bibitem(list, b, ordinal, bibliography)
|
76
|
-
list.p **attr_code(
|
76
|
+
list.p **attr_code(iso_bibitem_entry_attrs(b, bibliography)) do |r|
|
77
77
|
if bibliography
|
78
78
|
id = docid_l10n(b.at(ns("./docidentifier")).text.gsub(/[\[\]]/, ""))
|
79
79
|
ref_entry_code(r, ordinal, id)
|
@@ -42,7 +42,7 @@ module IsoDoc::Function
|
|
42
42
|
def termnote_parse(node, out)
|
43
43
|
out.div **{ class: "Note" } do |div|
|
44
44
|
first = node.first_element_child
|
45
|
-
div.p
|
45
|
+
div.p do |p|
|
46
46
|
p << "#{get_anchors[node['id']][:label]}: "
|
47
47
|
para_then_remainder(first, node, p, div)
|
48
48
|
end
|
@@ -157,7 +157,7 @@ module IsoDoc::Function
|
|
157
157
|
when "table" then table_parse(node, out)
|
158
158
|
when "figure" then figure_parse(node, out)
|
159
159
|
when "example" then example_parse(node, out)
|
160
|
-
when "image" then image_parse(node
|
160
|
+
when "image" then image_parse(node, out, nil)
|
161
161
|
when "sourcecode" then sourcecode_parse(node, out)
|
162
162
|
when "annotation" then annotation_parse(node, out)
|
163
163
|
when "term" then termdef_parse(node, out)
|
@@ -194,37 +194,18 @@ module IsoDoc::HtmlFunction
|
|
194
194
|
matched = /\.(?<suffix>\S+)$/.match i["src"]
|
195
195
|
uuid = UUIDTools::UUID.random_create.to_s
|
196
196
|
new_full_filename = File.join("_images", "#{uuid}.#{matched[:suffix]}")
|
197
|
-
|
198
|
-
i["src"] = new_full_filename
|
199
|
-
i["width"], i["height"] = Html2Doc.image_resize(i, 800, 1200)
|
197
|
+
move_image1(i, new_full_filename)
|
200
198
|
end
|
201
199
|
docxml
|
202
200
|
end
|
203
201
|
|
204
|
-
|
205
|
-
#
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
#end
|
212
|
-
#ret + li
|
213
|
-
#end
|
214
|
-
#
|
215
|
-
#def html_toc_obsolete(docxml)
|
216
|
-
#return docxml unless @htmlintropage
|
217
|
-
#ret = ""
|
218
|
-
#prevname = ""
|
219
|
-
#docxml.xpath("//h1 | //h2").each do |h|
|
220
|
-
#next if ["toc-contents", "TermNum"].include? h["class"]
|
221
|
-
#ret = html_toc1(h, ret, prevname)
|
222
|
-
#prevname = h.name
|
223
|
-
#end
|
224
|
-
#ret += "<ul>" if prevname == "h2"
|
225
|
-
#docxml.at("//*[@id='toc-list']").replace("<ul>#{ret}</ret>")
|
226
|
-
#docxml
|
227
|
-
#end
|
202
|
+
def move_image1(i, new_full_filename)
|
203
|
+
system "cp #{i['src']} #{new_full_filename}"
|
204
|
+
i["src"] = new_full_filename
|
205
|
+
if i["width"] != "auto" && i["height"] != "auto"
|
206
|
+
i["width"], i["height"] = Html2Doc.image_resize(i, 800, 1200)
|
207
|
+
end
|
208
|
+
end
|
228
209
|
|
229
210
|
def html_toc(docxml)
|
230
211
|
docxml
|
@@ -32,6 +32,23 @@ p.Biblio, li.Biblio, div.Biblio
|
|
32
32
|
mso-fareast-font-family:$bodyfont;
|
33
33
|
mso-bidi-font-family:$bodyfont;
|
34
34
|
mso-ansi-language:EN-GB;}
|
35
|
+
p.NormRef, li.NormRef, div.NormRef
|
36
|
+
{mso-style-unhide:no;
|
37
|
+
mso-style-qformat:yes;
|
38
|
+
mso-style-parent:"";
|
39
|
+
margin-top:0cm;
|
40
|
+
margin-right:0cm;
|
41
|
+
margin-bottom:12.0pt;
|
42
|
+
margin-left:0pt;
|
43
|
+
text-indent:0pt;
|
44
|
+
tab-stops: 33.15pt;
|
45
|
+
line-height:12.0pt;
|
46
|
+
mso-pagination:widow-orphan;
|
47
|
+
font-size:11.0pt;
|
48
|
+
font-family:$bodyfont;
|
49
|
+
mso-fareast-font-family:$bodyfont;
|
50
|
+
mso-bidi-font-family:$bodyfont;
|
51
|
+
mso-ansi-language:EN-GB;}
|
35
52
|
p.FigureTitle
|
36
53
|
{mso-style-unhide:no;
|
37
54
|
mso-style-qformat:yes;
|
@@ -91,7 +91,7 @@ dd {
|
|
91
91
|
grid-column-start: 2;
|
92
92
|
}
|
93
93
|
|
94
|
-
dd p {
|
94
|
+
dd p, dt p {
|
95
95
|
margin-top: 0px;
|
96
96
|
}
|
97
97
|
|
@@ -590,7 +590,7 @@ ul, ol {margin-left: 2em;}
|
|
590
590
|
3.5 Bibliograhy
|
591
591
|
*/
|
592
592
|
|
593
|
-
p.Biblio {
|
593
|
+
p.Biblio, p.NormRef {
|
594
594
|
margin-top: 1em;
|
595
595
|
margin-left: 2em;
|
596
596
|
}
|
@@ -86,7 +86,7 @@ dd {
|
|
86
86
|
grid-column-start: 2;
|
87
87
|
}
|
88
88
|
|
89
|
-
dd p {
|
89
|
+
dd p, dt p {
|
90
90
|
margin-top: 0px;
|
91
91
|
}
|
92
92
|
|
@@ -574,7 +574,7 @@ ul, ol {margin-left: 2em;}
|
|
574
574
|
3.5 Bibliograhy
|
575
575
|
*/
|
576
576
|
|
577
|
-
p.Biblio {
|
577
|
+
p.Biblio, p.NormRef {
|
578
578
|
margin-top: 1em;
|
579
579
|
margin-left: 2em;
|
580
580
|
}
|
data/lib/isodoc/version.rb
CHANGED
@@ -145,5 +145,61 @@ module IsoDoc::WordFunction
|
|
145
145
|
a.parent = dd
|
146
146
|
end
|
147
147
|
end
|
148
|
+
|
149
|
+
def note_p_parse(node, div)
|
150
|
+
div.p **{ class: "Note" } do |p|
|
151
|
+
p.span **{ class: "note_label" } do |s|
|
152
|
+
s << note_label(node)
|
153
|
+
end
|
154
|
+
insert_tab(p, 1)
|
155
|
+
node.first_element_child.children.each { |n| parse(n, p) }
|
156
|
+
end
|
157
|
+
node.element_children[1..-1].each { |n| parse(n, div) }
|
158
|
+
end
|
159
|
+
|
160
|
+
def note_parse1(node, div)
|
161
|
+
div.p **{ class: "Note" } do |p|
|
162
|
+
p.span **{ class: "note_label" } do |s|
|
163
|
+
s << note_label(node)
|
164
|
+
end
|
165
|
+
insert_tab(p, 1)
|
166
|
+
end
|
167
|
+
node.children.each { |n| parse(n, div) }
|
168
|
+
end
|
169
|
+
|
170
|
+
def termnote_parse(node, out)
|
171
|
+
out.div **{ class: "Note" } do |div|
|
172
|
+
first = node.first_element_child
|
173
|
+
div.p **{ class: "Note" } do |p|
|
174
|
+
p << "#{get_anchors[node['id']][:label]}: "
|
175
|
+
para_then_remainder(first, node, p, div)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
def para_attrs(node)
|
181
|
+
classtype = nil
|
182
|
+
classtype = "Note" if @note
|
183
|
+
classtype = "MsoCommentText" if in_comment
|
184
|
+
classtype = "Sourcecode" if @annotation
|
185
|
+
attrs = { class: classtype, id: node["id"] }
|
186
|
+
unless node["align"].nil?
|
187
|
+
attrs[:align] = node["align"] unless node["align"] == "justify"
|
188
|
+
attrs[:style] = "text-align:#{node['align']}"
|
189
|
+
end
|
190
|
+
attrs
|
191
|
+
end
|
192
|
+
|
193
|
+
def image_parse(node, out, caption)
|
194
|
+
attrs = { src: node["src"],
|
195
|
+
height: node["height"],
|
196
|
+
width: node["width"] }
|
197
|
+
if node["height"] == "auto" || node["width"] == "auto"
|
198
|
+
attrs[:height] = nil
|
199
|
+
attrs[:width] = nil
|
200
|
+
end
|
201
|
+
out.img **attr_code(attrs)
|
202
|
+
image_title_parse(out, caption)
|
203
|
+
end
|
148
204
|
end
|
149
205
|
end
|
@@ -1,5 +1,13 @@
|
|
1
1
|
module IsoDoc::WordFunction
|
2
2
|
module Postprocess
|
3
|
+
def table_note_cleanup(docxml)
|
4
|
+
super
|
5
|
+
# preempt html2doc putting MsoNormal there
|
6
|
+
docxml.xpath("//p[not(self::*[@class])]"\
|
7
|
+
"[ancestor::*[@class = 'Note']]").each do |p|
|
8
|
+
p["class"] = "Note"
|
9
|
+
end
|
10
|
+
end
|
3
11
|
|
4
12
|
def postprocess(result, filename, dir)
|
5
13
|
header = generate_header(filename, dir)
|
data/spec/isodoc/blocks_spec.rb
CHANGED
@@ -16,7 +16,7 @@ RSpec.describe IsoDoc do
|
|
16
16
|
<div>
|
17
17
|
<h1 class="ForewordTitle">Foreword</h1>
|
18
18
|
<div id="" class="Note">
|
19
|
-
<p
|
19
|
+
<p><span class="note_label">NOTE</span>  These results are based on a study carried out on three different types of kernel.</p>
|
20
20
|
</div>
|
21
21
|
</div>
|
22
22
|
<p class="zzSTDTitle1"/>
|
@@ -26,6 +26,45 @@ RSpec.describe IsoDoc do
|
|
26
26
|
OUTPUT
|
27
27
|
end
|
28
28
|
|
29
|
+
it "processes unlabelled notes (Word)" do
|
30
|
+
expect(IsoDoc::WordConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
|
31
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
32
|
+
<preface><foreword>
|
33
|
+
<note>
|
34
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
35
|
+
</note>
|
36
|
+
</foreword></preface>
|
37
|
+
</iso-standard>
|
38
|
+
INPUT
|
39
|
+
<html xmlns:epub="http://www.idpf.org/2007/ops">
|
40
|
+
<head>
|
41
|
+
<title>test</title>
|
42
|
+
</head>
|
43
|
+
<body lang="EN-US" link="blue" vlink="#954F72">
|
44
|
+
<div class="WordSection1">
|
45
|
+
<p> </p>
|
46
|
+
</div>
|
47
|
+
<br clear="all" class="section"/>
|
48
|
+
<div class="WordSection2">
|
49
|
+
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
50
|
+
<div>
|
51
|
+
<h1 class="ForewordTitle">Foreword</h1>
|
52
|
+
<div id="" class="Note">
|
53
|
+
<p class="Note"><span class="note_label">NOTE</span><span style="mso-tab-count:1">  </span>These results are based on a study carried out on three different types of kernel.</p>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
<p> </p>
|
57
|
+
</div>
|
58
|
+
<br clear="all" class="section"/>
|
59
|
+
<div class="WordSection3">
|
60
|
+
<p class="zzSTDTitle1"/>
|
61
|
+
</div>
|
62
|
+
</body>
|
63
|
+
</html>
|
64
|
+
OUTPUT
|
65
|
+
end
|
66
|
+
|
67
|
+
|
29
68
|
it "processes labelled notes" do
|
30
69
|
expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
|
31
70
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
@@ -41,7 +80,7 @@ INPUT
|
|
41
80
|
<div>
|
42
81
|
<h1 class="ForewordTitle">Foreword</h1>
|
43
82
|
<div id="note1" class="Note">
|
44
|
-
<p
|
83
|
+
<p><span class="note_label">NOTE</span>  These results are based on a study carried out on three different types of kernel.</p>
|
45
84
|
</div>
|
46
85
|
</div>
|
47
86
|
<p class="zzSTDTitle1"/>
|
@@ -69,10 +108,10 @@ INPUT
|
|
69
108
|
<div>
|
70
109
|
<h1 class="ForewordTitle">Foreword</h1>
|
71
110
|
<div id="note1" class="Note">
|
72
|
-
<p
|
111
|
+
<p><span class="note_label">NOTE 1</span>  These results are based on a study carried out on three different types of kernel.</p>
|
73
112
|
</div>
|
74
113
|
<div id="note2" class="Note">
|
75
|
-
<p
|
114
|
+
<p><span class="note_label">NOTE 2</span>  These results are based on a study carried out on three different types of kernel.</p>
|
76
115
|
</div>
|
77
116
|
</div>
|
78
117
|
<p class="zzSTDTitle1"/>
|
@@ -98,8 +137,8 @@ INPUT
|
|
98
137
|
<div>
|
99
138
|
<h1 class="ForewordTitle">Foreword</h1>
|
100
139
|
<div id="" class="Note">
|
101
|
-
<p
|
102
|
-
<p
|
140
|
+
<p><span class="note_label">NOTE</span>  These results are based on a study carried out on three different types of kernel.</p>
|
141
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
103
142
|
</div>
|
104
143
|
</div>
|
105
144
|
<p class="zzSTDTitle1"/>
|
@@ -128,8 +167,8 @@ INPUT
|
|
128
167
|
<br/>
|
129
168
|
<div>
|
130
169
|
<h1 class="ForewordTitle">Foreword</h1>
|
131
|
-
<div id="" class="Note"><p
|
132
|
-
<dl><dt><p
|
170
|
+
<div id="" class="Note"><p><span class="note_label">NOTE</span>  </p>
|
171
|
+
<dl><dt><p>A</p></dt><dd><p>B</p></dd></dl>
|
133
172
|
<ul>
|
134
173
|
<li>C</li></ul>
|
135
174
|
</div>
|
@@ -142,13 +181,59 @@ INPUT
|
|
142
181
|
OUTPUT
|
143
182
|
end
|
144
183
|
|
184
|
+
it "processes non-para notes (Word)" do
|
185
|
+
expect(IsoDoc::WordConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
|
186
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
187
|
+
<preface><foreword>
|
188
|
+
<note>
|
189
|
+
<dl>
|
190
|
+
<dt>A</dt>
|
191
|
+
<dd><p>B</p></dd>
|
192
|
+
</dl>
|
193
|
+
<ul>
|
194
|
+
<li>C</li></ul>
|
195
|
+
</note>
|
196
|
+
</foreword></preface>
|
197
|
+
</iso-standard>
|
198
|
+
INPUT
|
199
|
+
<html xmlns:epub="http://www.idpf.org/2007/ops">
|
200
|
+
<head>
|
201
|
+
<title>test</title>
|
202
|
+
</head>
|
203
|
+
<body lang="EN-US" link="blue" vlink="#954F72">
|
204
|
+
<div class="WordSection1">
|
205
|
+
<p> </p>
|
206
|
+
</div>
|
207
|
+
<br clear="all" class="section"/>
|
208
|
+
<div class="WordSection2">
|
209
|
+
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
210
|
+
<div>
|
211
|
+
<h1 class="ForewordTitle">Foreword</h1>
|
212
|
+
<div id="" class="Note"><p class="Note"><span class="note_label">NOTE</span><span style="mso-tab-count:1">  </span></p>
|
213
|
+
<table class="dl"><tr><td valign="top" align="left"><p align="left" style="margin-left:0pt;text-align:left;">A</p></td><td valign="top"><p class="Note">B</p></td></tr></table>
|
214
|
+
<ul>
|
215
|
+
<li>C</li></ul>
|
216
|
+
</div>
|
217
|
+
</div>
|
218
|
+
<p> </p>
|
219
|
+
</div>
|
220
|
+
<br clear="all" class="section"/>
|
221
|
+
<div class="WordSection3">
|
222
|
+
<p class="zzSTDTitle1"/>
|
223
|
+
</div>
|
224
|
+
</body>
|
225
|
+
</html>
|
226
|
+
OUTPUT
|
227
|
+
end
|
228
|
+
|
145
229
|
it "processes figures" do
|
146
230
|
expect(strip_guid(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to <<~"OUTPUT"
|
147
231
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
148
232
|
<preface><foreword>
|
149
233
|
<figure id="figureA-1">
|
150
234
|
<name>Split-it-right sample divider</name>
|
151
|
-
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" imagetype="PNG"/>
|
235
|
+
<image src="rice_images/rice_image1.png" height="20" width="30" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" imagetype="PNG"/>
|
236
|
+
<image src="rice_images/rice_image1.png" height="20" width="auto" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" imagetype="PNG"/>
|
152
237
|
<fn reference="a">
|
153
238
|
<p id="_ef2c85b8-5a5a-4ecd-a1e6-92acefaaa852">The time <stem type="AsciiMath">t_90</stem> was estimated to be 18,2 min for this example.</p>
|
154
239
|
</fn>
|
@@ -166,7 +251,8 @@ INPUT
|
|
166
251
|
<h1 class="ForewordTitle">Foreword</h1>
|
167
252
|
<div id="figureA-1" class="figure">
|
168
253
|
|
169
|
-
<img src="rice_images/rice_image1.png"/>
|
254
|
+
<img src="rice_images/rice_image1.png" height="20" width="30"/>
|
255
|
+
<img src="rice_images/rice_image1.png" height="20" width="auto"/>
|
170
256
|
<a href="#_" class="TableFootnoteRef">a</a><aside class="footnote"><div id="fn:_"><a id="_" class="TableFootnoteRef">a  </a>
|
171
257
|
<p id="_">The time <span class="stem">(#(t_90)#)</span> was estimated to be 18,2 min for this example.</p>
|
172
258
|
</div></aside>
|
@@ -186,7 +272,8 @@ INPUT
|
|
186
272
|
<preface><foreword>
|
187
273
|
<figure id="figureA-1">
|
188
274
|
<name>Split-it-right sample divider</name>
|
189
|
-
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" imagetype="PNG"/>
|
275
|
+
<image src="rice_images/rice_image1.png" height="20" width="30" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" imagetype="PNG"/>
|
276
|
+
<image src="rice_images/rice_image1.png" height="20" width="auto" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" imagetype="PNG"/>
|
190
277
|
<fn reference="a">
|
191
278
|
<p id="_ef2c85b8-5a5a-4ecd-a1e6-92acefaaa852">The time <stem type="AsciiMath">t_90</stem> was estimated to be 18,2 min for this example.</p>
|
192
279
|
</fn>
|
@@ -213,6 +300,7 @@ INPUT
|
|
213
300
|
<h1 class="ForewordTitle">Foreword</h1>
|
214
301
|
<div id="figureA-1" class="figure">
|
215
302
|
|
303
|
+
<img src="rice_images/rice_image1.png" height="20" width="30"/>
|
216
304
|
<img src="rice_images/rice_image1.png"/>
|
217
305
|
<a href="#_" class="TableFootnoteRef">a</a><aside><div id="ftn_"><a id="_" class="TableFootnoteRef">a<span style="mso-tab-count:1">  </span></a>
|
218
306
|
<p id="_">The time <span class="stem">(#(t_90)#)</span> was estimated to be 18,2 min for this example.</p>
|
data/spec/isodoc/i18n_spec.rb
CHANGED
@@ -95,7 +95,7 @@ RSpec.describe IsoDoc do
|
|
95
95
|
<h1>2.  Normative references</h1>
|
96
96
|
<p>There are no normative references in this document.</p>
|
97
97
|
</div>
|
98
|
-
<div id="H"><h1>3.  Terms and
|
98
|
+
<div id="H"><h1>3.  Terms, definitions, symbols and abbreviated terms</h1><p>For the purposes of this document,
|
99
99
|
the following terms and definitions apply.</p>
|
100
100
|
<p>ISO and IEC maintain terminological databases for use in
|
101
101
|
standardization at the following addresses:</p>
|
@@ -252,7 +252,7 @@ RSpec.describe IsoDoc do
|
|
252
252
|
<h1>2.  Normative references</h1>
|
253
253
|
<p>There are no normative references in this document.</p>
|
254
254
|
</div>
|
255
|
-
<div id="H"><h1>3.  Terms and
|
255
|
+
<div id="H"><h1>3.  Terms, definitions, symbols and abbreviated terms</h1><p>For the purposes of this document,
|
256
256
|
the following terms and definitions apply.</p>
|
257
257
|
<p>ISO and IEC maintain terminological databases for use in
|
258
258
|
standardization at the following addresses:</p>
|
@@ -409,7 +409,7 @@ RSpec.describe IsoDoc do
|
|
409
409
|
<h1>2.  Références normatives</h1>
|
410
410
|
<p>Le présent document ne contient aucune référence normative.</p>
|
411
411
|
</div>
|
412
|
-
<div id="H"><h1>3.  Terms et
|
412
|
+
<div id="H"><h1>3.  Terms, définitions, symboles et termes abrégés</h1><p>Pour les besoins du présent document, les termes et définitions suivants s'appliquent.</p>
|
413
413
|
<p>L'ISO et l'IEC tiennent à jour des bases de données terminologiques
|
414
414
|
destinées à être utilisées en normalisation, consultables aux adresses
|
415
415
|
suivantes:</p>
|
@@ -579,7 +579,7 @@ RSpec.describe IsoDoc do
|
|
579
579
|
<p>下列文件对于本文件的应用是必不可少的。 凡是注日期的引用文件,仅注日期的版本适用于本文件。 凡是不注日期的引用文件,其最新版本(包括所有的修改单)适用于本文件。</p>
|
580
580
|
<p id="ISO712" class="NormRef">ISO 712, <i> Cereals and cereal products</i></p>
|
581
581
|
</div>
|
582
|
-
<div id="H"><h1>3.  术语&#
|
582
|
+
<div id="H"><h1>3.  术语、定义、符号、代号和缩略语</h1><p>下列术语和定义适用于本文件。</p>
|
583
583
|
<p>ISO和IEC用于标准化的术语数据库地址如下:</p>
|
584
584
|
<ul>
|
585
585
|
<li> <p>ISO在线浏览平台:
|
data/spec/isodoc/lists_spec.rb
CHANGED
@@ -165,7 +165,7 @@ RSpec.describe IsoDoc do
|
|
165
165
|
</dd>
|
166
166
|
</dl>
|
167
167
|
<div id="" class="Note">
|
168
|
-
<p
|
168
|
+
<p><span class="note_label">NOTE</span>  This is a note</p>
|
169
169
|
</div>
|
170
170
|
</div>
|
171
171
|
<p class="zzSTDTitle1"/>
|
@@ -409,6 +409,8 @@ CkZJTEVOQU1FOiB0ZXN0Cgo=
|
|
409
409
|
<figure id="_">
|
410
410
|
<name>Split-it-right sample divider</name>
|
411
411
|
<image src="spec/assets/rice_image1.png" id="_" imagetype="PNG"/>
|
412
|
+
<image src="spec/assets/rice_image1.png" id="_" width="20000" height="300000" imagetype="PNG"/>
|
413
|
+
<image src="spec/assets/rice_image1.png" id="_" width="99" height="auto" imagetype="PNG"/>
|
412
414
|
</figure>
|
413
415
|
</foreword></preface>
|
414
416
|
</iso-standard>
|
@@ -423,7 +425,10 @@ CkZJTEVOQU1FOiB0ZXN0Cgo=
|
|
423
425
|
<h1 class="ForewordTitle">Foreword</h1>
|
424
426
|
<div id="_" class="figure">
|
425
427
|
|
426
|
-
|
428
|
+
<img src="_images/_.png" height="auto" width="auto" />
|
429
|
+
<img src="_images/_.png" height="1200" width="80" />
|
430
|
+
<img src="_images/_.png" height="auto" width="99" />
|
431
|
+
|
427
432
|
<p class="FigureTitle" align="center">Figure 1 — Split-it-right sample divider</p></div>
|
428
433
|
</div>
|
429
434
|
<p class="zzSTDTitle1"></p>
|
data/spec/isodoc/ref_spec.rb
CHANGED
@@ -94,7 +94,7 @@ RSpec.describe IsoDoc do
|
|
94
94
|
<p id="ISO712" class="NormRef">ISO 712, <i> Cereals and cereal products</i></p>
|
95
95
|
<p id="ISO16634" class="NormRef">ISO 16634:-- (all parts)<a rel="footnote" href="#fn:1" epub:type="footnote"><sup>1</sup></a>, <i> Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</i></p>
|
96
96
|
<p id="ISO20483" class="NormRef">ISO 20483:2013–2014, <i> Cereals and pulses</i></p>
|
97
|
-
<p id="ref1" class="
|
97
|
+
<p id="ref1" class="NormRef">ICC 167, <span style="font-variant:small-caps;">Standard No I.C.C 167</span>. <i>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</i> (see <a href="http://www.icc.or.at">http://www.icc.or.at</a>)</p>
|
98
98
|
</div>
|
99
99
|
<br/>
|
100
100
|
<div>
|
data/spec/isodoc/section_spec.rb
CHANGED
@@ -92,7 +92,7 @@ RSpec.describe IsoDoc do
|
|
92
92
|
<h1>2.  Normative references</h1>
|
93
93
|
<p>There are no normative references in this document.</p>
|
94
94
|
</div>
|
95
|
-
<div id="H"><h1>3.  Terms and
|
95
|
+
<div id="H"><h1>3.  Terms, definitions, symbols and abbreviated terms</h1><p>For the purposes of this document,
|
96
96
|
the following terms and definitions apply.</p>
|
97
97
|
<p>ISO and IEC maintain terminological databases for use in
|
98
98
|
standardization at the following addresses:</p>
|
@@ -260,7 +260,7 @@ OUTPUT
|
|
260
260
|
<h1>2.<span style="mso-tab-count:1">  </span>Normative references</h1>
|
261
261
|
<p>There are no normative references in this document.</p>
|
262
262
|
</div>
|
263
|
-
<div id="H"><h1>3.<span style="mso-tab-count:1">  </span>Terms and
|
263
|
+
<div id="H"><h1>3.<span style="mso-tab-count:1">  </span>Terms, definitions, symbols and abbreviated terms</h1><p>For the purposes of this document,
|
264
264
|
the following terms and definitions apply.</p>
|
265
265
|
<p>ISO and IEC maintain terminological databases for use in
|
266
266
|
standardization at the following addresses:</p>
|
data/spec/isodoc/table_spec.rb
CHANGED
@@ -111,7 +111,7 @@ RSpec.describe IsoDoc do
|
|
111
111
|
<dd>A type of rice</dd>
|
112
112
|
</dl>
|
113
113
|
<div id="" class="Note">
|
114
|
-
<p
|
114
|
+
<p><span class="note_label">NOTE</span>  This is a table about rice</p>
|
115
115
|
</div>
|
116
116
|
</table>
|
117
117
|
</div>
|
data/spec/isodoc/terms_spec.rb
CHANGED
@@ -92,8 +92,8 @@ RSpec.describe IsoDoc do
|
|
92
92
|
<li>A</li>
|
93
93
|
</ul>
|
94
94
|
</td></tr></table>
|
95
|
-
<div class="Note"><p
|
96
|
-
<div class="Note"><p
|
95
|
+
<div class="Note"><p>Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div>
|
96
|
+
<div class="Note"><p>Note 2 to entry: <ul><li>A</li></ul><p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></p></div>
|
97
97
|
<p>[TERMREF]
|
98
98
|
<a href="#ISO7301">ISO 7301: 2011, 3.1</a>
|
99
99
|
[/TERMREF]</p></div>
|
@@ -101,6 +101,109 @@ RSpec.describe IsoDoc do
|
|
101
101
|
</body>
|
102
102
|
</head>
|
103
103
|
</html>
|
104
|
+
OUTPUT
|
105
|
+
end
|
106
|
+
|
107
|
+
it "processes IsoXML terms (Word)" do
|
108
|
+
expect(IsoDoc::WordConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
|
109
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
110
|
+
<sections>
|
111
|
+
<terms id="_terms_and_definitions" obligation="normative"><title>Terms and Definitions</title>
|
112
|
+
|
113
|
+
<term id="paddy1"><preferred>paddy</preferred>
|
114
|
+
<domain>rice</domain>
|
115
|
+
<definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
|
116
|
+
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892">
|
117
|
+
<p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
|
118
|
+
<ul>
|
119
|
+
<li>A</li>
|
120
|
+
</ul>
|
121
|
+
</termexample>
|
122
|
+
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f894">
|
123
|
+
<ul>
|
124
|
+
<li>A</li>
|
125
|
+
</ul>
|
126
|
+
</termexample>
|
127
|
+
|
128
|
+
<termsource status="modified">
|
129
|
+
<origin bibitemid="ISO7301" type="inline" citeas="ISO 7301: 2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
|
130
|
+
<modification>
|
131
|
+
<p id="_e73a417d-ad39-417d-a4c8-20e4e2529489">The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here</p>
|
132
|
+
</modification>
|
133
|
+
</termsource></term>
|
134
|
+
|
135
|
+
<term id="paddy"><preferred>paddy</preferred><admitted>paddy rice</admitted>
|
136
|
+
<admitted>rough rice</admitted>
|
137
|
+
<deprecates>cargo rice</deprecates>
|
138
|
+
<definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
|
139
|
+
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f893">
|
140
|
+
<ul>
|
141
|
+
<li>A</li>
|
142
|
+
</ul>
|
143
|
+
</termexample>
|
144
|
+
<termnote id="_671a1994-4783-40d0-bc81-987d06ffb74e">
|
145
|
+
<p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
146
|
+
</termnote>
|
147
|
+
<termnote id="_671a1994-4783-40d0-bc81-987d06ffb74f">
|
148
|
+
<ul><li>A</li></ul>
|
149
|
+
<p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
150
|
+
</termnote>
|
151
|
+
<termsource status="identical">
|
152
|
+
<origin bibitemid="ISO7301" type="inline" citeas="ISO 7301: 2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
|
153
|
+
</termsource></term>
|
154
|
+
</terms>
|
155
|
+
</sections>
|
156
|
+
</iso-standard>
|
157
|
+
INPUT
|
158
|
+
#{WORD_HDR}
|
159
|
+
<p class="zzSTDTitle1"/>
|
160
|
+
<div id="_terms_and_definitions"><h1>1.<span style="mso-tab-count:1">  </span>Terms and definitions</h1><p>For the purposes of this document,
|
161
|
+
the following terms and definitions apply.</p>
|
162
|
+
<p>ISO and IEC maintain terminological databases for use in
|
163
|
+
standardization at the following addresses:</p>
|
164
|
+
|
165
|
+
<ul>
|
166
|
+
<li> <p>ISO Online browsing platform: available at
|
167
|
+
<a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
|
168
|
+
<li> <p>IEC Electropedia: available at
|
169
|
+
<a href="http://www.electropedia.org">http://www.electropedia.org</a>
|
170
|
+
</p> </li> </ul>
|
171
|
+
<p class="TermNum" id="paddy1">1.1</p><p class="Terms" style="text-align:left;">paddy</p>
|
172
|
+
|
173
|
+
<p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f"><rice> rice retaining its husk after threshing</p>
|
174
|
+
<table id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" class="example"><tr><td width="110pt" valign="top" class="example_label" style="width:82.8pt;padding:.75pt .75pt .75pt .75pt">EXAMPLE 1</td><td valign="top" class="example">
|
175
|
+
<p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
|
176
|
+
<ul>
|
177
|
+
<li>A</li>
|
178
|
+
</ul>
|
179
|
+
</td></tr></table>
|
180
|
+
<table id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example"><tr><td width="110pt" valign="top" class="example_label" style="width:82.8pt;padding:.75pt .75pt .75pt .75pt">EXAMPLE 2</td><td valign="top" class="example">
|
181
|
+
<ul>
|
182
|
+
<li>A</li>
|
183
|
+
</ul>
|
184
|
+
</td></tr></table>
|
185
|
+
|
186
|
+
<p>[TERMREF]
|
187
|
+
<a href="#ISO7301">ISO 7301: 2011, 3.1</a>
|
188
|
+
[MODIFICATION]The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here
|
189
|
+
[/TERMREF]</p><p class="TermNum" id="paddy">1.2</p><p class="Terms" style="text-align:left;">paddy</p><p class="AltTerms" style="text-align:left;">paddy rice</p>
|
190
|
+
<p class="AltTerms" style="text-align:left;">rough rice</p>
|
191
|
+
<p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
|
192
|
+
<p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
|
193
|
+
<table id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><tr><td width="110pt" valign="top" class="example_label" style="width:82.8pt;padding:.75pt .75pt .75pt .75pt">EXAMPLE 1</td><td valign="top" class="example">
|
194
|
+
<ul>
|
195
|
+
<li>A</li>
|
196
|
+
</ul>
|
197
|
+
</td></tr></table>
|
198
|
+
<div class="Note"><p class="Note">Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div>
|
199
|
+
<div class="Note"><p class="Note">Note 2 to entry: <ul><li>A</li></ul><p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></p></div>
|
200
|
+
<p>[TERMREF]
|
201
|
+
<a href="#ISO7301">ISO 7301: 2011, 3.1</a>
|
202
|
+
[/TERMREF]</p></div>
|
203
|
+
</div>
|
204
|
+
</body>
|
205
|
+
</html>
|
206
|
+
|
104
207
|
OUTPUT
|
105
208
|
end
|
106
209
|
end
|
data/spec/isodoc/xref_spec.rb
CHANGED
@@ -72,7 +72,7 @@ RSpec.describe IsoDoc do
|
|
72
72
|
<div id="scope">
|
73
73
|
<h1>1.  Scope</h1>
|
74
74
|
<div id="N" class="Note">
|
75
|
-
<p
|
75
|
+
<p><span class="note_label">NOTE</span>  These results are based on a study carried out on three different types of kernel.</p>
|
76
76
|
</div>
|
77
77
|
<p>
|
78
78
|
<a href="#N">Note</a>
|
@@ -92,8 +92,8 @@ RSpec.describe IsoDoc do
|
|
92
92
|
<div id="widgets">
|
93
93
|
<h1>3.  Widgets</h1>
|
94
94
|
<div id="widgets1">
|
95
|
-
<div id="note1" class="Note"><p
|
96
|
-
<div id="note2" class="Note"><p
|
95
|
+
<div id="note1" class="Note"><p><span class="note_label">NOTE 1</span>  These results are based on a study carried out on three different types of kernel.</p></div>
|
96
|
+
<div id="note2" class="Note"><p><span class="note_label">NOTE 2</span>  These results are based on a study carried out on three different types of kernel.</p></div>
|
97
97
|
<p> <a href="#note1">Note 1</a> <a href="#note2">Note 2</a> </p>
|
98
98
|
|
99
99
|
</div>
|
@@ -101,11 +101,11 @@ RSpec.describe IsoDoc do
|
|
101
101
|
<br/>
|
102
102
|
<div id="annex1" class="Section3">
|
103
103
|
<div id="annex1a">
|
104
|
-
<div id="AN" class="Note"><p
|
104
|
+
<div id="AN" class="Note"><p><span class="note_label">NOTE</span>  These results are based on a study carried out on three different types of kernel.</p></div>
|
105
105
|
</div>
|
106
106
|
<div id="annex1b">
|
107
|
-
<div id="Anote1" class="Note"><p
|
108
|
-
<div id="Anote2" class="Note"><p
|
107
|
+
<div id="Anote1" class="Note"><p><span class="note_label">NOTE 1</span>  These results are based on a study carried out on three different types of kernel.</p></div>
|
108
|
+
<div id="Anote2" class="Note"><p><span class="note_label">NOTE 2</span>  These results are based on a study carried out on three different types of kernel.</p></div>
|
109
109
|
</div>
|
110
110
|
</div>
|
111
111
|
</div>
|
@@ -190,7 +190,7 @@ RSpec.describe IsoDoc do
|
|
190
190
|
<h1>1.  Scope</h1>
|
191
191
|
<div id="N" class="figure">
|
192
192
|
|
193
|
-
<img src="rice_images/rice_image1.png"/>
|
193
|
+
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
194
194
|
<p class="FigureTitle" align="center">Figure 1 — Split-it-right sample divider</p></div>
|
195
195
|
<p>
|
196
196
|
<a href="#N">Figure 1</a>
|
@@ -212,11 +212,11 @@ RSpec.describe IsoDoc do
|
|
212
212
|
<div id="widgets1">
|
213
213
|
<div id="note1" class="figure">
|
214
214
|
|
215
|
-
<img src="rice_images/rice_image1.png"/>
|
215
|
+
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
216
216
|
<p class="FigureTitle" align="center">Figure 2 — Split-it-right sample divider</p></div>
|
217
217
|
<div id="note2" class="figure">
|
218
218
|
|
219
|
-
<img src="rice_images/rice_image1.png"/>
|
219
|
+
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
220
220
|
<p class="FigureTitle" align="center">Figure 3 — Split-it-right sample divider</p></div>
|
221
221
|
<p> <a href="#note1">Figure 2</a> <a href="#note2">Figure 3</a> </p>
|
222
222
|
</div>
|
@@ -226,17 +226,17 @@ RSpec.describe IsoDoc do
|
|
226
226
|
<div id="annex1a">
|
227
227
|
<div id="AN" class="figure">
|
228
228
|
|
229
|
-
<img src="rice_images/rice_image1.png"/>
|
229
|
+
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
230
230
|
<p class="FigureTitle" align="center">Figure A.1 — Split-it-right sample divider</p></div>
|
231
231
|
</div>
|
232
232
|
<div id="annex1b">
|
233
233
|
<div id="Anote1" class="figure">
|
234
234
|
|
235
|
-
<img src="rice_images/rice_image1.png"/>
|
235
|
+
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
236
236
|
<p class="FigureTitle" align="center">Figure A.2 — Split-it-right sample divider</p></div>
|
237
237
|
<div id="Anote2" class="figure">
|
238
238
|
|
239
|
-
<img src="rice_images/rice_image1.png"/>
|
239
|
+
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
240
240
|
<p class="FigureTitle" align="center">Figure A.3 — Split-it-right sample divider</p></div>
|
241
241
|
</div>
|
242
242
|
</div>
|
@@ -333,11 +333,11 @@ RSpec.describe IsoDoc do
|
|
333
333
|
<div id="N" class="figure">
|
334
334
|
<div id="note1" class="figure">
|
335
335
|
|
336
|
-
<img src="rice_images/rice_image1.png"/>
|
336
|
+
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
337
337
|
<p class="FigureTitle" align="center">Figure 1-1 — Split-it-right sample divider</p></div>
|
338
338
|
<div id="note2" class="figure">
|
339
339
|
|
340
|
-
<img src="rice_images/rice_image1.png"/>
|
340
|
+
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
341
341
|
<p class="FigureTitle" align="center">Figure 1-2 — Split-it-right sample divider</p></div>
|
342
342
|
</div>
|
343
343
|
<p> <a href="#note1">Figure 1-1</a> <a href="#note2">Figure 1-2</a> </p>
|
@@ -351,11 +351,11 @@ RSpec.describe IsoDoc do
|
|
351
351
|
<div id="AN" class="figure">
|
352
352
|
<div id="Anote1" class="figure">
|
353
353
|
|
354
|
-
<img src="rice_images/rice_image1.png"/>
|
354
|
+
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
355
355
|
<p class="FigureTitle" align="center">Figure A.1-1 — Split-it-right sample divider</p></div>
|
356
356
|
<div id="Anote2" class="figure">
|
357
357
|
|
358
|
-
<img src="rice_images/rice_image1.png"/>
|
358
|
+
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
359
359
|
<p class="FigureTitle" align="center">Figure A.1-2 — Split-it-right sample divider</p></div>
|
360
360
|
</div>
|
361
361
|
</div>
|
@@ -831,9 +831,9 @@ RSpec.describe IsoDoc do
|
|
831
831
|
<a href="http://www.electropedia.org">http://www.electropedia.org</a>
|
832
832
|
</p> </li> </ul>
|
833
833
|
<p class="TermNum" id="_waxy_rice">2.1</p><p class="Terms" style="text-align:left;">waxy rice</p>
|
834
|
-
<div class="Note"><p
|
835
|
-
<div class="Note"><p
|
836
|
-
<div class="Note"><p
|
834
|
+
<div class="Note"><p>Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div><p class="TermNum" id="_nonwaxy_rice">2.2</p><p class="Terms" style="text-align:left;">nonwaxy rice</p>
|
835
|
+
<div class="Note"><p>Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div>
|
836
|
+
<div class="Note"><p>Note 2 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div></div>
|
837
837
|
</div>
|
838
838
|
</body>
|
839
839
|
</html>
|
@@ -963,7 +963,7 @@ RSpec.describe IsoDoc do
|
|
963
963
|
<h1>2.  Normative references</h1>
|
964
964
|
<p>There are no normative references in this document.</p>
|
965
965
|
</div>
|
966
|
-
<div id="H"><h1>3.  Terms and
|
966
|
+
<div id="H"><h1>3.  Terms, definitions, symbols and abbreviated terms</h1><p>For the purposes of this document,
|
967
967
|
the following terms and definitions apply.</p>
|
968
968
|
<p>ISO and IEC maintain terminological databases for use in
|
969
969
|
standardization at the following addresses:</p>
|
data/spec/spec_helper.rb
CHANGED
@@ -44,3 +44,20 @@ HTML_HDR = <<~END
|
|
44
44
|
<br/>
|
45
45
|
<div class="main-section">
|
46
46
|
END
|
47
|
+
|
48
|
+
WORD_HDR = <<~END
|
49
|
+
<html xmlns:epub="http://www.idpf.org/2007/ops">
|
50
|
+
<head>
|
51
|
+
<title>test</title>
|
52
|
+
</head>
|
53
|
+
<body lang="EN-US" link="blue" vlink="#954F72">
|
54
|
+
<div class="WordSection1">
|
55
|
+
<p> </p>
|
56
|
+
</div>
|
57
|
+
<br clear="all" class="section"/>
|
58
|
+
<div class="WordSection2">
|
59
|
+
<p> </p>
|
60
|
+
</div>
|
61
|
+
<br clear="all" class="section"/>
|
62
|
+
<div class="WordSection3">
|
63
|
+
END
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isodoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciimath
|
@@ -38,34 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 4.3.4
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: image_size
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: mime-types
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
41
|
- !ruby/object:Gem::Dependency
|
70
42
|
name: nokogiri
|
71
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -126,16 +98,16 @@ dependencies:
|
|
126
98
|
name: html2doc
|
127
99
|
requirement: !ruby/object:Gem::Requirement
|
128
100
|
requirements:
|
129
|
-
- - "
|
101
|
+
- - "~>"
|
130
102
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
103
|
+
version: 0.8.1
|
132
104
|
type: :runtime
|
133
105
|
prerelease: false
|
134
106
|
version_requirements: !ruby/object:Gem::Requirement
|
135
107
|
requirements:
|
136
|
-
- - "
|
108
|
+
- - "~>"
|
137
109
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
110
|
+
version: 0.8.1
|
139
111
|
- !ruby/object:Gem::Dependency
|
140
112
|
name: liquid
|
141
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -334,6 +306,7 @@ files:
|
|
334
306
|
- ".rubocop.ribose.yml"
|
335
307
|
- ".rubocop.tb.yml"
|
336
308
|
- ".rubocop.yml"
|
309
|
+
- ".travis.yml"
|
337
310
|
- CODE_OF_CONDUCT.md
|
338
311
|
- Gemfile
|
339
312
|
- Gemfile.lock
|
@@ -418,7 +391,7 @@ files:
|
|
418
391
|
- spec/spec_helper.rb
|
419
392
|
homepage: https://github.com/riboseinc/isodoc
|
420
393
|
licenses:
|
421
|
-
-
|
394
|
+
- BSD-2-Clause
|
422
395
|
metadata: {}
|
423
396
|
post_install_message:
|
424
397
|
rdoc_options: []
|