isodoc 0.9.9 → 0.9.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd17ce9e2842e1e5407c0be58735af16398e4ab1a73d6cd93bfc5fb3d85039cc
4
- data.tar.gz: 271c0ac77d8d5b4d87524b4905716ca01445921039b13758aea8e2279cc0f929
3
+ metadata.gz: 3369c7722ffc0923f81c46088f759c811375571e062877a7bfbf2d06f2bb126b
4
+ data.tar.gz: 6112987ce5342f328f9c2cf376636258b5700f0eff46ee0297992339b46b8578
5
5
  SHA512:
6
- metadata.gz: 06a8d496129ea43dc7ef263466801ff47710c824e6ca3cdc9d9038d8408febecb04672f851d1c7be187736813ea6ac92d5241d809e93577abc538bcd9c8f76a7
7
- data.tar.gz: 0ec8c4fc83f1fe12dfe02f58b0f3e3f96d03ee616bc26ab8558f946e2db107e5aba7814cd426edafe79e100ba2a856db46b31487b1631e4b5be6efe0dea024ee
6
+ metadata.gz: 1dab35da108b9168fa49e32a36632a8781e9046cd65a066ea42a4fd6de82e7d7596ae000c33bb0ddd3c450541cbe749b5f97c9ed56f9bf12ffc1ecb7ad44f129
7
+ data.tar.gz: 5fb411b350d0792a908d2444ad37f2d40ac8728d39943fe7925d6a7939949d635250434217d58f37c15cf37e0facca020de6af441ad91605e0365875f57c61e1
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- isodoc (0.9.9)
4
+ isodoc (0.9.10)
5
5
  asciimath
6
6
  html2doc (~> 0.8.6)
7
7
  htmlentities (~> 4.3.4)
@@ -28,7 +28,7 @@ GEM
28
28
  nokogiri (>= 1.4.3)
29
29
  ffi (1.9.25)
30
30
  formatador (0.2.5)
31
- guard (2.14.2)
31
+ guard (2.15.0)
32
32
  formatador (>= 0.2.4)
33
33
  listen (>= 2.7, < 4.0)
34
34
  lumberjack (>= 1.0.12, < 2.0)
@@ -61,7 +61,7 @@ GEM
61
61
  rb-inotify (~> 0.9, >= 0.9.7)
62
62
  ruby_dep (~> 1.2)
63
63
  lumberjack (1.0.13)
64
- metanorma (0.3.0)
64
+ metanorma (0.3.1)
65
65
  method_source (0.9.2)
66
66
  mime-types (3.2.2)
67
67
  mime-types-data (~> 3.2015)
@@ -77,7 +77,7 @@ GEM
77
77
  parser (2.5.3.0)
78
78
  ast (~> 2.4.0)
79
79
  powerpack (0.1.2)
80
- pry (0.12.1)
80
+ pry (0.12.2)
81
81
  coderay (~> 1.1.0)
82
82
  method_source (~> 0.9.0)
83
83
  rainbow (3.0.0)
@@ -13,6 +13,7 @@ symbols: Symbols and abbreviated terms
13
13
  table_of_contents: Table of contents
14
14
  introduction: Introduction
15
15
  foreword: Foreword
16
+ abstract: Abstract
16
17
  termsdef: Terms and definitions
17
18
  termsdefsymbols: Terms, definitions, symbols and abbreviated terms
18
19
  normref: Normative references
@@ -13,6 +13,7 @@ symbols: Symboles et termes abrégés
13
13
  table_of_contents: Sommaire
14
14
  introduction: Introduction
15
15
  foreword: Avant-propos
16
+ abstract: Résumé
16
17
  termsdef: Terms et définitions
17
18
  termsdefsymbols: Terms, définitions, symboles et termes abrégés
18
19
  normref: Références normatives
@@ -11,6 +11,7 @@ symbols: 符号、代号和缩略语
11
11
  table_of_contents: 目次
12
12
  introduction: 引言
13
13
  foreword: 前言
14
+ abstract: 摘要
14
15
  termsdef: 术语和定义
15
16
  termsdefsymbols: 术语、定义、符号、代号和缩略语
16
17
  normref: 规范性引用文件
@@ -78,7 +78,7 @@ module IsoDoc::Function
78
78
 
79
79
  EXAMPLE_TBL_ATTR =
