metanorma-iso 2.3.4 → 2.3.6

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: 6252955e2d89211f2f4a54d9d1b3ef9ac843ef27d9501675b231bc71a7d7c293
4
- data.tar.gz: ac49bec2ab4bf06ec7ce6d17210f08e028eb87268fa5f0d01b4f241d0e4259f8
3
+ metadata.gz: c0a1965b8adf5207ea4a7c1d65561a0c8762b2b9f939aefb88594bb5995441ad
4
+ data.tar.gz: 4388b4df33214b2fe2ec7823951a711dd13dfe4d6d426dfd4455c098f7996060
5
5
  SHA512:
6
- metadata.gz: bb52dff522bc328a0c1f6741f7b989124f5f8a2db7d3284f00144c201a1e683a567cca9caf023da7eee525a97ec239007fb472735efb9a62bfff1a8bda5e85d6
7
- data.tar.gz: 04ff426186796810778862c44ee7d2e55097379356a5d3e826017d4bb5a13ba5febada40a224b7ce067a3a867a8a54b9b44c9a0d545461fad66c990dacefea68
6
+ metadata.gz: 1ee61e3f2e61001ce759bbf13b274d63191595549e31189a8fcda25b8d6edad351df426aaa77b6187adb99ca742d39be6b8ad883a7336e3029ed80fedd25397b
7
+ data.tar.gz: 13b953974daeeaf1f88696a36f752218bdb9034a653d2f13404d9667ee1a91ef58f466ac58a84ffa9acb379f90231499249c9a178e05b4e1fff90eec1a21b953
@@ -35,7 +35,7 @@ class Html2Doc
35
35
  !x.text.strip.empty?
36
36
  end
37
37
 
