isodoc 1.0.7 → 1.0.8

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: 61c4078b846eee8f29ef7322bcb1ac497c0418c4d7eaaba8d79ff4549b4d5b47
4
- data.tar.gz: 311efba07534c2f7a6c35af286478a3beb31f082f50424ce4fdbfe0956eebb95
3
+ metadata.gz: ef21cf58dadc44402088da8688039f145c7c772d2241207790e22721d4509acf
4
+ data.tar.gz: 5ba2928a7dd29b05b5042bec243d40ef5bc0b57c4cbbf9062469bef4f89ec6e1
5
5
  SHA512:
6
- metadata.gz: f30695762aa1626b376317e3e928b4dab2d7dca5493f8d9990df4d8daf6b1d7f958e21f3217e227a974b9af1db1c46921a1c9250f25164f63cd3c4edd6ba73d8
7
- data.tar.gz: 20e1f4f1e19a51c828ad06d07814c5af1d37213b37615376e68bafddf0f9bcd5fba7cf991571de5f38bb8983b10f7be45eb8720b76f45bbc0899028e8267b6f7
6
+ metadata.gz: 4d20eccad075ca4cafff9e8b873514d7d955fe19c02f21b032a7c578b5441b414cb5d3e1f8abbe701b686b2e5ff56d1c8dc6b1fa86e6707727b2a76d05b9b513
7
+ data.tar.gz: f69deb2000b76e5e24902aad3d11179395f6930a446b5b10244510f7d1be26667164ef1acb16e1c44233d617a1368e53b2d4f15ba4640e83c82be13d66f5e4fa
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- isodoc (1.0.7)
4
+ isodoc (1.0.8)
5
5
  asciimath
6
6
  html2doc (~> 0.9.0)
7
7
  htmlentities (~> 4.3.4)
@@ -26,7 +26,7 @@ GEM
26
26
  docile (1.3.2)
27
27
  equivalent-xml (0.6.0)
28
28
  nokogiri (>= 1.4.3)
29
- ffi (1.11.1)
29
+ ffi (1.11.2)
30
30
  formatador (0.2.5)
31
31
  guard (2.16.1)
32
32
  formatador (>= 0.2.4)
@@ -42,7 +42,7 @@ GEM
42
42
  guard (~> 2.1)
43
43
  guard-compat (~> 1.1)
44
44
  rspec (>= 2.99.0, < 4.0)
45
- html2doc (0.9.1)
45
+ html2doc (0.9.2)
46
46
  asciimath (~> 1.0.9)
47
47
  htmlentities (~> 4.3.4)
48
48
  image_size
@@ -58,7 +58,7 @@ GEM
58
58
  rb-fsevent (~> 0.10, >= 0.10.3)
59
59
  rb-inotify (~> 0.9, >= 0.9.10)
60
60
  lumberjack (1.0.13)
61
- metanorma (0.3.16)
61
+ metanorma (0.3.17)
62
62
  asciidoctor
63
63
  htmlentities
64
64
  method_source (0.9.2)
@@ -72,7 +72,7 @@ GEM
72
72
  notiffany (0.1.3)
73
73
  nenv (~> 0.1)
74
74
  shellany (~> 0.0)
75
- parallel (1.18.0)
75
+ parallel (1.19.0)
76
76
  parser (2.6.5.0)
77
77
  ast (~> 2.4.0)
78
78
  powerpack (0.1.2)
@@ -0,0 +1,31 @@
1
+ div.table_container {
2
+ margin-bottom: 14pt;
3
+ }
4
+
5
+ ol
6
+ {margin-bottom:0cm;}
7
+ ul
8
+ {margin-bottom:0cm;}
9
+
10
+ table.MsoISOTable tr
11
+ {page-break-inside:avoid;}
12
+
13
+ td { page-break-inside:avoid; }
14
+ tr { page-break-after:avoid; }
15
+
16
+ span.stem
17
+ {font-family:"Cambria Math",serif;
18
+ mso-ascii-font-family:"Cambria Math";
19
+ font-style:italic;}
20
+
21
+ dt
22
+ {page-break-inside:avoid;
23
+ page-break-after:avoid}
24
+
25
+ br.section
26
+ {page-break-before:always;
27
+ mso-break-type:section-break;}
28
+ br.pagebreak
29
+ {page-break-before:always;
30
+ mso-special-character:line-break;}
31
+
@@ -21,6 +21,10 @@ dl {
21
21
  }
22
22
  }
23
23
 
24
+ b, strong {
25
+ font-weight: bold;
26
+ }
27
+
24
28
  @mixin bodyStyle1($fontSize, $lineHeight, $colorText, $colorBackground, $fontWeight: 400) {
25
29
  margin-left: auto;
26
30
  margin-right: auto;
@@ -1,6 +1,7 @@
1
1
  require "isodoc/common"
2
2
  require "sassc"
3
3
  require "fileutils"
4
+ require "tempfile"
4
5
 
5
6
  module IsoDoc
6
7
  class Convert < ::IsoDoc::Common
@@ -31,6 +32,7 @@ module IsoDoc
31
32
  merge!(default_file_locations(options)) { |_, old, new| old || new }
32
33
  @options = options
33
34
  @files_to_delete = []
35
+ @tempfile_cache = []
34
36
  @htmlstylesheet_name = options[:htmlstylesheet]
35
37
  @wordstylesheet_name = options[:wordstylesheet]
36
38
  @standardstylesheet_name = options[:standardstylesheet]
@@ -129,10 +131,15 @@ module IsoDoc
129
131
  "lib", "isodoc")
130
132
  SassC.load_paths << File.dirname(filename)
131
133
  engine = SassC::Engine.new(fontheader + stylesheet, syntax: :scss)
132
- outname = File.basename(filename, ".*") + ".css"
133
- File.open(outname, "w:UTF-8") { |f| f.write(engine.render) }
134
- @files_to_delete << outname
135
- outname
134
+ #outname = File.basename(filename, ".*") + ".css"
135
+ #File.open(outname, "w:UTF-8") { |f| f.write(engine.render) }
136
+ #@files_to_delete << outname
137
+ #outname
138
+ Tempfile.open([File.basename(filename, ".*"), "css"],
139
+ :encoding => "utf-8") do |f|
140
+ f.write(engine.render)
141
+ f
142
+ end
136
143
  end
137
144
 
138
145
  def convert1(docxml, filename, dir)
@@ -142,7 +149,7 @@ module IsoDoc
142
149
  html.parent.add_namespace("epub", "http://www.idpf.org/2007/ops")
143
150
  info docxml, nil
144
151
  populate_css()
145
- define_head html, filename, dir
152
+ html.head { |head| define_head head, filename, dir }
146
153
  make_body(html, docxml)
