metanorma-iso 1.3.23 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/macos.yml +8 -0
  3. data/.github/workflows/ubuntu.yml +8 -0
  4. data/.github/workflows/windows.yml +8 -0
  5. data/lib/asciidoctor/iso/base.rb +26 -13
  6. data/lib/asciidoctor/iso/biblio.rng +36 -6
  7. data/lib/asciidoctor/iso/cleanup.rb +20 -3
  8. data/lib/asciidoctor/iso/front.rb +16 -107
  9. data/lib/asciidoctor/iso/front_id.rb +196 -0
  10. data/lib/asciidoctor/iso/isodoc.rng +450 -4
  11. data/lib/asciidoctor/iso/isostandard-amd.rng +98 -0
  12. data/lib/asciidoctor/iso/isostandard.rng +12 -1
  13. data/lib/asciidoctor/iso/macros.rb +21 -0
  14. data/lib/asciidoctor/iso/reqt.rng +23 -0
  15. data/lib/asciidoctor/iso/section.rb +18 -32
  16. data/lib/asciidoctor/iso/term_lookup_cleanup.rb +87 -0
  17. data/lib/asciidoctor/iso/validate.rb +41 -25
  18. data/lib/asciidoctor/iso/validate_requirements.rb +1 -1
  19. data/lib/asciidoctor/iso/validate_section.rb +2 -2
  20. data/lib/asciidoctor/iso/validate_style.rb +6 -5
  21. data/lib/asciidoctor/iso/validate_title.rb +1 -1
  22. data/lib/isodoc/iso/base_convert.rb +67 -99
  23. data/lib/isodoc/iso/html/header.html +10 -6
  24. data/lib/isodoc/iso/html/html_iso_titlepage.html +25 -16
  25. data/lib/isodoc/iso/html/isodoc.scss +25 -0
  26. data/lib/isodoc/iso/html/scripts.html +18 -0
  27. data/lib/isodoc/iso/html/style-human.scss +23 -0
  28. data/lib/isodoc/iso/html/style-iso.scss +18 -0
  29. data/lib/isodoc/iso/html/word_iso_intro.html +4 -0
  30. data/lib/isodoc/iso/html/word_iso_titlepage.html +21 -0
  31. data/lib/isodoc/iso/html/wordstyle.scss +45 -4
  32. data/lib/isodoc/iso/html_convert.rb +7 -0
  33. data/lib/isodoc/iso/iso.amendment.xsl +5082 -0
  34. data/lib/isodoc/iso/iso.international-standard.xsl +1899 -796
  35. data/lib/isodoc/iso/metadata.rb +69 -23
  36. data/lib/isodoc/iso/pdf_convert.rb +5 -11
  37. data/lib/isodoc/iso/presentation_xml_convert.rb +13 -0
  38. data/lib/isodoc/iso/sections.rb +66 -0
  39. data/lib/isodoc/iso/sts_convert.rb +31 -0
  40. data/lib/isodoc/iso/xref.rb +111 -0
  41. data/lib/metanorma-iso.rb +2 -0
  42. data/lib/metanorma/iso/processor.rb +23 -8
  43. data/lib/metanorma/iso/version.rb +1 -1
  44. data/metanorma-iso.gemspec +5 -2
  45. data/spec/asciidoctor-iso/amd_spec.rb +726 -0
  46. data/spec/asciidoctor-iso/base_spec.rb +31 -21
  47. data/spec/asciidoctor-iso/blocks_spec.rb +6 -6
  48. data/spec/asciidoctor-iso/cleanup_spec.rb +15 -15
  49. data/spec/asciidoctor-iso/inline_spec.rb +1 -1
  50. data/spec/asciidoctor-iso/macros_spec.rb +289 -0
  51. data/spec/asciidoctor-iso/refs_spec.rb +5 -5
  52. data/spec/asciidoctor-iso/section_spec.rb +8 -8
  53. data/spec/asciidoctor-iso/table_spec.rb +1 -1
  54. data/spec/isodoc/amd_spec.rb +652 -0
  55. data/spec/isodoc/blocks_spec.rb +112 -27
  56. data/spec/isodoc/i18n_spec.rb +8 -8
  57. data/spec/isodoc/inline_spec.rb +4 -4
  58. data/spec/isodoc/iso_spec.rb +1 -1
  59. data/spec/isodoc/metadata_spec.rb +90 -4
  60. data/spec/isodoc/postproc_spec.rb +11 -116
  61. data/spec/isodoc/ref_spec.rb +9 -9
  62. data/spec/isodoc/section_spec.rb +33 -6
  63. data/spec/isodoc/table_spec.rb +29 -29
  64. data/spec/isodoc/terms_spec.rb +4 -4
  65. data/spec/isodoc/xref_spec.rb +34 -28
  66. data/spec/metanorma/processor_spec.rb +2 -2
  67. data/spec/spec_helper.rb +11 -0
  68. metadata +63 -12
  69. data/asciidoctor-iso.gemspec.old +0 -50
