isodoc 0.8.8 → 0.8.9

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: 175371d554a61e1c0a3c2c7c2b3d549b632278d5cd7cc440dd60f2f6f8460757
4
- data.tar.gz: e94494f0e00b97dc7f23154b47c331b08d3b5c53d3f2ac1846b5a7b1cf6b6ff3
3
+ metadata.gz: 3a4d3fa6c4156db3df86b058bd06ab31377db25525b066b42d1d1637480c1478
4
+ data.tar.gz: 84b5d564ab0ed4a7424cd5f9f451843c9923d6b373bf0e8492a07fffbd4667b5
5
5
  SHA512:
6
- metadata.gz: ebf2dd5678bbd1b727fd1c70a41047c19bfc462fd38614508e5b234618a4c505413a6fb616adc0ced45db6328a01363467c00b20a4ee8f7ee9f096dea2f4b578
7
- data.tar.gz: dcfcd9e5dec8df4179cba4dbfca9d41f0749060e739f894919e9650ad57d0bed0f31ab0ef3cc8847f4fe2365829171207cac42954e1fc579cf57427bc6eddedb
6
+ metadata.gz: a8b910524ad0cbc147395e8f240523a2081841d59417fb88664058053eb6ed9a9adcc6eebe047d3d8d372c045841a292f1872f73a3336a0e8253a0ff0a9f7682
7
+ data.tar.gz: b8d9bc5fa2af858c32e17df20f359fe6183dd740814b5b83e262a6c8b38d6fd6824fcee5ec5f40c67820c22cb737919c61b47263f74121d14ed9509d03ed1ade
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- isodoc (0.8.8)
4
+ isodoc (0.8.9)
5
5
  asciimath
6
6
  html2doc (~> 0.8.1)
7
7
  htmlentities (~> 4.3.4)
@@ -10,7 +10,7 @@ PATH
10
10
  nokogiri
11
11
  roman-numerals
12
12
  ruby-xslt
13
- sass
13
+ sassc (~> 1.12.1)
14
14
  thread_safe
15
15
  uuidtools
16
16
 
@@ -60,11 +60,11 @@ GEM
60
60
  rb-inotify (~> 0.9, >= 0.9.7)
61
61
  ruby_dep (~> 1.2)
62
62
  lumberjack (1.0.13)
63
- metanorma (0.2.7)
63
+ metanorma (0.2.8)
64
64
  method_source (0.9.0)
65
- mime-types (3.1)
65
+ mime-types (3.2.2)
66
66
  mime-types-data (~> 3.2015)
67
- mime-types-data (3.2016.0521)
67
+ mime-types-data (3.2018.0812)
68
68
  mini_portile2 (2.3.0)
69
69
  nenv (0.3.0)
70
70
  nokogiri (1.8.4)
@@ -114,6 +114,9 @@ GEM
114
114
  sass-listen (4.0.0)
115
115
  rb-fsevent (~> 0.9, >= 0.9.4)
116
116
  rb-inotify (~> 0.9, >= 0.9.7)
117
+ sassc (1.12.1)
118
+ ffi (~> 1.9.6)
119
+ sass (>= 3.3.0)
117
120
  shellany (0.0.1)
118
121
  simplecov (0.16.1)
119
122
  docile (~> 1.1)
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
37
37
  spec.add_dependency "html2doc", "~> 0.8.1"
38
38
  spec.add_dependency "liquid"
39
39
  spec.add_dependency "roman-numerals"
40
- spec.add_dependency "sass"
40
+ spec.add_dependency "sassc", "~> 1.12.1"
41
41
  spec.add_dependency "metanorma", "~> 0.2.7"
42
42
 
43
43
  spec.add_development_dependency "bundler", "~> 1.15"
@@ -1,5 +1,5 @@
1
1
  require "isodoc/common"
2
- require "sass"
2
+ require "sassc"
3
3
 
4
4
  module IsoDoc
5
5
  class Convert < ::IsoDoc::Common
@@ -101,7 +101,7 @@ module IsoDoc
101
101
  return nil unless filename
102
102
  stylesheet = File.read(filename, encoding: "UTF-8")