147
154
  end
148
155
  end.join("\n")
@@ -32,11 +32,8 @@ module IsoDoc::Function
32
32
  def note_parse(node, out)
33
33
  @note = true
34
34
  out.div **{ id: node["id"], class: "Note" } do |div|
35
- if node.first_element_child.name == "p"
36
- note_p_parse(node, div)
37
- else
38
- note_parse1(node, div)
39
- end
35
+ node.first_element_child.name == "p" ?
36
+ note_p_parse(node, div) : note_parse1(node, div)
40
37
  end
41
38
  @note = false
42
39
  end
@@ -75,9 +72,7 @@ module IsoDoc::Function
75
72
  @in_figure = true
76
73
  name = node.at(ns("./name"))
77
74
  out.div **attr_code(id: node["id"], class: "pseudocode") do |div|
78
- node.children.each do |n|
79
- parse(n, div) unless n.name == "name"
80
- end
75
+ node.children.each { |n| parse(n, div) unless n.name == "name" }
81
76
  sourcecode_name_parse(node, div, name) if name
82
77
  end
83
78
  @in_figure = false
@@ -149,9 +144,7 @@ module IsoDoc::Function
149
144
  name = node.at(ns("./name"))
150
145
  out.p **attr_code(id: node["id"], class: "Sourcecode") do |div|
151
146
  @sourcecode = true
152
- node.children.each do |n|
153
- parse(n, div) unless n.name == "name"
154
- end
147
+ node.children.each { |n| parse(n, div) unless n.name == "name" }
155
148
  @sourcecode = false
156
149
  end
157
150
  sourcecode_name_parse(node, out, name) if name
@@ -166,11 +159,8 @@ module IsoDoc::Function
166
159
  @annotation = true
167
160
  node.at("./preceding-sibling::*[local-name() = 'annotation']") or
168
161
  out << "<br/>"
169
- out << "<br/>"
170
- #out.span **{ class: "zzMoveToFollowing" } do |s|
171
- out << "&lt;#{node.at(ns("//callout[@target='#{node['id']}']")).text}&gt; "
172
- #end
173
- #node.children.each { |n| parse(n, out) }
162
+ callout = node.at(ns("//callout[@target='#{node['id']}']"))
163
+ out << "<br/>&lt;#{callout.text}&gt; "
174
164
  out << node&.children&.text&.strip
175
165
  @annotation = false
176
166
  end
@@ -192,9 +182,7 @@ module IsoDoc::Function
192
182
  name = admonition_name(node, type)
193
183
  out.div **{ class: admonition_class(node) } do |t|
194
184
  admonition_name_parse(node, t, name) if name
195
- node.children.each do |n|
196
- parse(n, t) unless n.name == "name"
197
- end
185
+ node.children.each { |n| parse(n, t) unless n.name == "name" }
198
186
  end
199
187
  end
200
188
 
@@ -235,10 +223,8 @@ module IsoDoc::Function
235
223
 
236
224
  def para_attrs(node)
237
225
  attrs = { class: para_class(node), id: node["id"] }
238
- unless node["align"].nil?
239
- #attrs[:align] = node["align"] unless node["align"] == "justify"
226
+ node["align"].nil? or
240
227
  attrs[:style] = "text-align:#{node['align']};"
241
- end
242
228
  attrs
243
229
  end
244
230
 
@@ -272,23 +258,5 @@ module IsoDoc::Function
272
258
  quote_attribution(node, out)
273
259
  end
274
260
  end
275
-
276
- def image_title_parse(out, caption)
277
- unless caption.nil?
278
- out.p **{ class: "FigureTitle", style: "text-align:center;" } do |p|
279
- p.b { |b| b << caption.to_s }
280
- end
281
- end
282
- end
283
-
284
- def image_parse(node, out, caption)
285
- attrs = { src: node["src"],
286
- height: node["height"] || "auto",
287
- width: node["width"] || "auto",
288
- title: node["title"],
289
- alt: node["alt"] }
290
- out.img **attr_code(attrs)
291
- image_title_parse(out, caption)
292
- end
293
261
  end
294
262
  end
@@ -90,6 +90,24 @@ module IsoDoc::Function
90
90
  end
91
91
  end
92
92
 
93
+ def image_title_parse(out, caption)
94
+ unless caption.nil?
95
+ out.p **{ class: "FigureTitle", style: "text-align:center;" } do |p|
96
+ p.b { |b| b << caption.to_s }
97
+ end
98
+ end
99
+ end
100
+
101
+ def image_parse(node, out, caption)
102
+ attrs = { src: node["src"],
103
+ height: node["height"] || "auto",
104
+ width: node["width"] || "auto",
105
+ title: node["title"],
106
+ alt: node["alt"] }
107
+ out.img **attr_code(attrs)
108
+ image_title_parse(out, caption)
109
+ end
110
+
93
111
  def error_parse(node, out)
94
112
  text = node.to_xml.gsub(/</, "&lt;").gsub(/>/, "&gt;")
95
113
  out.para do |p|
@@ -40,14 +40,14 @@ module IsoDoc::Function
40
40
 
41
41
  # isodoc.css overrides any CSS injected by Html2Doc, which
42
42
  # is inserted before this CSS.
43
- def define_head(html, filename, _dir)
44
- html.head do |head|
45
- if @standardstylesheet
46
- head.style do |style|
47
- stylesheet = File.read(@standardstylesheet, encoding: "utf-8").
48
- gsub("FILENAME", File.basename(filename))
49
- style.comment "\n#{stylesheet}\n"
50
- end
43
+ def define_head(head, filename, _dir)
44
+ if @standardstylesheet
45
+ head.style do |style|
46
+ #stylesheet = File.read(@standardstylesheet, encoding: "utf-8").
47
+ @standardstylesheet.open
48
+ stylesheet = @standardstylesheet.read.
49
+ gsub("FILENAME", File.basename(filename))
50
+ style.comment "\n#{stylesheet}\n"
51
51
  end
52
52
  end
53
53
  end
@@ -149,7 +149,7 @@ module IsoDoc::Function
149
149
  node.children.each { |n| parse(n, e) }
150
150
  end
151
151
  end
152
-
152
+
153
153
  def strong_parse(node, out)
154
154
  out.b do |e|
155
155
  node.children.each { |n| parse(n, e) }
@@ -200,7 +200,7 @@ module IsoDoc::Function
200
200
  when "callout" then callout_parse(node, out)
201
201
  when "stem" then stem_parse(node, out)
202
202
  when "clause" then clause_parse(node, out)