@@ -16,7 +16,7 @@ module Asciidoctor
16
16
  (is|are)_not_(allowed | permitted |
17
17
  acceptable | permissible) |
18
18
  (is|are)_not_to_be |
19
- do_not )
19
+ [.,:;]_do_not )
20
20
  \\b
21
21
  REGEXP
22
22
  REQUIREMENT_RE =
@@ -22,7 +22,7 @@ module Asciidoctor
22
22
 
23
23
  # ISO/IEC DIR 2, 15.4
24
24
  def normref_validate(root)
25
- f = root.at("//references[title = 'Normative References']") || return
25
+ f = root.at("//references[@normative = 'true']") || return
26
26
  f.at("./references | ./clause") &&
27
27
  @log.add("Style", f, "normative references contains subclauses")
28
28
  end
@@ -168,7 +168,7 @@ module Asciidoctor
168
168
  "//li[not(p)] | //dt | //dd[not(p)] | //td[not(p)] | //th[not(p)]".freeze
169
169
 
170
170
  NORM_BIBITEMS =
171
- "//references[title = 'Normative References']/bibitem".freeze
171
+ "//references[@normative = 'true']/bibitem".freeze
172
172
 
173
173
  # ISO/IEC DIR 2, 10.2
174
174
  def norm_bibitem_style(root)
@@ -1,6 +1,6 @@
1
1
  require "metanorma-standoc"
2
2
  require "nokogiri"
3
- require "pp"
3
+ require "tokenizer"
4
4
 
5
5
  module Asciidoctor
6
6
  module ISO
@@ -70,7 +70,7 @@ module Asciidoctor
70
70
  # and a negative match on its preceding token
71
71
  def style_two_regex_not_prev(n, text, re, re_prev, warning)
72
72
  return if text.nil?
73
- arr = text.split(/\W+/)
73
+ arr = Tokenizer::WhitespaceTokenizer.new.tokenize(text)
74
74
  arr.each_index do |i|
75
75
  m = re.match arr[i]
76
76
  m_prev = i.zero? ? nil : re_prev.match(arr[i - 1])
@@ -91,9 +91,10 @@ module Asciidoctor
91
91
  # ISO/IEC DIR 2, 9.1
92
92
  # ISO/IEC DIR 2, Table B.1
93
93
  def style_number(n, t)
94
- style_two_regex_not_prev(n, t, /^(?<num>-?[0-9]{4,}[,0-9]*)$/,
95
- %r{(\bISO|\bIEC|\bIEEE/)$},
96
- "number not broken up in threes")
94
+ style_two_regex_not_prev(
95
+ n, t, /^(?<num>-?[0-9]{4,}[,0-9]*)$/,
96
+ %r{\b(ISO|IEC|IEEE/|(in|January|February|March|April|May|June|August|September|October|November|December)\b)$},
97
+ "number not broken up in threes")
97
98
  style_regex(/\b(?<num>[0-9]+\.[0-9]+)/i,
98
99
  "possible decimal point", n, t)