103
103
  stylesheet.gsub!(/(\s|\{)mso-[^:]+:[^;]+;/m, "\\1") if stripwordcss
104
- engine = Sass::Engine.new(fontheader + stylesheet, syntax: :scss)
104
+ engine = SassC::Engine.new(fontheader + stylesheet, syntax: :scss)
105
105
  outname = File.basename(filename, ".*") + ".css"
106
106
  File.open(outname, "w:UTF-8") { |f| f.write(engine.render) }
107
107
  @files_to_delete << outname
@@ -69,20 +69,20 @@ module IsoDoc::Function
69
69
  end
70
70
 
71
71
  # TODO: move to localization file
72
- def eref_localities1_zh(type, from, to)
72
+ def eref_localities1_zh(target, type, from, to)
73
73
  ret = ", 第#{from.text}" if from
74
74
  ret += "&ndash;#{to}" if to
75
- ret += (@locality[type] || type.sub(/^locality:/, "").capitalize )
75
+ loc = (@locality[type] || type.sub(/^locality:/, "").capitalize )
76
+ ret += " #{loc}"
76
77
  ret
77
78
  end
78
79
 
79
80
  # TODO: move to localization file
80
- def eref_localities1(type, from, to, lang = "en")
81
- subsection = from&.text&.match(/\./)
82
- return l10n(eref_localities1_zh(type, from, to)) if lang == "zh"
81
+ def eref_localities1(target, type, from, to, lang = "en")
82
+ return l10n(eref_localities1_zh(target, type, from, to)) if lang == "zh"
83
83
  ret = ","
84
84
  loc = @locality[type] || type.sub(/^locality:/, "").capitalize
85
- ret += " #{loc}" unless subsection && type == "clause"
85
+ ret += " #{loc}"
86
86
  ret += " #{from.text}" if from
87
87
  ret += "&ndash;#{to.text}" if to
88
88
  l10n(ret)
@@ -37,7 +37,7 @@ module IsoDoc::Function
37
37
 
38
38
  def get_linkend(node)
39
39
  link = anchor_linkend(node, docid_l10n(node["target"] || node["citeas"]))
40
- link += eref_localities(node.xpath(ns("./locality")))
40
+ link += eref_localities(node.xpath(ns("./locality")), link)
41
41
  text = node.children.select { |c| c.text? && !c.text.empty? }
42
42
  link = text.join(" ") unless text.nil? || text.empty?
43
43
  # so not <origin bibitemid="ISO7301" citeas="ISO 7301">
@@ -50,12 +50,12 @@ module IsoDoc::Function
50
50
  out.a(**{ "href": "#" + node["target"] }) { |l| l << linkend }
51
51
  end
52
52
 
53
- def eref_localities(refs)
53
+ def eref_localities(refs, target)
54
54
  ret = ""
55
55
  refs.each do |r|
56
56
  ret += if r["type"] == "whole" then l10n(", #{@whole_of_text}")
57
57
  else
58
- eref_localities1(r["type"], r.at(ns("./referenceFrom")),
58
+ eref_localities1(target, r["type"], r.at(ns("./referenceFrom")),
59
59
  r.at(ns("./referenceTo")), @lang)
60
60
  end
61
61
  end
@@ -2,7 +2,7 @@ module IsoDoc::Function
2
2
  module Lists
3
3
 
4
4
  def ul_parse(node, out)
5
- out.ul do |ul|
5
+ out.ul **attr_code(id: node["id"]) do |ul|
6
6
  node.children.each { |n| parse(n, ul) }
7
7
  end
8
8
  end
@@ -37,13 +37,13 @@ module IsoDoc::Function
37
37
  def ol_parse(node, out)
38
38
  # style = ol_style(node["type"])
39
39
  style = ol_depth(node)
40
- out.ol **attr_code(type: style) do |ol|
40
+ out.ol **attr_code(type: style, id: node["id"] ) do |ol|
41
41
  node.children.each { |n| parse(n, ol) }
42
42
  end
43
43
  end
44
44
 
45
45
  def li_parse(node, out)
46
- out.li do |li|
46
+ out.li **attr_code(id: node["id"]) do |li|
47
47
  node.children.each { |n| parse(n, li) }
48
48
  end
49
49
  end
@@ -64,10 +64,12 @@ module IsoDoc::Function
64
64
  end
65
65
 
66
66
  def dl_parse(node, out)
67
- out.dl do |v|
67
+ out.dl **attr_code(id: node["id"]) do |v|
68
68
  node.elements.select { |n| dt_dd? n }.each_slice(2) do |dt, dd|
69
- v.dt { |term| dt_parse(dt, term) }
70
- v.dd do |listitem|
69
+ v.dt **attr_code(id: dt["id"]) do |term|
70
+ dt_parse(dt, term)
71
+ end
72
+ v.dd **attr_code(id: dd["id"]) do |listitem|
71
73
  dd.children.each { |n| parse(n, listitem) }
72
74
  end
73
75
  end
@@ -27,12 +27,13 @@ module IsoDoc::Function
27
27
 
28
28
  def termexample_anchor_names(docxml)
29
29
  docxml.xpath(ns("//term[termexample]")).each do |t|
30
- t.xpath(ns("./termexample")).each_with_index do |n, i|
30
+ examples = t.xpath(ns("./termexample"))
31
+ examples.each_with_index do |n, i|
31
32
  return if n["id"].nil? || n["id"].empty?
32
- @anchors[n["id"]] =
33
- { label: (i + 1).to_s,
34
- xref: l10n("#{@anchors[t['id']][:xref]}, "\
35
- "#{@note_xref_lbl} #{i + 1}") }
33
+ idx = examples.size == 1 ? "" : (i + 1).to_s
34
+ @anchors[n["id"]] = {
35
+ label: idx, xref: l10n("#{@anchors[t['id']][:xref]}, "\
36
+ "#{@note_xref_lbl} #{i + 1}") }
36
37
  end
37
38
  end
38
39
  end
@@ -133,7 +134,7 @@ module IsoDoc::Function
133
134
  i += 1
134
135
  end
135
136
  label = i.to_s + (j.zero? ? "" : "-#{j}")
136
- next if t["id"].nil? || t["id"].empty?
137
+ next if t["id"].nil? || t["id"].empty?
137
138
  @anchors[t["id"]] = anchor_struct(label, nil, @figure_lbl)
138
139
  end
139
140
  end
@@ -165,12 +166,12 @@ module IsoDoc::Function
165
166
 
166
167
  def sequential_asset_names(clause)
167
168
  clause.xpath(ns(".//table")).each_with_index do |t, i|
168
- next if t["id"].nil? || t["id"].empty?
169
+ next if t["id"].nil? || t["id"].empty?
169
170
  @anchors[t["id"]] = anchor_struct(i + 1, nil, @table_lbl)
170
171
  end
171
172
  sequential_figure_names(clause)
172
173
  clause.xpath(ns(".//formula")).each_with_index do |t, i|
173
- next if t["id"].nil? || t["id"].empty?
174
+ next if t["id"].nil? || t["id"].empty?
174
175
  @anchors[t["id"]] = anchor_struct(i + 1, t, @formula_lbl)
175
176
  end
176
177
  end
@@ -184,19 +185,19 @@ module IsoDoc::Function
184
185
  i += 1
185
186
  end
186
187
  label = "#{num}.#{i}" + (j.zero? ? "" : "-#{j}")
187
- next if t["id"].nil? || t["id"].empty?
188
+ next if t["id"].nil? || t["id"].empty?
188
189
  @anchors[t["id"]] = anchor_struct(label, nil, @figure_lbl)
189
190
  end
190
191
  end
191
192
 
192
193
  def hierarchical_asset_names(clause, num)
193
194
  clause.xpath(ns(".//table")).each_with_index do |t, i|
194
- next if t["id"].nil? || t["id"].empty?
195
+ next if t["id"].nil? || t["id"].empty?
195
196
  @anchors[t["id"]] = anchor_struct("#{num}.#{i + 1}", nil, @table_lbl)
196
197
  end
197
198
  hierarchical_figure_names(clause, num)
198
199
  clause.xpath(ns(".//formula")).each_with_index do |t, i|
199
- next if t["id"].nil? || t["id"].empty?
200
+ next if t["id"].nil? || t["id"].empty?
200
201
  @anchors[t["id"]] = anchor_struct("#{num}.#{i + 1}", t, @formula_lbl)
201
202
  end
202
203
  end
@@ -1,3 +1,5 @@
1
+ require "fileutils"
2
+
1
3
  module IsoDoc::HtmlFunction
2
4
  module Html
3
5
  def make_body1(body, _docxml)
@@ -201,7 +203,8 @@ module IsoDoc::HtmlFunction
201
203
  end
202
204
 
203
205
  def move_image1(i, new_full_filename)
204
- system "cp #{i['src']} #{new_full_filename}"
206
+ #system "cp #{i['src']} #{new_full_filename}"
207
+ FileUtils.cp i["src"], new_full_filename
205
208
  i["src"] = new_full_filename
206
209
  i["width"], i["height"] = Html2Doc.image_resize(i, @maxheight, @maxwidth)
207
210
  end
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "0.8.8".freeze
2
+ VERSION = "0.8.9".freeze
3
3
  end
@@ -1,2 +1,6 @@
1
1
 
2
2
  /* another empty stylesheet */
3
+
4
+ p {
5
+ font-family: $bodyfont;
6
+ }
@@ -519,7 +519,7 @@ INPUT
519
519
  <h1 class="ForewordTitle">Foreword</h1>
520
520
  <div id="_be9158af-7e93-4ee2-90c5-26d31c181934" class="formula"><span class="stem">(#(r = 1 %)#)</span>&#160; (1)</div>
521
521
  <p>where</p>
522
- <dl>
522
+ <dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
523
523
  <dt>
524
524
  <span class="stem">(#(r)#)</span>
525
525
  </dt>
@@ -238,7 +238,7 @@ RSpec.describe IsoDoc do
238
238
  <a href="#ISO712">ISO 712, Table 1&#8211;1</a>
239
239
  <a href="#ISO712">ISO 712, Clause 1, Table 1</a>
240
240
  <a href="#ISO712">ISO 712, Clause 1</a>
241
- <a href="#ISO712">ISO 712, 1.5</a>
241
+ <a href="#ISO712">ISO 712, Clause 1.5</a>
242
242
  <a href="#ISO712">A</a>
243
243
  <a href="#ISO712">ISO 712, </a>
244
244
  <a href="#ISO712">ISO 712, Prelude 7</a>
@@ -20,7 +20,7 @@ RSpec.describe IsoDoc do
20
20
  <br/>
21
21
  <div>
22
22
  <h1 class="ForewordTitle">Foreword</h1>
23
- <ul>
23
+ <ul id="_61961034-0fb1-436b-b281-828857a59ddb">
24
24
  <li>
25
25
  <p id="_cb370dd3-8463-4ec7-aa1a-96f644e2e9a2">updated normative references;</p>
26
26
  </li>
@@ -62,7 +62,7 @@ RSpec.describe IsoDoc do
62
62
  <br/>
63
63
  <div>
64
64
  <h1 class="ForewordTitle">Foreword</h1>
65
- <ol type="a">
65
+ <ol type="a" id="_ae34a226-aab4-496d-987b-1aa7b6314026">
66
66
  <li>
67
67
  <p id="_0091a277-fb0e-424a-aea8-f0001303fe78">all information necessary for the complete identification of the sample;</p>
68
68
  </li>
@@ -90,7 +90,7 @@ RSpec.describe IsoDoc do
90
90
  <iso-standard xmlns="http://riboseinc.com/isoxml">
91
91
  <preface><foreword>
92
92
  <ol id="_ae34a226-aab4-496d-987b-1aa7b6314026" type="roman_upper">
93
- <li>
93
+ <li id="_ae34a226-aab4-496d-987b-1aa7b6314027">
94
94
  <p id="_0091a277-fb0e-424a-aea8-f0001303fe78">all information necessary for the complete identification of the sample;</p>
95
95
  </li>
96
96
  <li>
@@ -107,8 +107,8 @@ RSpec.describe IsoDoc do
107
107
  <br/>
108
108
  <div>
109
109
  <h1 class="ForewordTitle">Foreword</h1>
110
- <ol type="a">
111
- <li>
110
+ <ol type="a" id="_ae34a226-aab4-496d-987b-1aa7b6314026">
111
+ <li id="_ae34a226-aab4-496d-987b-1aa7b6314027">
112
112
  <p id="_0091a277-fb0e-424a-aea8-f0001303fe78">all information necessary for the complete identification of the sample;</p>
113
113
  </li>
114
114
  <li>
@@ -148,7 +148,7 @@ RSpec.describe IsoDoc do
148
148
  <br/>
149
149
  <div>
150
150
  <h1 class="ForewordTitle">Foreword</h1>
151
- <dl>
151
+ <dl id="_732d3f57-4f88-40bf-9ae9-633891edc395">
152
152
  <dt>
153
153
  <p>
154
154
  W
@@ -101,7 +101,7 @@ RSpec.describe IsoDoc do
101
101
  it "generates HTML output docs with complete configuration" do
102
102
  system "rm -f test.doc"
103
103
  system "rm -f test.html"
104
- IsoDoc::HtmlConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css", standardstylesheet: "spec/assets/std.css", header: "spec/assets/header.html", htmlcoverpage: "spec/assets/htmlcover.html", htmlintropage: "spec/assets/htmlintro.html", scripts: "spec/assets/scripts.html", wordcoverpage: "spec/assets/wordcover.html", wordintropage: "spec/assets/wordintro.html", i18nyaml: "spec/assets/i18n.yaml", ulstyle: "l1", olstyle: "l2"}).convert("test", <<~"INPUT", false)
104
+ IsoDoc::HtmlConvert.new({bodyfont: "Zapf", htmlstylesheet: "spec/assets/html.css", htmlcoverpage: "spec/assets/htmlcover.html", htmlintropage: "spec/assets/htmlintro.html", scripts: "spec/assets/scripts.html", i18nyaml: "spec/assets/i18n.yaml", ulstyle: "l1", olstyle: "l2"}).convert("test", <<~"INPUT", false)
105
105
  <iso-standard xmlns="http://riboseinc.com/isoxml">
106
106
  <preface><foreword>
107
107
  <note>
@@ -111,7 +111,30 @@ RSpec.describe IsoDoc do
111
111
  </iso-standard>
112
112
  INPUT
113
113
  html = File.read("test.html")
114
- expect(html).to match(/a third empty stylesheet/)
114
+ expect(html).to match(/another empty stylesheet/)
115
+ expect(html).to match(/font-family: Zapf/)
116
+ expect(html).to match(/an empty html cover page/)
117
+ expect(html).to match(/an empty html intro page/)
118
+ expect(html).to match(/This is > a script/)
119
+ expect(html).not_to match(/CDATA/)
120
+ expect(html).to match(%r{Enkonduko</h1>})
121
+ end
122
+
123
+ it "generates HTML output docs with default fonts" do
124
+ system "rm -f test.doc"
125
+ system "rm -f test.html"
126
+ IsoDoc::HtmlConvert.new({htmlstylesheet: "spec/assets/html.css", htmlcoverpage: "spec/assets/htmlcover.html", htmlintropage: "spec/assets/htmlintro.html", scripts: "spec/assets/scripts.html", i18nyaml: "spec/assets/i18n.yaml", ulstyle: "l1", olstyle: "l2"}).convert("test", <<~"INPUT", false)
127
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
128
+ <preface><foreword>
129
+ <note>
130
+ <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
131
+ </note>
132
+ </foreword></preface>
133
+ </iso-standard>
134
+ INPUT
135
+ html = File.read("test.html")
136
+ expect(html).to match(/another empty stylesheet/)
137
+ expect(html).to match(/font-family: Arial/)
115
138
  expect(html).to match(/an empty html cover page/)
116
139
  expect(html).to match(/an empty html intro page/)
117
140
  expect(html).to match(/This is > a script/)
@@ -122,7 +145,30 @@ RSpec.describe IsoDoc do
122
145
  it "generates Word output docs with complete configuration" do
123
146
  system "rm -f test.doc"
124
147
  system "rm -f test.html"
125
- IsoDoc::WordConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css", standardstylesheet: "spec/assets/std.css", header: "spec/assets/header.html", htmlcoverpage: "spec/assets/htmlcover.html", htmlintropage: "spec/assets/htmlintro.html", wordcoverpage: "spec/assets/wordcover.html", wordintropage: "spec/assets/wordintro.html", i18nyaml: "spec/assets/i18n.yaml", ulstyle: "l1", olstyle: "l2"}).convert("test", <<~"INPUT", false)
148
+ IsoDoc::WordConvert.new({bodyfont: "Zapf", wordstylesheet: "spec/assets/html.css", standardstylesheet: "spec/assets/std.css", header: "spec/assets/header.html", wordcoverpage: "spec/assets/wordcover.html", wordintropage: "spec/assets/wordintro.html", i18nyaml: "spec/assets/i18n.yaml", ulstyle: "l1", olstyle: "l2"}).convert("test", <<~"INPUT", false)
149
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
150
+ <preface><foreword>
151
+ <note>
152
+ <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
153
+ </note>
154
+ </foreword></preface>
155
+ </iso-standard>
156
+ INPUT
157
+ word = File.read("test.doc")
158
+ expect(word).to match(/another empty stylesheet/)
159
+ expect(word).to match(/font-family: Zapf/)
160
+ expect(word).to match(/a third empty stylesheet/)
161
+ expect(word).to match(/<title>test<\/title>/)
162
+ expect(word).to match(/test_files\/header.html/)
163
+ expect(word).to match(/an empty word cover page/)
164
+ expect(word).to match(/an empty word intro page/)
165
+ expect(word).to match(%r{Enkonduko</h1>})
166
+ end
167
+
168
+ it "generates Word output docs with default fonts" do
169
+ system "rm -f test.doc"
170
+ system "rm -f test.html"
171
+ IsoDoc::WordConvert.new({wordstylesheet: "spec/assets/html.css", standardstylesheet: "spec/assets/std.css", header: "spec/assets/header.html", wordcoverpage: "spec/assets/wordcover.html", wordintropage: "spec/assets/wordintro.html", i18nyaml: "spec/assets/i18n.yaml", ulstyle: "l1", olstyle: "l2"}).convert("test", <<~"INPUT", false)
126
172
  <iso-standard xmlns="http://riboseinc.com/isoxml">
127
173
  <preface><foreword>
128
174
  <note>
@@ -132,6 +178,8 @@ RSpec.describe IsoDoc do
132
178
  </iso-standard>
133
179
  INPUT
134
180
  word = File.read("test.doc")
181
+ expect(word).to match(/another empty stylesheet/)
182
+ expect(word).to match(/font-family: Arial/)
135
183
  expect(word).to match(/a third empty stylesheet/)
136
184
  expect(word).to match(/<title>test<\/title>/)
137
185
  expect(word).to match(/test_files\/header.html/)
@@ -251,7 +299,7 @@ RSpec.describe IsoDoc do
251
299
  </p> </li> </ul>
252
300
  <p class="TermNum"><a name="paddy1" id="paddy1"></a>1.1</p><p class="Terms" style="text-align:left;">paddy</p>
253
301
  <p class="MsoNormal"><a name="_eb29b35e-123e-4d1c-b50b-2714d41e747f" id="_eb29b35e-123e-4d1c-b50b-2714d41e747f"></a>rice retaining its husk after threshing</p>
254
- <p class="MsoNormal">[SOURCE: <a href="#ISO7301">ISO 7301:2011, 3.1</a>, modified &mdash; The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]</p></div>
302
+ <p class="MsoNormal">[SOURCE: <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>, modified &mdash; The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]</p></div>
255
303
  </div>
256
304
  OUTPUT
257
305
  end
@@ -81,13 +81,13 @@ RSpec.describe IsoDoc do
81
81
  </td></tr></table>
82
82
 
83
83
  <p>[TERMREF]
84
- <a href="#ISO7301">ISO 7301:2011, 3.1</a>
84
+ <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>
85
85
  [MODIFICATION]The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here
86
86
  [/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>
87
87
  <p class="AltTerms" style="text-align:left;">rough rice</p>
88
88
  <p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
89
89
  <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
90
- <table id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><tr><td valign="top" class="example_label" style="width:82.8pt;">EXAMPLE 1</td><td valign="top" class="example">
90
+ <table id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><tr><td valign="top" class="example_label" style="width:82.8pt;">EXAMPLE</td><td valign="top" class="example">
91
91
  <ul>
92
92
  <li>A</li>
93
93
  </ul>
@@ -95,7 +95,7 @@ RSpec.describe IsoDoc do
95
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
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
- <a href="#ISO7301">ISO 7301:2011, 3.1</a>
98
+ <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>
99
99
  [/TERMREF]</p></div>
100
100
  </div>
101
101
  </body>
@@ -184,13 +184,13 @@ OUTPUT
184
184
  </td></tr></table>
185
185
 
186
186
  <p>[TERMREF]
187
- <a href="#ISO7301">ISO 7301:2011, 3.1</a>
187
+ <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>
188
188
  [MODIFICATION]The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here
189
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
190
  <p class="AltTerms" style="text-align:left;">rough rice</p>
191
191
  <p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
192
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 valign="top" class="example_label" style="width:82.8pt;">EXAMPLE 1</td><td valign="top" class="example">
193
+ <table id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><tr><td valign="top" class="example_label" style="width:82.8pt;">EXAMPLE</td><td valign="top" class="example">
194
194
  <ul>
195
195
  <li>A</li>
196
196
  </ul>
@@ -198,7 +198,7 @@ OUTPUT
198
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
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
200
  <p>[TERMREF]
201
- <a href="#ISO7301">ISO 7301:2011, 3.1</a>
201
+ <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>
202
202
  [/TERMREF]</p></div>
203
203
  </div>
204
204
  </body>
@@ -1248,25 +1248,25 @@ RSpec.describe IsoDoc do
1248
1248
  </p>
1249
1249
  </div>
1250
1250
  <br/>
1251
- <div class="Section3" id="intro">
1251
+ <div class="Section3" id="intro">
1252
1252
  <h1 class="IntroTitle">Introduction</h1>
1253
- <ol type="a">
1253
+ <ol type="a" id="N1">
1254
1254
  <li><p>A</p></li>
1255
1255
  </ol>
1256
- <div id="xyz"><h2>Preparatory</h2>
1257
- <ol type="a">
1256
+ <div id="xyz"><h2>Preparatory</h2>
1257
+ <ol type="a" id="N2">
1258
1258
  <li><p>A</p></li>
1259
1259
  </ol>
1260
1260
  </div>
1261
1261
  </div>
1262
- <p class="zzSTDTitle1"/>
1263
- <div id="scope">
1264
- <h1>1.&#160; Scope</h1>
1265
- <ol type="a">
1262
+ <p class="zzSTDTitle1"/>
1263
+ <div id="scope">
1264
+ <h1>1.&#160; Scope</h1>
1265
+ <ol type="a" id="N">
1266
1266
  <li><p>A</p></li>
1267
1267
  </ol>
1268
- </div>
1269
- <div id="terms"><h1>2.&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
1268
+ </div>
1269
+ <div id="terms"><h1>2.&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
1270
1270
  <p>ISO and IEC maintain terminological databases for use in
1271
1271
  standardization at the following addresses:</p>
1272
1272
 
@@ -1277,35 +1277,35 @@ RSpec.describe IsoDoc do
1277
1277
  <a href="http://www.electropedia.org">http://www.electropedia.org</a>
1278
1278
  </p> </li> </ul>
1279
1279
  </div>
1280
- <div id="widgets">
1281
- <h1>3.&#160; Widgets</h1>
1282
- <div id="widgets1"><h2>3.1. </h2>
1283
- <ol type="a">
1280
+ <div id="widgets">
1281
+ <h1>3.&#160; Widgets</h1>
1282
+ <div id="widgets1"><h2>3.1. </h2>
1283
+ <ol type="a" id="note1">
1284
1284
  <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
1285
1285
  </ol>
1286
- <ol type="a">
1286
+ <ol type="a" id="note2">
1287
1287
  <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
1288
1288
  </ol>
1289
1289
  </div>
1290
- </div>
1291
- <br/>
1292
- <div id="annex1" class="Section3">
1293
- <div id="annex1a"><h2>A.1. </h2>
1294
- <ol type="a">
1290
+ </div>
1291
+ <br/>
1292
+ <div id="annex1" class="Section3">
1293
+ <div id="annex1a"><h2>A.1. </h2>
1294
+ <ol type="a" id="AN">
1295
1295
  <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
1296
1296
  </ol>
1297
1297
  </div>
1298
- <div id="annex1b"><h2>A.2. </h2>
1299
- <ol type="a">
1298
+ <div id="annex1b"><h2>A.2. </h2>
1299
+ <ol type="a" id="Anote1">
1300
1300
  <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
1301
1301
  </ol>
1302
- <ol type="a">
1302
+ <ol type="a" id="Anote2">
1303
1303
  <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
1304
1304
  </ol>
1305
1305
  </div>
1306
- </div>
1307
1306
  </div>
1308
- </body>
1307
+ </div>
1308
+ </body>
1309
1309
  </html>
1310
1310
  OUTPUT
1311
1311
  end
@@ -1388,25 +1388,25 @@ RSpec.describe IsoDoc do
1388
1388
  </p>
1389
1389
  </div>
1390
1390
  <br/>
1391
- <div class="Section3" id="intro">
1391
+ <div class="Section3" id="intro">
1392
1392
  <h1 class="IntroTitle">Introduction</h1>
1393
- <ol type="a">
1394
- <li><p>A</p></li>
1393
+ <ol type="a" id="N01">
1394
+ <li id="N1"><p>A</p></li>
1395
1395
  </ol>
1396
1396
  <div id="xyz"><h2>Preparatory</h2>
1397
- <ol type="a">
1398
- <li><p>A</p></li>
1399
- </ol>
1400
- </div>
1397
+ <ol type="a" id="N02">
1398
+ <li id="N2"><p>A</p></li>
1399
+ </ol>
1400
+ </div>
1401
1401
  </div>
1402
- <p class="zzSTDTitle1"/>
1403
- <div id="scope">
1404
- <h1>1.&#160; Scope</h1>
1405
- <ol type="a">
1406
- <li><p>A</p></li>
1402
+ <p class="zzSTDTitle1"/>
1403
+ <div id="scope">
1404
+ <h1>1.&#160; Scope</h1>
1405
+ <ol type="a" id="N0">
1406
+ <li id="N"><p>A</p></li>
1407
1407
  </ol>
1408
- </div>
1409
- <div id="terms"><h1>2.&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
1408
+ </div>
1409
+ <div id="terms"><h1>2.&#160; Terms and definitions</h1><p>No terms and definitions are listed in this document.</p>
1410
1410
  <p>ISO and IEC maintain terminological databases for use in
1411
1411
  standardization at the following addresses:</p>
1412
1412
 
@@ -1417,35 +1417,35 @@ RSpec.describe IsoDoc do
1417
1417
  <a href="http://www.electropedia.org">http://www.electropedia.org</a>
1418
1418
  </p> </li> </ul>
1419
1419
  </div>
1420
- <div id="widgets">
1421
- <h1>3.&#160; Widgets</h1>
1422
- <div id="widgets1"><h2>3.1. </h2>
1423
- <ol type="a">
1424
- <li><p>A</p></li>
1420
+ <div id="widgets">
1421
+ <h1>3.&#160; Widgets</h1>
1422
+ <div id="widgets1"><h2>3.1. </h2>
1423
+ <ol type="a" id="note1l">
1424
+ <li id="note1"><p>A</p></li>
1425
1425
  </ol>
1426
- <ol type="a">
1427
- <li><p>A</p></li>
1426
+ <ol type="a" id="note2l">
1427
+ <li id="note2"><p>A</p></li>
1428
1428
  </ol>
1429
1429
  </div>
1430
- </div>
1431
- <br/>
1432
- <div id="annex1" class="Section3">
1433
- <div id="annex1a"><h2>A.1. </h2>
1434
- <ol type="a">
1435
- <li><p>A</p></li>
1430
+ </div>
1431
+ <br/>
1432
+ <div id="annex1" class="Section3">
1433
+ <div id="annex1a"><h2>A.1. </h2>
1434
+ <ol type="a" id="ANl">
1435
+ <li id="AN"><p>A</p></li>
1436
1436
  </ol>
1437
1437
  </div>
1438
- <div id="annex1b"><h2>A.2. </h2>
1439
- <ol type="a">
1440
- <li><p>A</p></li>
1438
+ <div id="annex1b"><h2>A.2. </h2>
1439
+ <ol type="a" id="Anote1l">
1440
+ <li id="Anote1"><p>A</p></li>
1441
1441
  </ol>
1442
- <ol type="a">
1443
- <li><p>A</p></li>
1442
+ <ol type="a" id="Anote2l">
1443
+ <li id="Anote2"><p>A</p></li>
1444
1444
  </ol>
1445
1445
  </div>
1446
- </div>
1447
1446
  </div>
1448
- </body>
1447
+ </div>
1448
+ </body>
1449
1449
  </html>
1450
1450
  OUTPUT
1451
1451
  end
@@ -1503,30 +1503,30 @@ RSpec.describe IsoDoc do
1503
1503
  </p>
1504
1504
  </div>
1505
1505
  <p class="zzSTDTitle1"/>
1506
- <div id="scope">
1507
- <h1>1.&#160; Scope</h1>
1508
- <ol type="a">
1509
- <li><p>A</p>
1510
- <ol type="1">
1511
- <li><p>A</p>
1512
- <ol type="i">
1513
- <li><p>A</p>
1514
- <ol type="A">
1515
- <li><p>A</p>
1516
- <ol type="I">
1517
- <li><p>A</p>
1518
- <ol type="a">
1519
- <li><p>A</p></li>
1520
- </ol></li>
1521
- </ol></li>
1522
- </ol></li>
1523
- </ol></li>
1524
- </ol></li>
1525
- </ol>
1526
- </div>
1527
- </div>
1528
- </body>
1529
- </html>
1506
+ <div id="scope">
1507
+ <h1>1.&#160; Scope</h1>
1508
+ <ol type="a" id="N1">
1509
+ <li id="N"><p>A</p>
1510
+ <ol type="1">
1511
+ <li id="note1"><p>A</p>
1512
+ <ol type="i">
1513
+ <li id="note2"><p>A</p>
1514
+ <ol type="A">
1515
+ <li id="AN"><p>A</p>
1516
+ <ol type="I">
1517
+ <li id="Anote1"><p>A</p>
1518
+ <ol type="a">
1519
+ <li id="Anote2"><p>A</p></li>
1520
+ </ol></li>
1521
+ </ol></li>
1522
+ </ol></li>
1523
+ </ol></li>
1524
+ </ol></li>
1525
+ </ol>
1526
+ </div>
1527
+ </div>
1528
+ </body>
1529
+ </html>
1530
1530
  OUTPUT
1531
1531
  end
1532
1532
 
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.8
4
+ version: 0.8.9
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-08-13 00:00:00.000000000 Z
11
+ date: 2018-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciimath
@@ -137,19 +137,19 @@ dependencies:
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
- name: sass
140
+ name: sassc
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0'
145
+ version: 1.12.1
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0'
152
+ version: 1.12.1
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: metanorma
155
155
  requirement: !ruby/object:Gem::Requirement