203
- #when "appendix" then clause_parse(node, out)
203
+ #when "appendix" then clause_parse(node, out)
204
204
  when "xref" then xref_parse(node, out)
205
205
  when "eref" then eref_parse(node, out)
206
206
  when "origin" then eref_parse(node, out)
@@ -152,12 +152,19 @@ module IsoDoc::Function
152
152
 
153
153
  def save_dataimage(uri, relative_dir = true)
154
154
  %r{^data:image/(?<imgtype>[^;]+);base64,(?<imgdata>.+)$} =~ uri
155
- uuid = UUIDTools::UUID.random_create.to_s
156
- fname = "#{uuid}.#{imgtype}"
157
- new_file = File.join(tmpimagedir, fname)
158
- @files_to_delete << new_file
159
- File.open(new_file, "wb") { |f| f.write(Base64.strict_decode64(imgdata)) }
160
- File.join(relative_dir ? rel_tmpimagedir : tmpimagedir, fname)
155
+ #uuid = UUIDTools::UUID.random_create.to_s
156
+ #fname = "#{uuid}.#{imgtype}"
157
+ #new_file = File.join(tmpimagedir, fname)
158
+ #@files_to_delete << new_file
159
+ #File.open(new_file, "wb") { |f| f.write(Base64.strict_decode64(imgdata)) }
160
+ #File.join(relative_dir ? rel_tmpimagedir : tmpimagedir, fname)
161
+ imgtype = "png" unless /^[a-z0-9]+$/.match imgtype
162
+ Tempfile.open(["image", ".#{imgtype}"]) do |f|
163
+ f.binmode
164
+ f.write(Base64.strict_decode64(imgdata))
165
+ @tempfile_cache << f #persist to the end
166
+ f.path
167
+ end
161
168
  end
162
169
  end
163
170
  end
@@ -0,0 +1,66 @@
1
+ require "singleton"
2
+
3
+ module IsoDoc::Function
4
+ module XrefGen
5
+ class Seen_Anchor
6
+ include Singleton
7
+
8
+ def initialize
9
+ @seen = {}
10
+ end
11
+
12
+ def seen(x)
13
+ @seen.has_key?(x)
14
+ end
15
+
16
+ def add(x)
17
+ @seen[x] = true
18
+ end
19
+ end
20
+
21
+ @anchors = {}
22
+
23
+ def get_anchors
24
+ @anchors
25
+ end
26
+
27
+ def anchor(id, lbl, warning = true)
28
+ unless @anchors[id]
29
+ if warning
30
+ @seen ||= Seen_Anchor.instance
31
+ @seen.seen(id) or warn "No label has been processed for ID #{id}"
32
+ @seen.add(id)
33
+ return "[#{id}]"
34
+ end
35
+ end
36
+ @anchors.dig(id, lbl)
37
+ end
38
+
39
+ def anchor_struct_label(lbl, elem)
40
+ case elem
41
+ when @appendix_lbl then l10n("#{elem} #{lbl}")
42
+ else
43
+ lbl.to_s
44
+ end
45
+ end
46
+
47
+ def anchor_struct_xref(lbl, elem)
48
+ case elem
49
+ when @formula_lbl then l10n("#{elem} (#{lbl})")
50
+ when @inequality_lbl then l10n("#{elem} (#{lbl})")
51
+ else
52
+ l10n("#{elem} #{lbl}")
53
+ end
54
+ end
55
+
56
+ def anchor_struct(lbl, container, elem, type, unnumbered = false)
57
+ ret = {}
58
+ ret[:label] = unnumbered == "true" ? nil : anchor_struct_label(lbl, elem)
59
+ ret[:xref] = anchor_struct_xref(unnumbered == "true" ? "(??)" : lbl, elem)
60
+ ret[:xref].gsub!(/ $/, "")
61
+ ret[:container] = get_clause_id(container) unless container.nil?
62
+ ret[:type] = type
63
+ ret
64
+ end
65
+ end
66
+ end
@@ -1,23 +1,8 @@
1
- require "roman-numerals"
2
1
  require_relative "xref_counter"
2
+ require_relative "xref_anchor"
3
3
 
4
4
  module IsoDoc::Function
5
5
  module XrefGen
6
-
7
- @anchors = {}
8
-
9
- def get_anchors
10
- @anchors
11
- end
12
-
13
- def anchor(id, lbl, warning = true)
14
- unless @anchors[id]
15
- warning and warn "No label has been processed for ID #{id}"
16
- return "[#{id}]"
17
- end
18
- @anchors.dig(id, lbl)
19
- end
20
-
21
6
  def termnote_label(n)
22
7
  @termnote_lbl.gsub(/%/, n.to_s)
23
8
  end
@@ -29,8 +14,7 @@ module IsoDoc::Function
29
14
  return if n["id"].nil? || n["id"].empty?
30
15
  c.increment(n)
31
16
  @anchors[n["id"]] =