80
80
  { valign: "top", class: "example_label",
81
- style: "width:82.8pt;padding:0pt;margin-left:0pt" }.freeze
81
+ style: "width:82.8pt;padding:0 0 0 1em;margin-left:0pt" }.freeze
82
82
 
83
83
  # used if we are boxing examples
84
84
  def example_div_parse(node, out)
@@ -27,6 +27,7 @@ module IsoDoc::Function
27
27
  @table_of_contents_lbl = y["table_of_contents"]
28
28
  @introduction_lbl = y["introduction"]
29
29
  @foreword_lbl = y["foreword"]
30
+ @abstract_lbl = y["abstract"]
30
31
  @termsdef_lbl = y["termsdef"]
31
32
  @termsdefsymbols_lbl = y["termsdefsymbols"]
32
33
  @normref_lbl = y["normref"]
@@ -11,11 +11,7 @@ module IsoDoc::Function
11
11
  def iso_bibitem_ref_code(b)
12
12
  isocode = b.at(ns("./docidentifier")).text
13
13
  prefix = b&.at(ns("./docidentifier/@type"))&.text
14
- #isodate = b.at(ns("./date[@type = 'published']"))
15
- #allparts = b.at(ns("./allparts"))
16
14
  reference = docid_l10n(isocode)
17
- #reference += ":#{date_range(isodate)}" if isodate
18
- #reference += " (#{@all_parts_lbl.downcase})" if allparts&.text == "true"
19
15
  docid_prefix(prefix, reference)
20
16
  end
21
17
 
@@ -26,7 +22,7 @@ module IsoDoc::Function
26
22
 
27
23
  def omit_docid_prefix(prefix)
28
24
  return true if prefix.nil? || prefix.empty?
29
- return ["ISO"].include? prefix
25
+ return ["ISO", "IEC"].include? prefix
30
26
  end
31
27
 
32
28
  def date_note_process(b, ref)
@@ -4,8 +4,8 @@ module IsoDoc::Function
4
4
  title = c1&.content || ""
5
5
  out.span **{ class: "zzMoveToFollowing" } do |s|
6
6
  s.b do |b|
7
- if get_anchors[node['id']][:label]
8
- b << "#{get_anchors[node['id']][:label]}. " unless @suppressheadingnumbers
7
+ if get_anchors[node['id']][:label] && !@suppressheadingnumbers
8
+ b << "#{get_anchors[node['id']][:label]}. "
9
9
  end
10
10
  b << "#{title} "
11
11
  end
@@ -105,7 +105,8 @@ module IsoDoc::Function
105
105
  end
106
106
 
107
107
  def term_defs_boilerplate(div, source, term, preface)
108
- source.each { |s| @anchors[s["bibitemid"]] or warn "term source #{s['bibitemid']} not referenced" }
108
+ source.each { |s| @anchors[s["bibitemid"]] or
109
+ warn "term source #{s['bibitemid']} not referenced" }
109
110
  if source.empty? && term.nil?
110
111
  div << @no_terms_boilerplate
111
112
  else
@@ -115,7 +116,9 @@ module IsoDoc::Function
115
116
  end
116
117
 
117
118
  def term_defs_boilerplate_cont(src, term)
118
- sources = sentence_join(src.map { |s| @anchors.dig(s["bibitemid"], :xref) })
119
+ sources = sentence_join(src.map do |s|
120
+ "<a href=##{s["bibitemid"]}>#{@anchors.dig(s["bibitemid"], :xref)}</a>"
121
+ end)
119
122
  if src.empty? then @internal_terms_boilerplate
120
123
  elsif term.nil? then external_terms_boilerplate(sources)
121
124
  else
@@ -190,5 +193,14 @@ module IsoDoc::Function
190
193
  f.elements.each { |e| parse(e, s) unless e.name == "title" }
191
194
  end
192
195
  end
196
+
197
+ def abstract(isoxml, out)
198
+ f = isoxml.at(ns("//preface/abstract")) || return
199
+ page_break(out)
200
+ out.div **attr_code(id: f["id"]) do |s|
201
+ s.h1(**{ class: "AbstractTitle" }) { |h1| h1 << @abstract_lbl }
202
+ f.elements.each { |e| parse(e, s) unless e.name == "title" }
203
+ end
204
+ end
193
205
  end
194
206
  end
@@ -74,6 +74,7 @@ module IsoDoc::Function
74
74
 
75
75
  def make_body3(body, docxml)