38
- prev = first_p.xpath("./preceding-sibling::* | "\
38
+ prev = first_p.xpath("./preceding-sibling::* | " \
39
39
  "./preceding-sibling::text()[normalize-space()]")
40
40
  # bullet, tab, paragraph: ignore bullet, tab
41
41
  if prev.empty? then para.replace(para.children)
@@ -76,7 +76,7 @@ class Html2Doc
76
76
  end
77
77
 
78
78
  def unnest_list_paras(docxml)
79
- docxml.xpath("//p[@class = 'ListContinue1' or @class = 'ListNumber1']"\
79
+ docxml.xpath("//p[@class = 'ListContinue1' or @class = 'ListNumber1']" \
80
80
  "[.//p]").each do |p|
81
81
  p.at("./p") and
82
82
  list2para_unnest_para(p, p.at("./p"),
@@ -89,7 +89,7 @@ class Html2Doc
89
89
  end
90
90
 
91
91
  def indent_lists(docxml)
92
- docxml.xpath("//div[@class = 'Note' or @class = 'Example' or "\
92
+ docxml.xpath("//div[@class = 'Note' or @class = 'Example' or " \
93
93
  "@class = 'Quote']").each do |d|
94
94
  d.xpath(".//p").each do |p|
95
95
  indent_lists1(p)
@@ -124,7 +124,7 @@ class Html2Doc
124
124
  end
125
125
 
126
126
  def list_add_tail(list, liststyles, listtype, level)
127
- list.xpath(".//ul[not(ancestor::li/ancestor::*/@id = '#{list['id']}')] | "\
127
+ list.xpath(".//ul[not(ancestor::li/ancestor::*/@id = '#{list['id']}')] | " \
128
128
  ".//ol[not(ancestor::li/ancestor::*/@id = '#{list['id']}')]")
129
129
  .each do |li|
130
130
  list_add1(li.parent, liststyles, listtype, level - 1)
@@ -137,8 +137,10 @@ class Html2Doc
137
137
  idx += 1
138
138
  ol = elem.xpath("./ancestor::ol")&.last
139
139
  label = listlabel(listtype, idx, ol ? ol["type"] : nil)
140
- elem.children.first.previous =
141
- "#{label}<span style='mso-tab-count:1'>&#xa0;</span>"
140
+ unless elem.at("./ancestor::div[@class = 'index']") # indexsect
141
+ elem.children.first.previous =
142
+ "#{label}<span style='mso-tab-count:1'>&#xa0;</span>"
143
+ end
142
144
  elem["level"] = level
143
145
  idx
144
146
  end
@@ -162,7 +164,7 @@ class Html2Doc
162
164
 
163
165
  def cleanup(docxml)
164
166
  super
165
- docxml.xpath("//div[@class = 'Quote' or @class = 'Example' or "\
167
+ docxml.xpath("//div[@class = 'Quote' or @class = 'Example' or " \
166
168
  "@class = 'Note']").each do |d|
167
169
  d.delete("class")
168
170
  end
@@ -31,7 +31,7 @@ module IsoDoc
31
31
  def example_span_label(_node, div, name)
32
32
  return if name.nil?
33
33
 
34
- div.span **{ class: "example_label" } do |p|
34
+ div.span class: "example_label" do |p|
35
35
  name.children.each { |n| parse(n, p) }
36
36
  end
37
37
  end
@@ -64,7 +64,7 @@ module IsoDoc
64
64
  end
65
65
 
66
66
  def example_parse(node, out)
67
- out.div **{ id: node["id"], class: "example" } do |div|
67
+ out.div id: node["id"], class: "example" do |div|
68
68
  if node_begins_with_para(node)
69
69
  example_p_parse(node, div)
70
70
  else
@@ -92,7 +92,7 @@ module IsoDoc
92
92
  dlist.at(ns("./dd"))&.elements&.size == 1 &&
93
93
  dlist.at(ns("./dd/p"))
94
94
 
95
- out.span **{ class: "zzMoveToFollowing" } do |s|
95
+ out.span class: "zzMoveToFollowing" do |s|
96
96
  s << "#{@i18n.where} "
97
97
  dlist.at(ns("./dt")).children.each { |n| parse(n, s) }
98
98
  s << " "
@@ -103,7 +103,7 @@ module IsoDoc
103
103
  def admonition_parse(node, out)
104
104
  type = node["type"]
105
105
  name = admonition_name(node, type)
106
- out.div **{ id: node["id"], class: admonition_class(node) } do |div|
106
+ out.div id: node["id"], class: admonition_class(node) do |div|
107
107
  if node.first_element_child.name == "p"
108
108
  admonition_p_parse(node, div, name)
109
109
  else
@@ -139,7 +139,7 @@ module IsoDoc
139
139
  end
140
140
 
141
141
  def figure_name_parse(_node, div, name)
142
- div.p **{ class: "FigureTitle", style: "text-align:center;" } do |p|
142
+ div.p class: "FigureTitle", style: "text-align:center;" do |p|
143
143
  name&.children&.each { |n| parse(n, p) }
144
144
  end
145
145
  end
@@ -149,16 +149,13 @@ module IsoDoc
149
149
  middle_admonitions(isoxml, out)
150
150
  i = scope isoxml, out, 0
151
151
  i = norm_ref isoxml, out, i
152
- # i = terms_defs isoxml, out, i
153
- # symbols_abbrevs isoxml, out, i
154
152
  clause_etc isoxml, out, i
155
153
  annex isoxml, out
156
154
  bibliography isoxml, out
157
- indexsect isoxml, out
158
155
  end
159
156
 
160
157
  def clause_etc(isoxml, out, num)
161
- isoxml.xpath(ns("//sections/clause[not(@type = 'scope')] | "\
158
+ isoxml.xpath(ns("//sections/clause[not(@type = 'scope')] | " \
162
159
  "//sections/terms | //sections/definitions"))
163
160
  .each do |f|
164
161
  clause_etc1(f, out, num)
@@ -180,7 +177,6 @@ module IsoDoc
180
177
 
181
178
  def indexsect(isoxml, out)
182
179
  isoxml.xpath(ns("//indexsect")).each do |i|
183
- page_break(out)
184
180
  clause_parse(i, out)
185
181
  end
186
182
  end
@@ -194,6 +190,42 @@ module IsoDoc
194
190
  ret[:sdo] = std_docid_semantic(ret[:sdo])
195
191
  ret
196
192
  end
193
+
194
+ def table_parse(node, out)
195
+ @in_table = true
196
+ table_title_parse(node, out)
197
+ measurement_units(node, out)
198
+ out.table **table_attrs(node) do |t|
199
+ table_parse_core(node, t)
200
+ (dl = node.at(ns("./dl"))) && parse(dl, out)
201
+ node.xpath(ns("./note[not(@type = 'units')]"))
202
+ .each { |n| parse(n, out) }
203
+ end
204
+ @in_table = false
205
+ end
206
+
207
+ def figure_parse1(node, out)
208
+ measurement_units(node, out)
209
+ out.div **figure_attrs(node) do |div|
210
+ node.children.each do |n|
211
+ figure_key(out) if n.name == "dl"
212
+ next if n.name == "note" && n["type"] == "units"
213
+
214
+ parse(n, div) unless n.name == "name"
215
+ end
216
+ figure_name_parse(node, div, node.at(ns("./name")))
217
+ end
218
+ end
219
+
220
+ def measurement_units(node, out)
221
+ node.xpath(ns("./note[@type = 'units']")).each do |n|
222
+ out.div align: "right" do |p|
223
+ p.b do |b|
224
+ n.children.each { |e| parse(e, b) }
225
+ end
226
+ end
227
+ end
228
+ end
197
229
  end
198
230
  end
199
231
  end
@@ -623,6 +623,10 @@ div.figure {
623
623
  max-width: 100%;
624
624
  height: auto; }
625
625
 
626
+ table div.figure {
627
+ padding: 0;
628
+ margin: 0; }
629
+
626
630
  /*
627
631
  Document types + stages
628
632
  */
@@ -341,6 +341,12 @@ div.figure {
341
341
  @include figureBlock();
342
342
  }
343
343
 
344
+ table div.figure {
345
+ padding: 0;
346
+ margin: 0;
347
+ }
348
+
349
+
344
350
  /*
345
351
  Document types + stages
346
352
  */
@@ -575,6 +575,10 @@ div.figure {
575
575
  max-width: 100%;
576
576
  height: auto; }
577
577
 
578
+ table div.figure {
579
+ padding: 0;
580
+ margin: 0; }
581
+
578
582
  /*
579
583
  Document types + stages
580
584
  */
@@ -281,6 +281,13 @@ div.figure {
281
281
  @include figureBlock();
282
282
  }
283
283
 
284
+ table div.figure {
285
+ padding: 0;
286
+ margin: 0;
287
+ }
288
+
289
+
290
+
284
291
  /*
285
292
  Document types + stages
286
293
  */
@@ -2015,6 +2015,22 @@ div.WordSection3 {
2015
2015
  div.colophon {
2016
2016
  page: WordSection4; }
2017
2017
 
2018
+ @page WordSection5 {
2019
+ size: 595.3pt 841.9pt;
2020
+ margin: 39.7pt 53.85pt 1.0cm 53.85pt;
2021
+ mso-header-margin: 35.45pt;
2022
+ mso-footer-margin: 14.2pt;
2023
+ mso-page-numbers: 1;
2024
+ mso-columns: 2 even 36.0pt;
2025
+ mso-even-header: url("file:///C:/Doc/FILENAME_files/header.html") eh2;
2026
+ mso-header: url("file:///C:/Doc/FILENAME_files/header.html") h2;
2027
+ mso-even-footer: url("file:///C:/Doc/FILENAME_files/header.html") f4;
2028
+ mso-footer: url("file:///C:/Doc/FILENAME_files/header.html") f4;
2029
+ mso-paper-source: 0; }
2030
+
2031
+ div.index {
2032
+ page: WordSection5; }
2033
+
2018
2034
  /* List Definitions */
2019
2035
  @list l11 {
2020
2036
  mso-list-id: 145051656;
@@ -1902,6 +1902,20 @@ div.WordSection3
1902
1902
  mso-paper-source:0;}
1903
1903
  div.colophon
1904
1904
  {page:WordSection4;}
1905
+ @page WordSection5
1906
+ {size:595.3pt 841.9pt;
1907
+ margin:39.7pt 53.85pt 1.0cm 53.85pt;
1908
+ mso-header-margin:35.45pt;
1909
+ mso-footer-margin:14.2pt;
1910
+ mso-page-numbers:1;
1911
+ mso-columns:2 even 36.0pt;
1912
+ mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") eh2;
1913
+ mso-header:url("file:///C:/Doc/FILENAME_files/header.html") h2;
1914
+ mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html") f4;
1915
+ mso-footer:url("file:///C:/Doc/FILENAME_files/header.html") f4;
1916
+ mso-paper-source:0;}
1917
+ div.index
1918
+ {page:WordSection5;}
1905
1919
 
1906
1920
  /* List Definitions */
1907
1921
  @list l11
@@ -1457,6 +1457,22 @@ div.WordSection3 {
1457
1457
  div.colophon {
1458
1458
  page: WordSection4; }
1459
1459
 
1460
+ @page WordSection5 {
1461
+ size: 595.3pt 841.9pt;
1462
+ margin: 39.7pt 53.85pt 1.0cm 53.85pt;
1463
+ mso-header-margin: 35.45pt;
1464
+ mso-footer-margin: 14.2pt;
1465
+ mso-page-numbers: 1;
1466
+ mso-columns: 2 even 36.0pt;
1467
+ mso-even-header: url("file:///C:/Doc/FILENAME_files/header.html") eh2;
1468
+ mso-header: url("file:///C:/Doc/FILENAME_files/header.html") h2;
1469
+ mso-even-footer: url("file:///C:/Doc/FILENAME_files/header.html") f4;
1470
+ mso-footer: url("file:///C:/Doc/FILENAME_files/header.html") f4;
1471
+ mso-paper-source: 0; }
1472
+
1473
+ div.index {
1474
+ page: WordSection5; }
1475
+
1460
1476
  /* List Definitions */
1461
1477
  @list l0 {
1462
1478
  mso-list-id: 145051656;
@@ -1372,6 +1372,20 @@ div.WordSection3
1372
1372
  mso-paper-source:0;}
1373
1373
  div.colophon
1374
1374
  {page:WordSection4;}
1375
+ @page WordSection5
1376
+ {size:595.3pt 841.9pt;
1377
+ margin:39.7pt 53.85pt 1.0cm 53.85pt;
1378
+ mso-header-margin:35.45pt;
1379
+ mso-footer-margin:14.2pt;
1380
+ mso-page-numbers:1;
1381
+ mso-columns:2 even 36.0pt;
1382
+ mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") eh2;
1383
+ mso-header:url("file:///C:/Doc/FILENAME_files/header.html") h2;
1384
+ mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html") f4;
1385
+ mso-footer:url("file:///C:/Doc/FILENAME_files/header.html") f4;
1386
+ mso-paper-source:0;}
1387
+ div.index
1388
+ {page:WordSection5;}
1375
1389
 
1376
1390
  /* List Definitions */
1377
1391
  @list l0
@@ -80,6 +80,18 @@ module IsoDoc
80
80
  docxml
81
81
  end
82
82
 
83
+ def middle(isoxml, out)
84
+ middle_title(isoxml, out)
85
+ middle_admonitions(isoxml, out)
86
+ i = scope isoxml, out, 0
87
+ i = norm_ref isoxml, out, i
88
+ clause_etc isoxml, out, i
89
+ annex isoxml, out
90
+ bibliography isoxml, out
91
+ indexsect isoxml, out
92
+ end
93
+
94
+
83
95
  def html_toc1(ulist)
84
96
  u2 = nil
85
97
  ulist.xpath("./li").each do |l|