32
- { label: termnote_label(c.print),
33
- type: "termnote",
17
+ { label: termnote_label(c.print), type: "termnote",
34
18
  xref: l10n("#{anchor(t['id'], :xref)}, "\
35
19
  "#{@note_xref_lbl} #{c.print}") }
36
20
  end
@@ -46,8 +30,8 @@ module IsoDoc::Function
46
30
  c.increment(n)
47
31
  idx = examples.size == 1 ? "" : c.print
48
32
  @anchors[n["id"]] = {
49
- type: "termexample",
50
- label: idx, xref: l10n("#{anchor(t['id'], :xref)}, "\
33
+ type: "termexample", label: idx,
34
+ xref: l10n("#{anchor(t['id'], :xref)}, "\
51
35
  "#{@example_xref_lbl} #{c.print}") }
52
36
  end
53
37
  end
@@ -120,9 +104,9 @@ module IsoDoc::Function
120
104
  label = c.increment(li).listlabel(depth)
121
105
  label = "#{prev_label}.#{label}" unless prev_label.empty?
122
106
  label = "#{list_anchor[:xref]} #{label}" if refer_list
123
- li["id"] and @anchors[li["id"]] = { xref: "#{label})",
124
- type: "listitem",
125
- container: list_anchor[:container] }
107
+ li["id"] and @anchors[li["id"]] =
108
+ { xref: "#{label})", type: "listitem",
109
+ container: list_anchor[:container] }
126
110
  li.xpath(ns("./ol")).each do |ol|
127
111
  list_item_anchor_names(ol, list_anchor, depth + 1, label, false)
128
112
  end
@@ -156,33 +140,6 @@ module IsoDoc::Function
156
140
  end
157
141
  end
158
142
 
159
- def anchor_struct_label(lbl, elem)
160
- case elem
161
- when @appendix_lbl then l10n("#{elem} #{lbl}")
162
- else
163
- lbl.to_s
164
- end
165
- end
166
-
167
- def anchor_struct_xref(lbl, elem)
168
- case elem
169
- when @formula_lbl then l10n("#{elem} (#{lbl})")
170
- when @inequality_lbl then l10n("#{elem} (#{lbl})")
171
- else
172
- l10n("#{elem} #{lbl}")
173
- end
174
- end
175
-
176
- def anchor_struct(lbl, container, elem, type, unnumbered = false)
177
- ret = {}
178
- ret[:label] = unnumbered == "true" ? nil : anchor_struct_label(lbl, elem)
179
- ret[:xref] = anchor_struct_xref(unnumbered == "true" ? "(??)" : lbl, elem)
180
- ret[:xref].gsub!(/ $/, "")
181
- ret[:container] = get_clause_id(container) unless container.nil?
182
- ret[:type] = type
183
- ret
184
- end
185
-
186
143
  def sequential_table_names(clause)
187
144
  c = Counter.new
188
145
  clause.xpath(ns(".//table")).each do |t|
@@ -203,7 +160,8 @@ module IsoDoc::Function
203
160
  end
204
161
  end
205
162
 
206
- FIRST_LVL_REQ = "[not(ancestor::permission or ancestor::requirement or ancestor::recommendation)]".freeze
163
+ FIRST_LVL_REQ = "[not(ancestor::permission or ancestor::requirement or "\
164
+ "ancestor::recommendation)]".freeze
207
165
 
208
166
  def sequential_permission_names(clause, klass, label)
209
167
  c = Counter.new
@@ -213,7 +171,8 @@ module IsoDoc::Function
213
171
  @anchors[t["id"]] = anchor_struct(id, t, label, klass, t["unnumbered"])
214
172
  sequential_permission_names1(t, id, "permission", @permission_lbl)
215
173
  sequential_permission_names1(t, id, "requirement", @requirement_lbl)
216
- sequential_permission_names1(t, id, "recommendation", @recommendation_lbl)
174
+ sequential_permission_names1(t, id, "recommendation",
175
+ @recommendation_lbl)
217
176
  end
218
177
  end
219
178
 
@@ -225,7 +184,8 @@ module IsoDoc::Function
225
184
  @anchors[t["id"]] = anchor_struct(id, t, label, klass, t["unnumbered"])
226
185
  sequential_permission_names1(t, id, "permission", @permission_lbl)
227
186
  sequential_permission_names1(t, id, "requirement", @requirement_lbl)
228
- sequential_permission_names1(t, id, "recommendation", @recommendation_lbl)
187
+ sequential_permission_names1(t, id, "recommendation",
188
+ @recommendation_lbl)
229
189
  end
230
190
  end
231
191
 
@@ -278,8 +238,10 @@ module IsoDoc::Function
278
238
  hierarchical_figure_names(clause, num)
279
239
  hierarchical_formula_names(clause, num)
280
240
  hierarchical_permission_names(clause, num, "permission", @permission_lbl)
281
- hierarchical_permission_names(clause, num, "requirement", @requirement_lbl)
282
- hierarchical_permission_names(clause, num, "recommendation", @recommendation_lbl)
241
+ hierarchical_permission_names(clause, num, "requirement",
242
+ @requirement_lbl)
243
+ hierarchical_permission_names(clause, num, "recommendation",
244
+ @recommendation_lbl)
283
245
  end
284
246
 
285
247
  def hierarchical_formula_names(clause, num)
@@ -301,7 +263,8 @@ module IsoDoc::Function
301
263
  @anchors[t["id"]] = anchor_struct(lbl, t, label, klass, t["unnumbered"])
302
264
  sequential_permission_names1(t, lbl, "permission", @permission_lbl)
303
265
  sequential_permission_names1(t, lbl, "requirement", @requirement_lbl)
304
- sequential_permission_names1(t, lbl, "recommendation", @recommendation_lbl)
266
+ sequential_permission_names1(t, lbl, "recommendation",
267
+ @recommendation_lbl)
305
268
  end
306
269
  end
307
270
  end
@@ -183,9 +183,12 @@ module IsoDoc::HtmlFunction
183
183
  end
184
184
 
185
185
  def htmlstylesheet
186
- stylesheet = File.read(@htmlstylesheet, encoding: "UTF-8")
186
+ #stylesheet = File.read(@htmlstylesheet, encoding: "UTF-8")
187
+ @htmlstylesheet.open
188
+ stylesheet = @htmlstylesheet.read
187
189
  xml = Nokogiri::XML("<style/>")
188
190
  xml.children.first << Nokogiri::XML::Comment.new(xml, "\n#{stylesheet}\n")
191
+ @htmlstylesheet.close!
189
192
  xml.root.to_s
190
193
  end
191
194
 
@@ -257,6 +260,8 @@ module IsoDoc::HtmlFunction
257
260
  def image_localfile(i)
258
261
  if /^data:image/.match i["src"]
259
262
  save_dataimage(i["src"], false)
263
+ elsif %r{^([A-Z]:)?/}.match i["src"]
264
+ i["src"]
260
265
  else
261
266
  File.join(@localdir, i["src"])
262
267
  end
@@ -269,10 +274,18 @@ module IsoDoc::HtmlFunction
269
274
  i["src"] = "data:image/#{type};base64,#{data}"
270
275
  end
271
276
 
272
- def move_image1(i)
277
+ def image_suffix(i)
278
+ type = i["mimetype"]&.sub(%r{^[^/*]+/}, "")
273
279
  matched = /\.(?<suffix>[^. \r\n\t]+)$/.match i["src"]
280
+ type and !type.empty? and return type
281
+ !matched.nil? and matched[:suffix] and return matched[:suffix]
282
+ "png"
283
+ end
284
+
285
+ def move_image1(i)
286
+ suffix = image_suffix(i)
274
287
  uuid = UUIDTools::UUID.random_create.to_s
275
- fname = "#{uuid}.#{matched[:suffix]}"
288
+ fname = "#{uuid}.#{suffix}"
276
289
  new_full_filename = File.join(tmpimagedir, fname)
277
290
  local_filename = image_localfile(i)
278
291
  FileUtils.cp local_filename, new_full_filename
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "1.0.7".freeze
2
+ VERSION = "1.0.8".freeze
3
3
  end
@@ -1,5 +1,15 @@
1
1
  module IsoDoc::WordFunction
2
2
  module Body
3
+ def define_head(head, filename, _dir)
4
+ head.style do |style|
5
+ loc = File.join(File.dirname(__FILE__), "..", "base_style",
6
+ "metanorma_word.scss")
7
+ stylesheet = File.read(loc, encoding: "utf-8")
8
+ style.comment "\n#{stylesheet}\n"
9
+ end
10
+ super
11
+ end
12
+
3
13
  def anchor_names(docxml)
4
14
  super
5
15
  renumber_footnotes(docxml)
@@ -56,7 +66,7 @@ module IsoDoc::WordFunction
56
66
  classtype = "MsoCommentText" if in_comment
57
67
  classtype = "Sourcecode" if @annotation
58
68
  classtype
59
- end
69
+ end
60
70
 
61
71
  def remove_bottom_border(td)
62
72
  td["style"] =
@@ -72,7 +82,8 @@ module IsoDoc::WordFunction
72
82
  t.at(".//tr").xpath("./td | ./th").each do |td|
73
83
  cols += (td["colspan"] ? td["colspan"].to_i : 1)
74
84
  end
75
- style = %{border-top:0pt;mso-border-top-alt:0pt;border-bottom:#{SW1} 1.5pt;mso-border-bottom-alt:#{SW1} 1.5pt;}
85
+ style = "border-top:0pt;mso-border-top-alt:0pt;"\
86
+ "border-bottom:#{SW1} 1.5pt;mso-border-bottom-alt:#{SW1} 1.5pt;"
76
87
  tfoot.add_child("<tr><td colspan='#{cols}' style='#{style}'/></tr>")
77
88
  tfoot.xpath(".//td").last
78
89
  end
@@ -81,10 +92,10 @@ module IsoDoc::WordFunction
81
92
  style = td.name == "th" ? "font-weight:bold;" : ""
82
93
  rowmax = td["rowspan"] ? row + td["rowspan"].to_i - 1 : row
83
94
  style += <<~STYLE
84
- border-top:#{row.zero? ? "#{SW1} 1.5pt;" : 'none;'}
85
- mso-border-top-alt:#{row.zero? ? "#{SW1} 1.5pt;" : 'none;'}
86
- border-bottom:#{SW1} #{rowmax == totalrows ? '1.5' : '1.0'}pt;
87
- mso-border-bottom-alt:#{SW1} #{rowmax == totalrows ? '1.5' : '1.0'}pt;
95
+ border-top:#{row.zero? ? "#{SW1} 1.5pt;" : 'none;'}
96
+ mso-border-top-alt:#{row.zero? ? "#{SW1} 1.5pt;" : 'none;'}
97
+ border-bottom:#{SW1} #{rowmax == totalrows ? '1.5' : '1.0'}pt;
98
+ mso-border-bottom-alt:#{SW1} #{rowmax == totalrows ? '1.5' : '1.0'}pt;
88
99
  STYLE
89
100
  { rowspan: td["rowspan"], colspan: td["colspan"],
90
101
  align: td["align"], style: style.gsub(/\n/, "") }
@@ -99,7 +110,8 @@ module IsoDoc::WordFunction
99
110
  def page_break(out)
100
111
  out.p do |p|
101
112
  p.br **{ clear: "all",
102
- style: "mso-special-character:line-break;page-break-before:always" }
113
+ style: "mso-special-character:line-break;"\
114
+ "page-break-before:always" }
103
115
  end
104
116
  end
105
117
 
@@ -233,8 +245,8 @@ module IsoDoc::WordFunction
233
245
  def example_table_attr(node)
234
246
  super.merge({
235
247
  style: "mso-table-lspace:15.0cm;margin-left:423.0pt;"\
236
- "mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-bspace:14.2pt;"\
237
- "mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal:column;"\
248
+ "mso-table-rspace:15.0cm;margin-right:423.0pt;"\
249
+ "mso-table-anchor-horizontal:column;"\
238
250
  "mso-table-overlap:never;border-collapse:collapse;"
239
251
  })
240
252
  end
@@ -243,8 +255,8 @@ module IsoDoc::WordFunction
243
255
  super.merge(attr_code({
244
256
  summary: node["summary"],
245
257
  style: "mso-table-lspace:15.0cm;margin-left:423.0pt;"\
246
- "mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-bspace:14.2pt;"\
247
- "mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal:column;"\
258
+ "mso-table-rspace:15.0cm;margin-right:423.0pt;"\
259
+ "mso-table-anchor-horizontal:column;"\
248
260
  "mso-table-overlap:never;border-spacing:0;border-width:1px;"
249
261
  }))
250
262
  end
@@ -252,7 +264,7 @@ module IsoDoc::WordFunction
252
264
  def table_parse(node, out)
253
265
  @in_table = true
254
266
  table_title_parse(node, out)
255
- out.div **{ align: "center" } do |div|
267
+ out.div **{ align: "center", class: "table_container" } do |div|
256
268
  div.table **make_table_attr(node) do |t|
257
269
  thead_parse(node, t)
258
270
  tbody_parse(node, t)
@@ -40,10 +40,12 @@ xmlns:m="http://schemas.microsoft.com/office/2004/12/omml">
40
40
  def toWord(result, filename, dir, header)
41
41
  result = populate_template(result, :word)
42
42
  result = from_xhtml(word_cleanup(to_xhtml(result)))
43
- Html2Doc.process(result, filename: filename, stylesheet: @wordstylesheet,
44
- header_file: header, dir: dir,
43
+ Html2Doc.process(result, filename: filename, stylesheet: @wordstylesheet&.path,
44
+ header_file: header&.path, dir: dir,
45
45
  asciimathdelims: [@openmathdelim, @closemathdelim],
46
46
  liststyles: { ul: @ulstyle, ol: @olstyle })
47
+ header&.unlink
48
+ @wordstylesheet&.unlink
47
49
  end
48
50
 
49
51
  def word_admonition_images(docxml)
@@ -90,9 +92,9 @@ xmlns:m="http://schemas.microsoft.com/office/2004/12/omml">
90
92
  def list_add(xpath, lvl)
91
93
  xpath.each do |list|
92
94
  (list.xpath(".//li") - list.xpath(".//ol//li | .//ul//li")).each do |l|
93
- l.xpath("./p | ./div/p").each_with_index do |p, i|
94
- next if p == 0
95
- p["class"] = "ListContLevel#{lvl}"
95
+ l.xpath("./p | ./div").each_with_index do |p, i|
96
+ next if i == 0
97
+ p.wrap(%{<div class="ListContLevel#{lvl}"/>})
96
98
  end
97
99
  list_add(l.xpath(".//ul") - l.xpath(".//ul//ul | .//ol//ul"), lvl + 1)
98
100
  list_add(l.xpath(".//ol") - l.xpath(".//ul//ol | .//ol//ol"), lvl + 1)
@@ -107,16 +109,20 @@ xmlns:m="http://schemas.microsoft.com/office/2004/12/omml">
107
109
  end
108
110
  end
109
111
 
112
+ =begin
110
113
  EMPTY_PARA = "<p style='margin-top:0cm;margin-right:0cm;"\
111
114
  "margin-bottom:0cm;margin-left:0.0pt;margin-bottom:.0001pt;"\
112
115
  "line-height:1.0pt;mso-line-height-rule:exactly'>"\
113
116
  "<span lang=EN-GB style='display:none;mso-hide:all'>&nbsp;</span></p>"
114
117
 
115
- def word_table_separator(docxml)
116
- docxml.xpath("//table").each do |t|
117
- next unless t&.next_element&.name == "table"
118
+ def table_after_table(docxml)
119
+ docxml.xpath("//table[following-sibling::*[1]/self::table]").each do |t|
118
120
  t.add_next_sibling(EMPTY_PARA)
119
121
  end
122
+ end
123
+ =end
124
+
125
+ def word_table_separator(docxml)
120
126
  docxml.xpath("//p[@class = 'TableTitle']").each do |t|
121
127
  next unless t.children.empty?
122
128
  t["style"] = t["style"].sub(/;?$/, ";font-size:0pt;")
@@ -171,10 +177,14 @@ xmlns:m="http://schemas.microsoft.com/office/2004/12/omml">
171
177
  meta = @meta.get
172
178
  meta[:filename] = filename
173
179
  params = meta.map { |k, v| [k.to_s, v] }.to_h
174
- headerfile = "header.html"
175
- File.open(headerfile, "w:UTF-8") { |f| f.write(template.render(params)) }
176
- @files_to_delete << headerfile
177
- headerfile
180
+ #headerfile = "header.html"
181
+ #File.open(headerfile, "w:UTF-8") { |f| f.write(template.render(params)) }
182
+ #@files_to_delete << headerfile
183
+ #headerfile
184
+ Tempfile.open(%w(header html), :encoding => "utf-8") do |f|
185
+ f.write(template.render(params))
186
+ f
187
+ end
178
188
  end
179
189
 
180
190
  def word_toc_entry(toclevel, heading)
Binary file
@@ -37,7 +37,7 @@ RSpec.describe IsoDoc do
37
37
  </iso-standard>
38
38
  INPUT
39
39
  <html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
40
- <head/>
40
+ <head><style/></head>
41
41
  <body lang="EN-US" link="blue" vlink="#954F72">
42
42
  <div class="WordSection1">
43
43
  <p>&#160;</p>
@@ -195,7 +195,7 @@ INPUT
195
195
  </iso-standard>
196
196
  INPUT
197
197
  <html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
198
- <head/>
198
+ <head><style/></head>
199
199
  <body lang="EN-US" link="blue" vlink="#954F72">
200
200
  <div class="WordSection1">
201
201
  <p>&#160;</p>
@@ -283,7 +283,7 @@ B</pre>
283
283
  end
284
284
 
285
285
  it "processes figures (Word)" do
286
- expect(xmlpp(strip_guid(IsoDoc::WordConvert.new({}).convert("test", <<~"INPUT", true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
286
+ expect(xmlpp(strip_guid(IsoDoc::WordConvert.new({}).convert("test", <<~"INPUT", true).sub(/['"][^'".]+\.gif['"]/, "'_.gif'")))).to be_equivalent_to xmlpp(<<~"OUTPUT")
287
287
  <iso-standard xmlns="http://riboseinc.com/isoxml">
288
288
  <preface><foreword>
289
289
  <figure id="figureA-1">
@@ -307,7 +307,7 @@ B</pre>
307
307
  </iso-standard>
308
308
  INPUT
309
309
  <html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
310
- <head/>
310
+ <head><style/></head>
311
311
  <body lang="EN-US" link="blue" vlink="#954F72">
312
312
  <div class="WordSection1">
313
313
  <p>&#160;</p>
@@ -321,7 +321,7 @@ B</pre>
321
321
 
322
322
  <img src="rice_images/rice_image1.png" height="20" width="30" alt="alttext" title="titletext"/>
323
323
  <img src="rice_images/rice_image1.png"/>
324
- <img src="test_images/_.gif"/>
324
+ <img src="_.gif"/>
325
325
  <a href="#_" class="TableFootnoteRef">a</a><aside><div id="ftn_"><span><span id="_" class="TableFootnoteRef">a</span><span style="mso-tab-count:1">&#160; </span></span>
326
326
  <p id="_">The time <span class="stem">(#(t_90)#)</span> was estimated to be 18,2 min for this example.</p>
327
327
  </div></aside>
@@ -449,7 +449,7 @@ B</pre>
449
449
  </iso-standard>
450
450
  INPUT
451
451
  <html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
452
- <head/>
452
+ <head><style/></head>
453
453
  <body lang="EN-US" link="blue" vlink="#954F72">
454
454
  <div class="WordSection1">
455
455
  <p>&#160;</p>
@@ -668,7 +668,7 @@ World</p>
668
668
  </iso-standard>
669
669
  INPUT
670
670
  <html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
671
- <head/>
671
+ <head><style/></head>
672
672
  <body lang="EN-US" link="blue" vlink="#954F72">
673
673
  <div class="WordSection1">
674
674
  <p>&#160;</p>
@@ -60,7 +60,7 @@ RSpec.describe IsoDoc do
60
60
  </iso-standard>
61
61
  INPUT
62
62
  <html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
63
- <head/>
63
+ <head><style/></head>
64
64
  <body lang="EN-US" link="blue" vlink="#954F72">
65
65
  <div class="WordSection1">
66
66
  <p>&#160;</p>
@@ -194,7 +194,7 @@ RSpec.describe IsoDoc do
194
194
  </iso-standard>
195
195
  INPUT
196
196
  <html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
197
- <head/>
197
+ <head><style/></head>
198
198
  <body lang="EN-US" link="blue" vlink="#954F72">
199
199
  <div class="WordSection1">
200
200
  <p>&#160;</p>
@@ -60,6 +60,7 @@ RSpec.describe IsoDoc do
60
60
  expect(File.exist?("test.doc")).to be true
61
61
  word = File.read("test.doc")
62
62
  expect(word).to match(/one empty stylesheet/)
63
+ expect(word).to match(/div\.table_container/)
63
64
  end
64
65
 
65
66
  it "generates HTML output docs with null configuration from file" do
@@ -552,6 +553,7 @@ TOCLEVEL
552
553
  <preface><foreword>
553
554
  <figure id="_">
554
555
  <name>Split-it-right sample divider</name>
556
+ <image src="#{File.expand_path(File.join(File.dirname(__FILE__), "..", "assets/rice_image1.png"))}" id="_" mimetype="image/png"/>
555
557
  <image src="spec/assets/rice_image1.png" id="_" mimetype="image/png"/>
556
558
  <image src="spec/assets/rice_image1.png" id="_" width="20000" height="300000" mimetype="image/png"/>
557
559
  <image src="spec/assets/rice_image1.png" id="_" width="99" height="auto" mimetype="image/png"/>
@@ -570,6 +572,7 @@ TOCLEVEL
570
572
  <h1 class="ForewordTitle">Foreword</h1>
571
573
  <div id="_" class="figure">
572
574
  <img src="test_htmlimages/_.png" height="776" width="922" />
575
+ <img src="test_htmlimages/_.png" height="776" width="922" />
573
576
  <img src="test_htmlimages/_.png" height="800" width="53" />
574
577
  <img src="test_htmlimages/_.png" height="83" width="99" />
575
578
  <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAAfQCAAAAAC/U5ulAAAjo0lEQVR4nOzVMQ0AMAzAsPInvYHoMS2yEeTLHADge/M6AADYM3QACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIuAAAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA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AAAElFTkSuQmCC" height="800" width="800" />
@@ -581,6 +584,43 @@ TOCLEVEL
581
584
 
582
585
  end
583
586
 
587
+
588
+ it "moves images in HTML with no file suffix" do
589
+ FileUtils.rm_f "test.html"
590
+ FileUtils.rm_rf "test_htmlimages"
591
+ IsoDoc::HtmlConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("test", <<~"INPUT", false)
592
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
593
+ <preface><foreword>
594
+ <figure id="_">
595
+ <name>Split-it-right sample divider</name>
596
+ <image src="spec/assets/rice_image1" id="_" mimetype="image/png"/>
597
+ <image src="spec/assets/rice_image1" id="_" mimetype="image/*"/>
598
+ <image src="data:image/*;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAAfQCAAAAAC/U5ulAAAjo0lEQVR4nOzVMQ0AMAzAsPInvYHoMS2yEeTLHADge/M6AADYM3QACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIuAAAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoAD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
+ html = File.read("test.html").sub(/^.*<main class="main-section">/m, '<main class="main-section">').
604
+ sub(%r{</main>.*$}m, "</main>")
605
+ expect(`ls test_htmlimages`).to match(/\.png$/)
606
+ expect(xmlpp(html.gsub(/\/[0-9a-f-]+\.png/, "/_.png"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
607
+ <main class='main-section'>
608
+ <button onclick='topFunction()' id='myBtn' title='Go to top'>Top</button>
609
+ <br/>
610
+ <div>
611
+ <h1 class='ForewordTitle'>Foreword</h1>
612
+ <div id='_' class='figure'>
613
+ <img src='test_htmlimages/_.png' height='776' width='922'/>
614
+ <img src='test_htmlimages/_.png' height='776' width='922'/>
615
+ <img src='data:image/*;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAAfQCAAAAAC/U5ulAAAjo0lEQVR4nOzVMQ0AMAzAsPInvYHoMS2yEeTLHADge/M6AADYM3QACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIMHQACDB0AAgwdAAIuAAAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQge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HgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMCB0ABgIAAP//7NWBDAAAAMAgf+t7fCWR0AFgQOgAMCB0ABgQOgAMCB0ABoQOAANCB4ABoQPAgNABYEDoADAgdAAYEDoADAgdAAaEDgADQgeAAaEDwIDQAWBA6AAwIHQAGBA6AAwIHQAGhA4AA0IHgAGhA8CA0AFgQOgAMCB0ABgQOgAMBAAA//8DAE/7hyLdS2yEAAAAAElFTkSuQmCC' height='800' width='800'/>
616
+ <p class='FigureTitle' style='text-align:center;'>Figure 1&#xA0;&#x2014; Split-it-right sample divider</p>
617
+ </div>
618
+ </div>
619
+ <p class='zzSTDTitle1'/>
620
+ </main>
621
+ OUTPUT
622
+ end
623
+
584
624
  it "moves images in HTML, using relative file location" do
585
625
  FileUtils.rm_f "spec/test.html"
586
626
  FileUtils.rm_rf "spec/test_htmlimages"
@@ -755,7 +795,8 @@ TOCLEVEL
755
795
  <li><p>A</p>
756
796
  <p>B</p></li>
757
797
  <li><ol><li><p>C</p>
758
- <p>D</p></li>
798
+ <p>D</p>
799
+ <sourcecode>E</sourcecode></li>
759
800
  </ol></li>
760
801
  </ul>
761
802
  <ol>
@@ -773,33 +814,57 @@ TOCLEVEL
773
814
  word = File.read("test.doc").sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2" xmlns:m="m">').
774
815
  sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
775
816
  expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
776
- <div class="WordSection2" xmlns:m="m">
777
- <p class="MsoNormal">
778
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
817
+ <div class='WordSection2' xmlns:m='m'>
818
+ <p class='MsoNormal'>
819
+ <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
820
+ </p>
821
+ <div>
822
+ <h1 class='ForewordTitle'>Foreword</h1>
823
+ <p class='MsoListParagraphCxSpFirst'>
824
+ A
825
+ <div class='ListContLevel1'>
826
+ <p class='MsoNormal'>B</p>
827
+ </div>
828
+ </p>
829
+ <p class='MsoListParagraphCxSpLast'>
830
+ <p class='MsoListParagraphCxSpFirst'>
831
+ C
832
+ <div class='ListContLevel2'>
833
+ <p class='MsoNormal'>D</p>
834
+ </div>
835
+ <div class='ListContLevel2'>
836
+ <p class='Sourcecode'>E</p>
837
+ </div>
779
838
  </p>
780
- <div>
781
- <h1 class="ForewordTitle">Foreword</h1>
782
-
783
- <p class="MsoListParagraphCxSpFirst">A
784
- <p class="ListContLevel1">B</p></p>
785
- <p class="MsoListParagraphCxSpLast"><p class="MsoListParagraphCxSpFirst">C
786
- <p class="ListContLevel2">D</p></p>
787
- </p>
788
-
789
-
790
- <p class="MsoListParagraphCxSpFirst">A1
791
- <p class="ListContLevel1">B1</p></p>
792
- <p class="MsoListParagraphCxSpLast">C1
793
- <div class="formula"><a name="_5fc1ef0f-75d2-4b54-802c-b1bad4a53b62" id="_5fc1ef0f-75d2-4b54-802c-b1bad4a53b62"></a><p class="ListContLevel2"><span class="stem"><m:oMath>
794
- <m:r><m:t>D1</m:t></m:r>
795
-
796
- </m:oMath>
797
- </span><span style="mso-tab-count:1">&#xA0; </span>(1)</p></div>
798
- </p>
799
-
839
+ </p>
840
+ <p class='MsoListParagraphCxSpFirst'>
841
+ A1
842
+ <div class='ListContLevel1'>
843
+ <p class='MsoNormal'>B1</p>
800
844
  </div>
801
- <p class="MsoNormal">&#xA0;</p>
802
- </div>
845
+ </p>
846
+ <p class='MsoListParagraphCxSpLast'>
847
+ C1
848
+ <div class='ListContLevel2'>
849
+ <div class='formula'>
850
+ <a name='_5fc1ef0f-75d2-4b54-802c-b1bad4a53b62' id='_5fc1ef0f-75d2-4b54-802c-b1bad4a53b62'/>
851
+ <p class='MsoNormal'>
852
+ <span class='stem'>
853
+ <m:oMath>
854
+ <m:r>
855
+ <m:t>D1</m:t>
856
+ </m:r>
857
+ </m:oMath>
858
+ </span>
859
+ <span style='mso-tab-count:1'>&#xA0; </span>
860
+ (1)
861
+ </p>
862
+ </div>
863
+ </div>
864
+ </p>
865
+ </div>
866
+ <p class='MsoNormal'>&#xA0;</p>
867
+ </div>
803
868
  OUTPUT
804
869
  end
805
870
 
@@ -953,8 +1018,8 @@ word = File.read("test.doc").sub(/^.*<div class="WordSection2">/m, '<div class="
953
1018
  <div>
954
1019
  <h1 class="ForewordTitle">Foreword</h1>
955
1020
  <p class="TableTitle" style="text-align:center;font-size:0pt;">&#xA0;</p>
956
- <div align="center">
957
- <table class="MsoISOTable" style="mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-bspace:14.2pt;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;"><a name="_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7" id="_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7"></a>
1021
+ <div align="center" class="table_container">
1022
+ <table class="MsoISOTable" style="mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;"><a name="_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7" id="_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7"></a>
958
1023
  <thead>
959
1024
  <tr>
960
1025
  <td rowspan="2" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;">
@@ -1008,8 +1073,8 @@ word = File.read("test.doc").sub(/^.*<div class="WordSection2">/m, '<div class="
1008
1073
  <div>
1009
1074
  <h1 class='ForewordTitle'>Foreword</h1>
1010
1075
  <p class='TableTitle' style='text-align:center;font-size:0pt;'>&#xA0;</p>
1011
- <div align='center'>
1012
- <table class='MsoISOTable' style='mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-bspace:14.2pt;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
1076
+ <div align='center' class="table_container">
1077
+ <table class='MsoISOTable' style='mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
1013
1078
  <a name='_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7' id='_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7'/>
1014
1079
  <thead>
1015
1080
  <tr>
@@ -247,7 +247,7 @@ OUTPUT
247
247
  </iso-standard>
248
248
  INPUT
249
249
  <html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
250
- <head/>
250
+ <head><style/></head>
251
251
  <body lang="EN-US" link="blue" vlink="#954F72">
252
252
  <div class="WordSection1">
253
253
  <p>&#160;</p>
@@ -199,7 +199,7 @@ RSpec.describe IsoDoc do
199
199
  </iso-standard>
200
200
  INPUT
201
201
  <html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
202
- <head/>
202
+ <head><style/></head>
203
203
  <body lang="EN-US" link="blue" vlink="#954F72">
204
204
  <div class="WordSection1">
205
205
  <p>&#160;</p>
@@ -210,8 +210,8 @@ RSpec.describe IsoDoc do
210
210
  <div>
211
211
  <h1 class="ForewordTitle">Foreword</h1>
212
212
  <p class="TableTitle" style="text-align:center;">Table 1</p>
213
- <div align="center">
214
- <table id="tableD-0" class="MsoISOTable" style="mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-bspace:14.2pt;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;">
213
+ <div align="center" class="table_container">
214
+ <table id="tableD-0" class="MsoISOTable" style="mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;">
215
215
  <tbody>
216
216
  <tr>
217
217
  <td style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">A</td>
@@ -220,8 +220,8 @@ RSpec.describe IsoDoc do
220
220
  </table>
221
221
  </div>
222
222
  <p class="TableTitle" style="text-align:center;">Table 2&#160;&#8212; Repeatability and reproducibility of husked rice yield</p>
223
- <div align="center">
224
- <table id="tableD-1" class="MsoISOTable" style="mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-bspace:14.2pt;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;" title="tool tip" summary="long desc">
223
+ <div align="center" class="table_container">
224
+ <table id="tableD-1" class="MsoISOTable" style="mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;" title="tool tip" summary="long desc">
225
225
  <thead>
226
226
  <tr>
227
227
  <td rowspan="2" align="left" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Description</td>
@@ -55,7 +55,12 @@ END
55
55
 
56
56
  WORD_HDR = <<~END
57
57
  <html xmlns:epub="http://www.idpf.org/2007/ops" lang="en">
58
- <head/>
58
+ <head>
59
+ <style>
60
+ <!--
61
+ -->
62
+ </style>
63
+ </head>
59
64
  <body lang="EN-US" link="blue" vlink="#954F72">
60
65
  <div class="WordSection1">
61
66
  <p>&#160;</p>
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: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-08 00:00:00.000000000 Z
11
+ date: 2019-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciimath
@@ -326,6 +326,7 @@ files:
326
326
  - lib/isodoc/base_style/blocks.scss
327
327
  - lib/isodoc/base_style/coverpage.scss
328
328
  - lib/isodoc/base_style/defaults.scss
329
+ - lib/isodoc/base_style/metanorma_word.scss
329
330
  - lib/isodoc/base_style/nav.scss
330
331
  - lib/isodoc/base_style/reset.scss
331
332
  - lib/isodoc/base_style/typography.scss
@@ -345,6 +346,7 @@ files:
345
346
  - lib/isodoc/function/terms.rb
346
347
  - lib/isodoc/function/to_word_html.rb
347
348
  - lib/isodoc/function/utils.rb
349
+ - lib/isodoc/function/xref_anchor.rb
348
350
  - lib/isodoc/function/xref_counter.rb
349
351
  - lib/isodoc/function/xref_gen.rb
350
352
  - lib/isodoc/function/xref_sect_gen.rb
@@ -369,6 +371,7 @@ files:
369
371
  - spec/assets/htmlintro.html
370
372
  - spec/assets/i18n.yaml
371
373
  - spec/assets/iso.xml
374
+ - spec/assets/rice_image1
372
375
  - spec/assets/rice_image1.png
373
376
  - spec/assets/scripts.html
374
377
  - spec/assets/std.css