99
100
  style_regex(/\b(?<num>billion[s]?)\b/i,
@@ -36,7 +36,7 @@ module Asciidoctor
36
36
 
37
37
  # ISO/IEC DIR 2, 11.4
38
38
  def title_subpart_validate(root)
39
- docid = root.at("//bibdata/docidentifier[@type = 'iso']")
39
+ docid = root.at("//bibdata/docidentifier[@type = 'ISO']")
40
40
  subpart = /-\d+-\d+/.match docid
41
41
  iec = root.at("//bibdata/contributor[role/@type = 'publisher']/"\
42
42
  "organization[abbreviation = 'IEC' or "\
@@ -1,5 +1,7 @@
1
1
  require "isodoc"
2
2
  require_relative "metadata"
3
+ require_relative "sections"
4
+ require_relative "xref"
3
5
  require "fileutils"
4
6
 
5
7
  module IsoDoc
@@ -9,43 +11,25 @@ module IsoDoc
9
11
  @meta = Metadata.new(lang, script, labels)
10
12
  end
11
13
 
12
- def implicit_reference(b)
13
- b&.at(ns("./docidentifier"))&.text == "IEV"
14
+ def xref_init(lang, script, klass, labels, options)
15
+ @xrefs = Xref.new(lang, script, klass, labels, options)
14
16
  end
15
17
 
16
- def introduction(isoxml, out)
17
- f = isoxml.at(ns("//introduction")) || return
18
- num = f.at(ns(".//clause")) ? "0" : nil
19
- title_attr = { class: "IntroTitle" }
20
- page_break(out)
21
- out.div **{ class: "Section3", id: f["id"] } do |div|
22
- clause_name(num, @introduction_lbl, div, title_attr)
23
- f.elements.each do |e|
24
- parse(e, div) unless e.name == "title"
25
- end
26
- end
18
+ def amd(docxml)
19
+ doctype = docxml&.at(ns("//bibdata/ext/doctype"))&.text
20
+ %w(amendment technical-corrigendum).include? doctype
27
21
  end
28
22
 
29
- def foreword(isoxml, out)
30
- f = isoxml.at(ns("//foreword")) || return
31
- page_break(out)
32
- out.div **attr_code(id: f["id"]) do |s|
33
- s.h1(**{ class: "ForewordTitle" }) { |h1| h1 << @foreword_lbl }
34
- f.elements.each { |e| parse(e, s) unless e.name == "title" }
23
+ def convert1(docxml, filename, dir)
24
+ if amd(docxml)
25
+ @oldsuppressheadingnumbers = @suppressheadingnumbers
26
+ @suppressheadingnumbers = true
35
27
  end
36
- end
37
-
38
- def initial_anchor_names(d)
39
28
  super
40
- introduction_names(d.at(ns("//introduction")))
41
29
  end
42
30
 
43
- # we can reference 0-number clauses in introduction
44
- def introduction_names(clause)
45
- return if clause.nil?
46
- clause.xpath(ns("./clause")).each_with_index do |c, i|
47
- section_names1(c, "0.#{i + 1}", 2)
48
- end
31
+ def implicit_reference(b)
32
+ b&.at(ns("./docidentifier"))&.text == "IEV"
49
33
  end
50
34
 
51
35
  # terms not defined in standoc
@@ -57,36 +41,6 @@ module IsoDoc
57
41
  end
58
42
  end
59
43
 
60
- def annex_names(clause, num)
61
- appendix_names(clause, num)
62
- super
63
- end
64
-
65
- def appendix_names(clause, num)
66
- clause.xpath(ns("./appendix")).each_with_index do |c, i|
67
- @anchors[c["id"]] = anchor_struct(i + 1, nil, @appendix_lbl, "clause")
68
- @anchors[c["id"]][:level] = 2
69
- @anchors[c["id"]][:container] = clause["id"]
70
- end
71
- end
72
-
73
- def section_names1(clause, num, level)
74
- @anchors[clause["id"]] =
75
- { label: num, level: level, xref: num }
76
- # subclauses are not prefixed with "Clause"
77
- clause.xpath(ns("./clause | ./terms | ./term | ./definitions | ./references")).
78
- each_with_index do |c, i|
79
- section_names1(c, "#{num}.#{i + 1}", level + 1)
80
- end
81
- end
82
-
83
- def annex_names1(clause, num, level)
84
- @anchors[clause["id"]] = { label: num, xref: num, level: level }
85
- clause.xpath(ns("./clause | ./references")).each_with_index do |c, i|
86
- annex_names1(c, "#{num}.#{i + 1}", level + 1)
87
- end
88
- end
89
-
90
44
  def eref_localities1_zh(target, type, from, to, delim)
91
45
  subsection = from&.text&.match(/\./)
92
46
  ret = (delim == ";") ? ";" : (type == "list") ? "" : delim
@@ -100,6 +54,7 @@ module IsoDoc
100
54
  end
101
55
 
102
56
  def eref_localities1(target, type, from, to, delim, lang = "en")
57
+ return "" if type == "anchor"
103
58
  subsection = from&.text&.match(/\./)
104
59
  type = type.downcase
105
60
  return l10n(eref_localities1_zh(target, type, from, to, delim)) if lang == "zh"
@@ -114,12 +69,12 @@ module IsoDoc
114
69
  end
115
70
 
116
71
  def prefix_container(container, linkend, target)
117
- delim = anchor(target, :type) == "listitem" ? " " : ", "
118
- l10n(anchor(container, :xref) + delim + linkend)
72
+ delim = @xrefs.anchor(target, :type) == "listitem" ? " " : ", "
73
+ l10n(@xrefs.anchor(container, :xref) + delim + linkend)
119
74
  end
120
75
 
121
76
  def example_span_label(node, div, name)
122
- n = get_anchors[node["id"]]
77
+ n = @xrefs.get[node["id"]]
123
78
  div.span **{ class: "example_label" } do |p|
124
79
  lbl = (n.nil? || n[:label].nil? || n[:label].empty?) ? @example_lbl :
125
80
  l10n("#{@example_lbl} #{n[:label]}")
@@ -191,57 +146,70 @@ module IsoDoc
191
146
  ""
192
147
  end
193
148
 
194
- def format_ref(ref, prefix, isopub, date, allparts)
195
- ref = ref.sub(/ \(All Parts\)/i, "")
196
- ref = docid_prefix(prefix, ref)
197
- return "[#{ref}]" if /^\d+$/.match(ref) && !prefix &&
198
- !/^\[.*\]$/.match(ref)
199
- ref
149
+ def cleanup(docxml)
150
+ super
151
+ table_th_center(docxml)
152
+ docxml
200
153
  end
201
154
 
202
- def table_footnote_reference_format(a)
203
- a.content = a.content + ")"
155
+ def table_th_center(docxml)
156
+ docxml.xpath("//thead//th | //thead//td").each do |th|
157
+ th["align"] = "center"
158
+ th["valign"] = "middle"
159
+ end
204
160
  end
205
161
 
206
- def clause_parse_title(node, div, c1, out)
207
- return inline_header_title(out, node, c1) if c1.nil?
208
- super
162
+ def formula_where(dl, out)
163
+ return if dl.nil?
164
+ return super unless (dl&.xpath(ns("./dt"))&.size == 1 &&
165
+ dl&.at(ns("./dd"))&.elements&.size == 1 &&
166
+ dl&.at(ns("./dd/p")))
167
+ out.span **{ class: "zzMoveToFollowing" } do |s|
168
+ s << "#{@where_lbl} "
169
+ dl.at(ns("./dt")).children.each { |n| parse(n, s) }
170
+ s << " "
171
+ end
172
+ parse(dl.at(ns("./dd/p")), out)
209
173
  end
210
174
 
211
- def cleanup(docxml)
212
- super
213
- remove_internal_hyperlinks(docxml)
214
- table_th_center(docxml)
215
- docxml
175
+ def admonition_parse(node, out)
176
+ type = node["type"]
177
+ name = admonition_name(node, type)
178
+ out.div **{ id: node["id"], class: admonition_class(node) } do |div|
179
+ node.first_element_child.name == "p" ?
180
+ admonition_p_parse(node, div, name) : admonition_parse1(node, div, name)
181
+ end
216
182
  end
217
183
 
218
- def remove_internal_hyperlinks(docxml)
219
- docxml.xpath("//a[@href]").each do |a|
220
- next unless /^#/.match(a[:href])
221
- anchor = a[:href].sub(/^#/, "")
222
- next if a["epub:type"] == "footnote"
223
- next unless @anchors[anchor]
224
- next unless @anchors[anchor][:type]
225
- next if @anchors[anchor][:type] == "clause"
226
- a.replace(a.children)
184
+ def admonition_parse1(node, div, name)
185
+ div.p do |p|
186
+ admonition_name_parse(node, p, name) if name
227
187
  end
188
+ node.children.each { |n| parse(n, div) unless n.name == "name" }
228
189
  end
229
190
 
230
- def table_th_center(docxml)
231
- docxml.xpath("//thead//th | //thead//td").each do |th|
232
- th["align"] = "center"
233
- th["valign"] = "middle"
191
+ def admonition_p_parse(node, div, name)
192
+ div.p do |p|
193
+ admonition_name_parse(node, p, name) if name
194
+ node.first_element_child.children.each { |n| parse(n, p) }
234
195
  end
196
+ node.element_children[1..-1].each { |n| parse(n, div) }
197
+ end
198
+
199
+ def admonition_name_parse(_node, div, name)
200
+ name.children.each { |n| parse(n, div) }
201
+ div << " &mdash; "
235
202
  end
236
203
 
237
- def hierarchical_formula_names(clause, num)
238
- c = IsoDoc::Function::XrefGen::Counter.new
239
- clause.xpath(ns(".//formula")).each do |t|
240
- next if t["id"].nil? || t["id"].empty?
241
- @anchors[t["id"]] =
242
- anchor_struct("#{num}#{hiersep}#{c.increment(t).print}", t,
243
- t["inequality"] ? @inequality_lbl : @formula_lbl,
244
- "formula", t["unnumbered"])
204
+ def figure_name_parse(node, div, name)
205
+ lbl = @xrefs.anchor(node['id'], :label, false)
206
+ lbl = nil if labelled_ancestor(node) && node.ancestors("figure").empty?
207
+ return if lbl.nil? && name.nil?
208
+ div.p **{ class: "FigureTitle", style: "text-align:center;" } do |p|
209
+ figname = node.parent.name == "figure" ? "" : "#{@figure_lbl} "
210
+ lbl.nil? or p << l10n("#{figname}#{lbl}")
211
+ name and !lbl.nil? and p << "&nbsp;&mdash; "
212
+ name and name.children.each { |n| parse(n, div) }
245
213
  end
246
214
  end
247
215
  end
@@ -66,7 +66,7 @@ normal'>                            
99
99
 
100
100
  <div style='mso-element:header' id=eh2>
101
101
  <p class=MsoHeader align=left style='text-align:left;line-height:12.0pt;
102
- mso-line-height-rule:exactly'><span lang=EN-GB>{{ docnumber_lang }}{{ draftinfo }}</span></p>
102
+ mso-line-height-rule:exactly'><span lang=EN-GB>{{ docnumber_reference }}{{ draftinfo }}</span></p>
103
103
  </div>
104
104
 
105
105
  <div style='mso-element:header' id=eh2l>
106
106
  <p class=MsoHeaderLandscape align=left style='text-align:left;line-height:12.0pt;
107
- mso-line-height-rule:exactly'><span lang=EN-GB>{{ docnumber_lang }}{{ draftinfo }}</span></p>
107
+ mso-line-height-rule:exactly'><span lang=EN-GB>{{ docnumber_reference }}{{ draftinfo }}</span></p>
108
108
  </div>
109
109
 
110
110
  <div style='mso-element:header' id=h2>
111
111
  <p class=MsoHeader align=right style='text-align:right;line-height:12.0pt;
112
- mso-line-height-rule:exactly'><span lang=EN-GB>{{ docnumber_lang }}{{ draftinfo }}</span></p>
112
+ mso-line-height-rule:exactly'><span lang=EN-GB>{{ docnumber_reference }}{{ draftinfo }}</span></p>
113
113
  </div>
114
114
 
115
115
  <div style='mso-element:header' id=h2l>
116
116
  <p class=MsoHeaderLandscape align=right style='text-align:right;line-height:12.0pt;
117
- mso-line-height-rule:exactly'><span lang=EN-GB>{{ docnumber_lang }}{{ draftinfo }}</span></p>
117
+ mso-line-height-rule:exactly'><span lang=EN-GB>{{ docnumber_reference }}{{ draftinfo }}</span></p>
118
118
  </div>
119
119
 
120
120
  <div style='mso-element:footer' id=ef2>
@@ -238,8 +238,12 @@ lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'>
238
238
  </div>
239
239
 
240
240
  <div style='mso-element:footer' id=f4>
241
-
241
+ {% if ics %}
242
242
  <p class=MsoFooter><b style='mso-bidi-font-weight:normal'><span>ICS {{ ics }}<o:p></o:p></span></b></p>
243
+ {% endif %}
244
+ {% if keywords.size > 0 %}
245
+ <p class=MsoFooter><b>Descriptors:</b> {{ keywords | join: ", " }}</p>
246
+ {% endif %}
243
247
 
244
248
  <p class=MsoFooter style='margin-top:0cm'><span lang=EN-AU style='font-size:
245
249
  10.0pt;mso-ansi-language:EN-AU'>Price based on </span><!--[if supportFields]><span
@@ -26,7 +26,14 @@ name="CVP_Secretariat_Loca">Secretariat: {{ secretariat }}

26
26
  {% if doctitlepartlabel %}<span class="partlabel">{{ doctitlepartlabel }}: </span>{% endif %}
27
27
  <span class="part">{{ doctitlepart }}</span>
28
28
  {% endif %}
29
- </div></div>
29
+ </div>
30
+ {% if doctitleamdlabel %}
31
+ <div class="doctitle-part">{{ doctitleamdlabel }}{% if doctitleamd %}: {{ doctitleamd }}{% endif %}</div>
32
+ {% endif %}
33
+ {% if doctitlecorrlabel %}
34
+ <div class="doctitle-part">{{ doctitlecorrlabel }}</div>
35
+ {% endif %}
36
+ </div>
30
37
 
31
38
  <div class="doctitle-fr"><div><span class="title">{{ docsubtitleintro }}{% if docsubtitleintro and docsubtitlemain %} &mdash; {% endif %}</span><span class="subtitle">{{ docsubtitlemain }}{% if docsubtitlemain and docsubtitlepart %} &mdash;{% endif %}</span>
32
39
  {% if docsubtitlepart %}
@@ -34,7 +41,14 @@ name="CVP_Secretariat_Loca">Secretariat: {{ secretariat }}

34
41
  {% if docsubtitlepartlabel %}<span class="partlabel">{{ docsubtitlepartlabel }}: </span>{% endif %}
35
42
  <span class="part">{{ docsubtitlepart }}</span>
36
43
  {% endif %}
37
- </div></div>
44
+ </div>
45
+ {% if docsubtitleamdlabel %}
46
+ <div>{{ docsubtitleamdlabel }}{% if docsubtitleamd %}: {{ docsubtitleamd }}{% endif %}</div>
47
+ {% endif %}
48
+ {% if docsubtitlecorrlabel %}
49
+ <div>{{ docsubtitlecorrlabel }}</div>
50
+ {% endif %}
51
+ </div>
38
52
 
39
53
  <div class="coverpage_docstage">
40
54
  {% if unpublished %}
@@ -45,19 +59,14 @@ name="CVP_Secretariat_Loca">Secretariat: {{ secretariat }}

45
59
  {% if unpublished %}
46
60
  <div class="coverpage_warning">
47
61
  <div id="boilerplate-license-destination"/>
48
- <!--
49
- <p>Warning for WDs
50
- and CDs</p>
51
-
52
- <p>This
53
- document is not an ISO International Standard. It is distributed for review and
54
- comment. It is subject to change without notice and may not be referred to as
55
- an International Standard.</p>
56
-
57
- <p>Recipients
58
- of this draft are invited to submit, with their comments, notification of any
59
- relevant patent rights of which they are aware and to provide supporting
60
- documentation.</p>
61
- -->
62
62
  </div>
63
63
  {% endif %}
64
+
65
+ {% if ics %}
66
+ <p><b>ICS:</b> {{ ics }}</p>
67
+ {% endif %}
68
+
69
+ {% if keywords.size > 0 %}
70
+ <p><b>Descriptors:</b> {{ keywords | join: ", " }}
71
+ {% endif %}
72
+
@@ -510,6 +510,27 @@ p.zzSTDTitle1, li.zzSTDTitle1, div.zzSTDTitle1
510
510
  mso-ansi-language:EN-GB;
511
511
  font-weight:bold;
512
512
  mso-bidi-font-weight:normal;}
513
+ p.zzSTDTitle2, li.zzSTDTitle2, div.zzSTDTitle2
514
+ {mso-style-name:zzSTDTitle;
515
+ mso-style-noshow:yes;
516
+ mso-style-unhide:no;
517
+ mso-style-next:Normal;
518
+ margin-top:0pt;
519
+ margin-right:0cm;
520
+ margin-bottom:18.0pt;
521
+ margin-left:0cm;
522
+ line-height:17.5pt;
523
+ mso-line-height-rule:exactly;
524
+ mso-pagination:widow-orphan;
525
+ mso-hyphenate:none;
526
+ tab-stops:20.15pt;
527
+ font-size:16.0pt;
528
+ mso-bidi-font-size:11.0pt;
529
+ font-family:$headerfont;
530
+ mso-fareast-font-family:"SimHei",serif;
531
+ mso-bidi-font-family:$headerfont;
532
+ mso-ansi-language:EN-GB;
533
+ mso-bidi-font-weight:normal;}
513
534
  p.Quote, li.Quote, div.Quote
514
535
  {mso-style-priority:99;
515
536
  margin-top:0cm;
@@ -598,6 +619,10 @@ table.figdl
598
619
  margin-right: 0cm;
599
620
  }
600
621
 
622
+ div.figdl p, table.figdl p {
623
+ font-size: 10.0pt;
624
+ }
625
+
601
626
  table.formula_dl {
602
627
  margin-left:20.15pt;
603
628
  }
@@ -158,3 +158,21 @@ $('#toggle').on('click', function(){
158
158
  $("[rel=footnote]").inlineFootnote();
159
159
  });
160
160
  </script>
161
+ <script>
162
+ // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
163
+ //
164
+ // AnchorJS - v4.2.2 - 2020-04-20
165
+ // https://www.bryanbraun.com/anchorjs/
166
+ // Copyright (c) 2020 Bryan Braun; Licensed MIT
167
+ //
168
+ // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
169
+ !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";return function(A){function f(A){A.icon=A.hasOwnProperty("icon")?A.icon:"",A.visible=A.hasOwnProperty("visible")?A.visible:"hover",A.placement=A.hasOwnProperty("placement")?A.placement:"right",A.ariaLabel=A.hasOwnProperty("ariaLabel")?A.ariaLabel:"Anchor",A.class=A.hasOwnProperty("class")?A.class:"",A.base=A.hasOwnProperty("base")?A.base:"",A.truncate=A.hasOwnProperty("truncate")?Math.floor(A.truncate):64,A.titleText=A.hasOwnProperty("titleText")?A.titleText:""}function p(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],f(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var e,t,i,n,o,s,a,r,c,h,l,u,d=[];if(f(this.options),"touch"===(l=this.options.visible)&&(l=this.isTouchDevice()?"always":"hover"),0===(e=p(A=A||"h2, h3, h4, h5, h6")).length)return this;for(!function(){if(null!==document.head.querySelector("style.anchorjs"))return;var A,e=document.createElement("style");e.className="anchorjs",e.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(e):document.head.insertBefore(e,A);e.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",e.sheet.cssRules.length),e.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",e.sheet.cssRules.length),e.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",e.sheet.cssRules.length),e.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',e.sheet.cssRules.length)}(),t=document.querySelectorAll("[id]"),i=[].map.call(t,function(A){return A.id}),o=0;o<e.length;o++)if(this.hasAnchorJSLink(e[o]))d.push(o);else{if(e[o].hasAttribute("id"))n=e[o].getAttribute("id");else if(e[o].hasAttribute("data-anchor-id"))n=e[o].getAttribute("data-anchor-id");else{for(c=r=this.urlify(e[o].textContent),a=0;void 0!==s&&(c=r+"-"+a),a+=1,-1!==(s=i.indexOf(c)););s=void 0,i.push(c),e[o].setAttribute("id",c),n=c}(h=document.createElement("a")).className="anchorjs-link "+this.options.class,h.setAttribute("aria-label",this.options.ariaLabel),h.setAttribute("data-anchorjs-icon",this.options.icon),this.options.titleText&&(h.title=this.options.titleText),u=document.querySelector("base")?window.location.pathname+window.location.search:"",u=this.options.base||u,h.href=u+"#"+n,"always"===l&&(h.style.opacity="1"),""===this.options.icon&&(h.style.font="1em/1 anchorjs-icons","left"===this.options.placement&&(h.style.lineHeight="inherit")),"left"===this.options.placement?(h.style.position="absolute",h.style.marginLeft="-1em",h.style.paddingRight="0.5em",e[o].insertBefore(h,e[o].firstChild)):(h.style.paddingLeft="0.375em",e[o].appendChild(h))}for(o=0;o<d.length;o++)e.splice(d[o]-o,1);return this.elements=this.elements.concat(e),this},this.remove=function(A){for(var e,t,i=p(A),n=0;n<i.length;n++)(t=i[n].querySelector(".anchorjs-link"))&&(-1!==(e=this.elements.indexOf(i[n]))&&this.elements.splice(e,1),i[n].removeChild(t));return this},this.removeAll=function(){this.remove(this.elements)},this.urlify=function(A){return this.options.truncate||f(this.options),A.trim().replace(/\'/gi,"").replace(/[& +$,:;=?@"#{}|^~[`%!'<>\]\.\/\(\)\*\\\n\t\b\v]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),t=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||t||!1}}});
170
+ // @license-end
171
+ </script>
172
+ <script>
173
+ anchors.options = {
174
+ placement: 'left'
175
+ };
176
+ anchors.add('h1, h2, h3, h4');
177
+ </script>
178
+