76
76
  body.div **{ class: "main-section" } do |div3|
77
+ abstract docxml, div3
77
78
  foreword docxml, div3
78
79
  introduction docxml, div3
79
80
  middle docxml, div3
@@ -13,7 +13,7 @@ module IsoDoc::Function
13
13
  preface_names(d.at(ns("//abstract")))
14
14
  preface_names(d.at(ns("//foreword")))
15
15
  preface_names(d.at(ns("//introduction")))
16
- sequential_asset_names(d.xpath(ns("//foreword | //introduction")))
16
+ sequential_asset_names(d.xpath(ns("//preface/abstract | //foreword | //introduction")))
17
17
  n = section_names(d.at(ns("//clause[title = 'Scope']")), 0, 1)
18
18
  n = section_names(d.at(ns(
19
19
  "//references[title = 'Normative References' or title = 'Normative references']")), n, 1)
@@ -29,21 +29,15 @@ module IsoDoc::HtmlFunction
29
29
  # add in from and to links to move the comment into place
30
30
  def make_comment_link(out, fn, node)
31
31
  out.span(**comment_link_attrs(fn, node)) do |s1|
32
- s1.span **{ lang: "EN-GB", style: "font-size:9.0pt" } do |s2|
33
- s2.a **{ style: "mso-comment-reference:SMC_#{fn};"\
32
+ s1.a **{ style: "mso-comment-reference:SMC_#{fn};"\
34
33
  "mso-comment-date:#{node['date'].gsub(/[-:Z]/, '')}" }
35
- s2.span **{ style: "mso-special-character:comment",
36
- target: fn } # do |s|
37
34
  end
38
- end
39
35
  end
40
36
 
41
37
  def make_comment_target(out)
42
38
  out.span **{ style: "MsoCommentReference" } do |s1|
43
- s1.span **{ lang: "EN-GB", style: "font-size:9.0pt" } do |s2|
44
- s2.span **{ style: "mso-special-character:comment" }
39
+ s1.span **{ style: "mso-special-character:comment" }
45
40
  end
46
- end
47
41
  end
48
42
 
49
43
  def make_comment_text(node, fn)
@@ -20,6 +20,7 @@ module IsoDoc::HtmlFunction
20
20
 
21
21
  def make_body3(body, docxml)
22
22
  body.div **{ class: "main-section" } do |div3|
23
+ abstract docxml, div3
23
24
  foreword docxml, div3
24
25
  introduction docxml, div3
25
26
  middle docxml, div3
@@ -108,7 +109,7 @@ module IsoDoc::HtmlFunction
108
109
  docxml.at("//head").add_child(html_head())
109
110
  d = docxml.at('//div[@class="main-section"]')
110
111
  d.name = "main"
111
- d.children.first.previous = html_button()
112
+ d.children.empty? or d.children.first.previous = html_button()
112
113
  end
113
114
 
114
115
  def html_preface(docxml)
@@ -117,7 +118,7 @@ module IsoDoc::HtmlFunction
117
118
  docxml.at("//body") << mathjax(@openmathdelim, @closemathdelim)
118
119
  if @scripts
119
120
  scripts = File.read(@scripts, encoding: "UTF-8")
120
- a = docxml.at("//body").add_child docxml.create_cdata(scripts) #scripts.to_xml(encoding: "US-ASCII")
121
+ a = docxml.at("//body").add_child docxml.create_cdata(scripts)
121
122
  end
122
123
  html_main(docxml)
123
124
  docxml
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "0.9.9".freeze
2
+ VERSION = "0.9.10".freeze
3
3
  end
@@ -10,6 +10,7 @@ module IsoDoc::WordFunction
10
10
  def make_body2(body, docxml)
11
11
  body.div **{ class: "WordSection2" } do |div2|
12
12
  info docxml, div2
13
+ abstract docxml, div2
13
14
  foreword docxml, div2
14
15
  introduction docxml, div2
15
16
  div2.p { |p| p << "&nbsp;" } # placeholder
@@ -329,7 +329,7 @@ INPUT
329
329
  <h1 class="ForewordTitle">Foreword</h1>
330
330
  <table id="samplecode" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
331
331
  <tr>
332
- <td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE</td>
332
+ <td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE</td>
333
333
  <td valign="top" class="example">
334
334
  <p>Hello</p>
335
335
  </td>
@@ -363,7 +363,7 @@ INPUT
363
363
  <h1 class="ForewordTitle">Foreword</h1>
364
364
  <table id="samplecode" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
365
365
  <tr>
366
- <td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE 1</td>
366
+ <td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE 1</td>
367
367
  <td valign="top" class="example">
368
368
  <p>Hello</p>
369
369
  </td>
@@ -371,7 +371,7 @@ INPUT
371
371
  </table>
372
372
  <table id="samplecode2" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
373
373
  <tr>
374
- <td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE 2</td>
374
+ <td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE 2</td>
375
375
  <td valign="top" class="example">
376
376
  <p>Hello</p>
377
377
  </td>
@@ -112,68 +112,40 @@ RSpec.describe IsoDoc do
112
112
  INPUT
113
113
  html = File.read("test.html").sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>")
114
114
  expect(html).to be_equivalent_to <<~"OUTPUT"
115
- <body lang="EN-US" link="blue" vlink="#954F72" xml:lang="EN-US">
116
- <div class="title-section">
117
- <p>&#xA0;</p>
118
- </div>
119
- <br />
120
- <div class="prefatory-section">
121
- <p>&#xA0;</p>
122
- </div>
123
- <br />
124
- <main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
125
- <br />
126
- <div>
127
- <h1 class="ForewordTitle">Foreword</h1>
128
- <span style="MsoCommentReference" target="1" class="commentLink" from="A" to="B">
129
- <span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
130
- <a style="mso-comment-reference:SMC_1;mso-comment-date:20170101T0000"><span style="MsoCommentReference" target="3" class="commentLink" from="A" to="C">
131
- <span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
132
- <a style="mso-comment-reference:SMC_3;mso-comment-date:20170108T0000"><p id="A">A.</p></a>
133
- <span style="mso-comment-continuation:3"><span style="mso-special-character:comment" target="3"></span></span>
134
- </span>
135
- </span></a>
136
- <span style="mso-comment-continuation:3"><span style="mso-comment-continuation:1"><span style="mso-special-character:comment" target="1"></span></span></span>
137
- </span>
138
- </span>
139
- <span style="mso-comment-continuation:3"><span style="mso-comment-continuation:1"><p id="B">B.</p></span></span>
140
-
141
- <span style="MsoCommentReference" target="2" class="commentLink" from="C" to="C">
142
- <span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
143
- <a style="mso-comment-reference:SMC_2;mso-comment-date:20170108T0000"><span style="mso-comment-continuation:3"><p id="C">C.</p></span></a>
144
- <span style="mso-special-character:comment" target="2"></span>
145
- </span>
146
- </span>
147
-
148
- </div>
149
- <br />
150
- <div class="Section3" id="">
151
- <h1 class="IntroTitle">Introduction</h1>
152
-
153
- </div>
154
- <p class="zzSTDTitle1"></p>
155
- <div style="mso-element:comment-list"><div style="mso-element:comment" id="3">
156
- <span style="mso-comment-author:&quot;ISO&quot;"></span>
157
-
158
- <p class="MsoCommentText" id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c08"><span style="MsoCommentReference">
159
- <span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
160
- <span style="mso-special-character:comment"></span>
161
- </span>
162
- </span>Second note.</p>
163
- </div>
164
- <div style="mso-element:comment" id="1"><span style="mso-comment-author:&quot;ISO&quot;"></span><p class="MsoCommentText" id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c07"><span style="MsoCommentReference"><span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB"><span style="mso-special-character:comment"></span></span></span>A Foreword shall appear in each document. The generic text is shown here. It does not contain requirements, recommendations or permissions.</p>
165
- <p class="MsoCommentText" id="_f1a8b9da-ca75-458b-96fa-d4af7328975e">For further information on the Foreword, see <b>ISO/IEC Directives, Part 2, 2016, Clause 12.</b></p></div>
166
- <div style="mso-element:comment" id="2">
167
- <span style="mso-comment-author:&quot;ISO&quot;"></span>
168
-
169
- <p class="MsoCommentText" id="_c54b9549-369f-4f85-b5b2-9db3fd3d4c08"><span style="MsoCommentReference">
170
- <span lang="EN-GB" style="font-size:9.0pt" xml:lang="EN-GB">
171
- <span style="mso-special-character:comment"></span>
172
- </span>
173
- </span>Second note.</p>
174
- </div></div>
115
+ <body lang="EN-US" link="blue" vlink="#954F72" xml:lang="EN-US">
116
+ <div class="title-section">
117
+ <p>&#xA0;</p>
118
+ </div>
119
+ <br />
120
+ <div class="prefatory-section">
121
+ <p>&#xA0;</p>
122
+ </div>
123
+ <br />
124
+ <main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
125
+ <br />
126
+ <div>
127
+ <h1 class="ForewordTitle">Foreword</h1>
128
+ <span style="MsoCommentReference" target="1" class="commentLink" from="A" to="B">
129
+ <a style="mso-comment-reference:SMC_1;mso-comment-date:20170101T0000"><span style="MsoCommentReference" target="3" class="commentLink" from="A" to="C">
130
+ <a style="mso-comment-reference:SMC_3;mso-comment-date:20170108T0000"><p id="A">A.</p></a>
131
+ </span></a>
132
+ </span>
133
+ <span style="mso-comment-continuation:3"><span style="mso-comment-continuation:1"><p id="B">B.</p></span></span>
134
+
135
+ <span style="MsoCommentReference" target="2" class="commentLink" from="C" to="C">
136
+ <a style="mso-comment-reference:SMC_2;mso-comment-date:20170108T0000"><span style="mso-comment-continuation:3"><p id="C">C.</p></span></a>
137
+ </span>
138
+
175
139
  </div>
176
- <script type="text/x-mathjax-config">
140
+ <br />
141
+ <div class="Section3" id="">
142
+ <h1 class="IntroTitle">Introduction</h1>
143
+
144
+ </div>
145
+ <p class="zzSTDTitle1"></p>
146
+ <div style="mso-element:comment-list"></div>
147
+ </main>
148
+ <script type="text/x-mathjax-config">
177
149
  MathJax.Hub.Config({
178
150
  asciimath2jax: {
179
151
  delimiters: [['(#(', ')#)']]
@@ -182,7 +154,6 @@ RSpec.describe IsoDoc do
182
154
  </script>
183
155
  <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=AM_HTMLorMML"></script>
184
156
  </body>
185
- </html>
186
157
  OUTPUT
187
158
  end
188
159
 
@@ -286,7 +286,7 @@ RSpec.describe IsoDoc do
286
286
  <div class="Section3"><a name="P" id="P"></a>
287
287
  <table class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><a name="_63112cbc-cde0-435f-9553-e0b8c4f5851c" id="_63112cbc-cde0-435f-9553-e0b8c4f5851c"></a>
288
288
  <tr>
289
- <td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE 1</td>
289
+ <td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE 1</td>
290
290
  <td valign="top" class="example">
291
291
  <p class="example"><a name="_158d4efa-b1c9-4aec-b325-756de8e4c968" id="_158d4efa-b1c9-4aec-b325-756de8e4c968"></a>'1M', '01M', and '0001M' all describe the calendar month January.</p>
292
292
  </td>
@@ -294,7 +294,7 @@ RSpec.describe IsoDoc do
294
294
  </table><p style="margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:0.0pt;margin-bottom:.0001pt;line-height:1.0pt;mso-line-height-rule:exactly" class="MsoNormal"><span lang="EN-GB" style="display:none;mso-hide:all" xml:lang="EN-GB">&#xA0;</span></p>
295
295
  <table class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><a name="_63112cbc-cde0-435f-9553-e0b8c4f5851d" id="_63112cbc-cde0-435f-9553-e0b8c4f5851d"></a>
296
296
  <tr>
297
- <td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE 2</td>
297
+ <td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE 2</td>
298
298
  <td valign="top" class="example">
299
299
  <p class="example"><a name="_158d4efa-b1c9-4aec-b325-756de8e4c969" id="_158d4efa-b1c9-4aec-b325-756de8e4c969"></a>'2M', '02M', and '0002M' all describe the calendar month February.</p>
300
300
  </td>
@@ -1,10 +1,39 @@
1
1
  require "spec_helper"
2
2
 
3
3
  RSpec.describe IsoDoc do
4
+ it "processes document with no content" do
5
+ expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
6
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
7
+ <preface/>
8
+ <sections/>
9
+ </iso-standard>
10
+ INPUT
11
+ <html xmlns:epub="http://www.idpf.org/2007/ops">
12
+ <head/>
13
+ <body lang="EN-US" link="blue" vlink="#954F72">
14
+ <div class="title-section">
15
+ <p>&#160;</p>
16
+ </div>
17
+ <br/>
18
+ <div class="prefatory-section">
19
+ <p>&#160;</p>
20
+ </div>
21
+ <br/>
22
+ <div class="main-section">
23
+ <p class="zzSTDTitle1"/>
24
+ </div>
25
+ </body>
26
+ </html>
27
+ OUTPUT
28
+ end
29
+
4
30
  it "processes section names" do
5
31
  expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
6
32
  <iso-standard xmlns="http://riboseinc.com/isoxml">
7
33
  <preface>
34
+ <abstract obligation="informative">
35
+ <title>Foreword</title>
36
+ </abstract>
8
37
  <foreword obligation="informative">
9
38
  <title>Foreword</title>
10
39
  <p id="A">This is a preamble</p>
@@ -67,6 +96,11 @@ RSpec.describe IsoDoc do
67
96
  </iso-standard>
68
97
  INPUT
69
98
  #{HTML_HDR}
99
+ <br/>
100
+ <div>
101
+ <h1 class="AbstractTitle">Abstract</h1>
102
+ </div>
103
+
70
104
  <br/>
71
105
  <div>
72
106
  <h1 class="ForewordTitle">Foreword</h1>
@@ -156,6 +190,9 @@ OUTPUT
156
190
  expect(IsoDoc::WordConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
157
191
  <iso-standard xmlns="http://riboseinc.com/isoxml">
158
192
  <preface>
193
+ <abstract obligation="informative">
194
+ <title>Foreword</title>
195
+ </abstract>
159
196
  <foreword obligation="informative">
160
197
  <title>Foreword</title>
161
198
  <p id="A">This is a preamble</p>
@@ -225,6 +262,10 @@ OUTPUT
225
262
  </div>
226
263
  <br clear="all" class="section"/>
227
264
  <div class="WordSection2">
265
+ <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
266
+ <div>
267
+ <h1 class="AbstractTitle">Abstract</h1>
268
+ </div>
228
269
  <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
229
270
  <div>
230
271
  <h1 class="ForewordTitle">Foreword</h1>
@@ -547,7 +588,7 @@ end
547
588
  <p id="ISO712" class="NormRef">ISO 712, <i> Cereals and cereal products?~@~I?~@~T?~@~IDetermination of moisture content?~@~I?~@~T?~@~IReference method</i></p>
548
589
  </div>
549
590
  <div id="H"><h1>2.&#160; Terms and definitions</h1><p>For the purposes of this document, the terms and definitions
550
- given in ISO 712 and the following apply.</p>
591
+ given in <a href="#ISO712">ISO 712</a> and the following apply.</p>
551
592
  <p>ISO and IEC maintain terminological databases for use in
552
593
  standardization at the following addresses:</p>
553
594
 
@@ -599,7 +640,7 @@ end
599
640
  <p id="ISO712" class="NormRef">ISO 712, <i> Cereals and cereal products?~@~I?~@~T?~@~IDetermination of moisture content?~@~I?~@~T?~@~IReference method</i></p>
600
641
  </div>
601
642
  <div id="H"><h1>2.&#160; Terms and definitions</h1><p>For the purposes of this document,
602
- the terms and definitions given in ISO 712, ISO 712 and ISO 712 apply.</p>
643
+ the terms and definitions given in <a href="#ISO712">ISO 712</a>, <a href="#ISO712">ISO 712</a> and <a href="#ISO712">ISO 712</a> apply.</p>
603
644
  <p>ISO and IEC maintain terminological databases for use in
604
645
  standardization at the following addresses:</p>
605
646
 
@@ -68,13 +68,13 @@ RSpec.describe IsoDoc do
68
68
  <p class="TermNum" id="paddy1">1.1</p><p class="Terms" style="text-align:left;">paddy</p>
69
69
 
70
70
  <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&lt;rice&gt; rice retaining its husk after threshing</p>
71
- <table id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE 1</td><td valign="top" class="example">
71
+ <table id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE 1</td><td valign="top" class="example">
72
72
  <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
73
73
  <ul>
74
74
  <li>A</li>
75
75
  </ul>
76
76
  </td></tr></table>
77
- <table id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE 2</td><td valign="top" class="example">
77
+ <table id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE 2</td><td valign="top" class="example">
78
78
  <ul>
79
79
  <li>A</li>
80
80
  </ul>
@@ -87,7 +87,7 @@ RSpec.describe IsoDoc do
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" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE</td><td valign="top" class="example">
90
+ <table id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE</td><td valign="top" class="example">
91
91
  <ul>
92
92
  <li>A</li>
93
93
  </ul>
@@ -171,13 +171,13 @@ OUTPUT
171
171
  <p class="TermNum" id="paddy1">1.1</p><p class="Terms" style="text-align:left;">paddy</p>
172
172
 
173
173
  <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&lt;rice&gt; rice retaining its husk after threshing</p>
174
- <table id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE 1</td><td valign="top" class="example">
174
+ <table id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE 1</td><td valign="top" class="example">
175
175
  <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
176
176
  <ul>
177
177
  <li>A</li>
178
178
  </ul>
179
179
  </td></tr></table>
180
- <table id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE 2</td><td valign="top" class="example">
180
+ <table id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE 2</td><td valign="top" class="example">
181
181
  <ul>
182
182
  <li>A</li>
183
183
  </ul>
@@ -190,7 +190,7 @@ OUTPUT
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" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE</td><td valign="top" class="example">
193
+ <table id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE</td><td valign="top" class="example">
194
194
  <ul>
195
195
  <li>A</li>
196
196
  </ul>
@@ -504,14 +504,14 @@ RSpec.describe IsoDoc do
504
504
  <h1 class="IntroTitle">Introduction</h1>
505
505
  <table id="N1" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
506
506
  <tr>
507
- <td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE</td>
507
+ <td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE</td>
508
508
  <td valign="top" class="example">
509
509
  <p>Hello</p>
510
510
  </td>
511
511
  </tr>
512
512
  </table>
513
513
  <div id="xyz"><h2>Preparatory</h2>
514
- <table id="N2" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE</td><td valign="top" class="example">
514
+ <table id="N2" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE</td><td valign="top" class="example">
515
515
  <p>Hello</p>
516
516
  </td></tr></table>
517
517
  </div>
@@ -521,7 +521,7 @@ RSpec.describe IsoDoc do
521
521
  <h1>1.&#160; Scope</h1>
522
522
  <table id="N" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
523
523
  <tr>
524
- <td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE</td>
524
+ <td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE</td>
525
525
  <td valign="top" class="example">
526
526
  <p>Hello</p>
527
527
  </td>
@@ -545,10 +545,10 @@ RSpec.describe IsoDoc do
545
545
  <div id="widgets">
546
546
  <h1>3.&#160; Widgets</h1>
547
547
  <div id="widgets1"><h2>3.1. </h2>
548
- <table id="note1" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE 1</td><td valign="top" class="example">
548
+ <table id="note1" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE 1</td><td valign="top" class="example">
549
549
  <p>Hello</p>
550
550
  </td></tr></table>
551
- <table id="note2" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE 2</td><td valign="top" class="example">
551
+ <table id="note2" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE 2</td><td valign="top" class="example">
552
552
  <p>Hello</p>
553
553
  </td></tr></table>
554
554
  <p> <a href="#note1">Example 1</a> <a href="#note2">Example 2</a> </p>
@@ -557,15 +557,15 @@ RSpec.describe IsoDoc do
557
557
  <br/>
558
558
  <div id="annex1" class="Section3">
559
559
  <div id="annex1a"><h2>A.1. </h2>
560
- <table id="AN" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE</td><td valign="top" class="example">
560
+ <table id="AN" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE</td><td valign="top" class="example">
561
561
  <p>Hello</p>
562
562
  </td></tr></table>
563
563
  </div>
564
564
  <div id="annex1b"><h2>A.2. </h2>
565
- <table id="Anote1" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE 1</td><td valign="top" class="example">
565
+ <table id="Anote1" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE 1</td><td valign="top" class="example">
566
566
  <p>Hello</p>
567
567
  </td></tr></table>
568
- <table id="Anote2" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0pt;margin-left:0pt">EXAMPLE 2</td><td valign="top" class="example">
568
+ <table id="Anote2" class="example" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td valign="top" class="example_label" style="width:82.8pt;padding:0 0 0 1em;margin-left:0pt">EXAMPLE 2</td><td valign="top" class="example">
569
569
  <p>Hello</p>
570
570
  </td></tr></table>
571
571
  </div>
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.9.9
4
+ version: 0.9.10
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-11-12 00:00:00.000000000 Z
11
+ date: 2018-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciimath