metanorma-iso 2.9.0 → 2.9.2

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: '0941432979465638a050af9a47a277a037c98bcf7ac8fd8dc6f5cdf55fe0f92b'
4
- data.tar.gz: 628a80940efddab2c8659dae8aa140839f1b7eb2e4c662a9757410e0048c3e23
3
+ metadata.gz: d8cce2da59aa8b9dc9110813d8705c46804317af51f1d1ac3c7c9feeaefce0ee
4
+ data.tar.gz: 421cc96a3f66326d521a543a8e42e62b7e5b1db5180aceb0bd45ff94eceea917
5
5
  SHA512:
6
- metadata.gz: 322cbf882d1fb24c13c8263ce74d2d1d851763df54a2e27dc864657dbce0d47adf08537420aabb89eb3632ed1e476463e583fd9e52117072e0cf88a95fe666e2
7
- data.tar.gz: 9eaa31b78ccfa61cb66a3352493dfcf38e36584a3ef960f7782dab497f77bccfdd750bddf2fbe96f23ac34907c530eced9ec30cd8a999eba08e5f07e964acf34
6
+ metadata.gz: 7323f3b08a9de3a3d27dc57847c09baa2e2c418a3db00d36ad232ab9235b5e0cae6a9fffb4663d36c497c1677ee0f455cd718516c195c45cd54da81ca3407ffd
7
+ data.tar.gz: eca0875e427fc33eb671a59a659f544c2af89699024c622192f8250b7197026c33c7fc696f16ed7e59753abe844a82ddb7cae9b08e056bdc28634d9ae4404442
@@ -29,35 +29,34 @@ module IsoDoc
29
29
  end
30
30
  end
31
31
 
32
+ def example_p_class
33
+ nil
34
+ end
35
+
32
36
  def example_p_parse(node, div)
33
- div.p do |p|
34
- example_span_label(node, p, node&.at(ns("./name"))&.remove)
35
- insert_tab(p, 1)
36
- node.first_element_child.children.each { |n| parse(n, p) }
37
+ name = node.at(ns("./fmt-name"))
38
+ para = node.at(ns("./p"))
39
+ div.p **attr_code(class: example_p_class) do |p|
40
+ name and p.span class: "example_label" do |s|
41
+ name.children.each { |n| parse(n, s) }
42
+ end
43
+ insert_tab(p, 1) # TODO to Presentation XML
44
+ children_parse(para, p)
37
45
  end
38
- node.element_children[1..].each { |n| parse(n, div) }
46
+ para.xpath("./following-sibling::*").each { |n| parse(n, div) }
39
47
  end
40
48
 
41
49
  def example_parse1(node, div)
42
50
  div.p do |p|
43
- example_span_label(node, p, node.at(ns("./name")))
51
+ example_span_label(node, p, node.at(ns("./fmt-name")))
44
52
  insert_tab(p, 1)
45
53
  end
46
- node.children.each { |n| parse(n, div) unless n.name == "name" }
47
- end
48
-
49
- def node_begins_with_para(node)
50
- node.elements.each do |e|
51
- e.name == "name" and next
52
- e.name == "p" and return true
53
- return false
54
- end
55
- false
54
+ node.children.each { |n| parse(n, div) unless n.name == "fmt-name" }
56
55
  end
57
56
 
58
57
  def example_parse(node, out)
59
58
  out.div id: node["id"], class: "example" do |div|
60
- if node_begins_with_para(node)
59
+ if starts_with_para?(node)
61
60
  example_p_parse(node, div)
62
61
  else
63
62
  example_parse1(node, div)
@@ -88,6 +87,7 @@ module IsoDoc
88
87
  admonition_name_in_first_para(node, div)
89
88
  end
90
89
 
90
+ # TODO: To Presentation XML
91
91
  def admonition_name_para_delim(para)
92
92
  para << " "
93
93
  end
@@ -114,9 +114,9 @@ module IsoDoc
114
114
  class: clause.name == "definitions" ? "Symbols" : nil,
115
115
  ) do |div|
116
116
  num = num + 1
117
- clause_name(clause, clause&.at(ns("./title")), div, nil)
117
+ clause_name(clause, clause&.at(ns("./fmt-title")), div, nil)
118
118
  clause.elements.each do |e|
119
- parse(e, div) unless %w{title source}.include? e.name
119
+ parse(e, div) unless %w{fmt-title source}.include? e.name
120
120
  end
121
121
  end
122
122
  end
@@ -149,9 +149,9 @@ module IsoDoc
149
149
  out.div **figure_attrs(node) do |div|
150
150
  node.children.each do |n|
151
151
  n.name == "note" && n["type"] == "units" and next
152
- parse(n, div) unless n.name == "name"
152
+ parse(n, div) unless n.name == "fmt-name"
153
153
  end
154
- figure_name_parse(node, div, node.at(ns("./name")))
154
+ figure_name_parse(node, div, node.at(ns("./fmt-name")))
155
155
  end
156
156
  end
157
157
 
@@ -178,6 +178,12 @@ module IsoDoc
178
178
  super
179
179
  update_i18n(docxml)
180
180
  end
181
+
182
+ def span_parse(node, out)
183
+ node["class"] == "fmt-obligation" and
184
+ node["class"] = "obligation"
185
+ super
186
+ end
181
187
  end
182
188
  end
183
189
  end
@@ -4489,6 +4489,6 @@ div.Note table.dl {
4489
4489
  font-size: {{smallerfontsize}};
4490
4490
  margin-left: 1.0cm; }
4491
4491
 
4492
- td.example_label, td.note_label {
4492
+ td.example_label, td.note_label, td.termnote_label {
4493
4493
  font-size: {{smallerfontsize}};
4494
4494
  font-family: {{bodyfont}}; }
@@ -4314,7 +4314,7 @@ div.Note table.dl {
4314
4314
  margin-left: 1.0cm;
4315
4315
  }
4316
4316
 
4317
- td.example_label, td.note_label
4317
+ td.example_label, td.note_label, td.termnote_label
4318
4318
  {
4319
4319
  font-size: $smallerfontsize;
4320
4320
  font-family:$bodyfont;
@@ -1341,6 +1341,6 @@ div.Note table.dl {
1341
1341
  font-size: {{smallerfontsize}};
1342
1342
  margin-left: 1.0cm; }
1343
1343
 
1344
- span.note_label, span.example_label, td.example_label, td.note_label {
1344
+ span.note_label, span.example_label, td.example_label, td.note_label, span.termnote_label, td.termnote_label {
1345
1345
  font-size: {{smallerfontsize}};
1346
1346
  font-family: {{bodyfont}}; }
@@ -1307,7 +1307,7 @@ div.Note table.dl {
1307
1307
  margin-left: 1.0cm;
1308
1308
  }
1309
1309
 
1310
- span.note_label, span.example_label, td.example_label, td.note_label
1310
+ span.note_label, span.example_label, td.example_label, td.note_label, span.termnote_label, td.termnote_label
1311
1311
  {
1312
1312
  font-size: $smallerfontsize;
1313
1313
  font-family:$bodyfont;