metanorma-gb 1.1.2 → 1.1.3

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: bcfcbd68294d7ee29096d3e154044ce82839b7a5166e769dfc348ed3d3e1cbdd
4
- data.tar.gz: cfe3e79b23c285fecbe5325f3c9620a8a6b71207dd9f99e7a6737a06b5dd3fb7
3
+ metadata.gz: 855b2e263e1e3ce0fd6b01c5a957258d946d32ca4c8c82e1063273623238c91d
4
+ data.tar.gz: 4b89c14b7a504a6152865aadf223fea4652d93ff3da642b8a61e84586d206ef5
5
5
  SHA512:
6
- metadata.gz: 7a528a9350b513dadac7739975ed4133f20dcf33b081abf1e73e7739262c983d238353f5f342afda75571bc5b14cca17308afe5f35e8f92976a5a79b744f5029
7
- data.tar.gz: 904ee8bcb56e70dacbb543c9834785a1719f2be931618d08e746acaddffa7a13476a88f0d7d82a6b3fc4626da08b3aba935f3a84452ee850853dac2e93fa6d4c
6
+ metadata.gz: 42276795f4c0f2899699b7a2eab5ca2d5d1357d4808c485ce35d04538becc1c6d2fb7d2b53e91a9a8a470726f069c4c690287345cfbdfa5dd657dfa31f71f8b6
7
+ data.tar.gz: 567eb01aa9b26dce3ad5ad3b431429e5a2ee069f628825aab3f5a38e7f2ac904df66beaca28ef8ff6623369b688b24c8eecef362daa5ed46f5162d33bd4024ea
@@ -197,6 +197,37 @@ module IsoDoc
197
197
  @anchors[ref["id"]] = { xref: reference }
198
198
  end
199
199
  =end
200
+
201
+ def example_p_parse(node, div)
202
+ div.p do |p|
203
+ p.span **{ class: "example_label" } do |s|
204
+ s << example_label(node)
205
+ end
206
+ insert_tab(p, 1)
207
+ node.first_element_child.children.each { |n| parse(n, p) }
208
+ end
209
+ node.element_children[1..-1].each { |n| parse(n, div) }
210
+ end
211
+
212
+ def example_parse1(node, div)
213
+ div.p do |p|
214
+ p.span **{ class: "example_label" } do |s|
215
+ s << example_label(node)
216
+ end
217
+ insert_tab(p, 1)
218
+ end
219
+ node.children.each { |n| parse(n, div) }
220
+ end
221
+
222
+ def example_parse(node, out)
223
+ out.div **{ id: node["id"], class: "example" } do |div|
224
+ if node.first_element_child.name == "p"
225
+ example_p_parse(node, div)
226
+ else
227
+ example_parse1(node, div)
228
+ end
229
+ end
230
+ end
200
231
  end
201
232
  end
202
233
  end
@@ -39,7 +39,7 @@ module IsoDoc
39
39
  { valign: "top", class: "example_label",
40
40
  style: "padding:2pt 2pt 2pt 2pt" }.freeze
41
41
 
42
- def example_parse(node, out)
42
+ def example_table_parse(node, out)
43
43
  out.table **attr_code(id: node["id"], class: "example") do |t|
44
44
  t.tr do |tr|
45
45
  tr.td **EXAMPLE_TBL_ATTR do |td|
@@ -52,6 +52,10 @@ module IsoDoc
52
52
  end
53
53
  end
54
54
 
55
+ def example_label(node)
56
+ l10n(super + ":")
57
+ end
58
+
55
59
  def note_parse(node, out)
56
60
  @note = true
57
61
  out.table **attr_code(id: node["id"], class: "Note") do |t|
@@ -202,6 +206,37 @@ module IsoDoc
202
206
  @anchors[ref["id"]] = { xref: reference }
203
207
  end
204
208
  =end
209
+
210
+ def example_p_parse(node, div)
211
+ div.p do |p|
212
+ p.span **{ class: "example_label" } do |s|
213
+ s << example_label(node)
214
+ end
215
+ insert_tab(p, 1)
216
+ node.first_element_child.children.each { |n| parse(n, p) }
217
+ end
218
+ node.element_children[1..-1].each { |n| parse(n, div) }
219
+ end
220
+
221
+ def example_parse1(node, div)
222
+ div.p do |p|
223
+ p.span **{ class: "example_label" } do |s|
224
+ s << example_label(node)
225
+ end
226
+ insert_tab(p, 1)
227
+ end
228
+ node.children.each { |n| parse(n, div) }
229
+ end
230
+
231
+ def example_parse(node, out)
232
+ out.div **{ id: node["id"], class: "example" } do |div|
233
+ if node.first_element_child.name == "p"
234
+ example_p_parse(node, div)
235
+ else
236
+ example_parse1(node, div)
237
+ end
238
+ end
239
+ end
205
240
  end
206
241
  end
207
242
  end
@@ -491,6 +491,7 @@ p.example, li.example, div.example, td.example
491
491
  margin-bottom:.0001pt;
492
492
  text-align:justify;
493
493
  text-justify:inter-ideograph;
494
+ tab-stops:20.15pt;
494
495
  /* text-indent:18.15pt;
495
496
  mso-list:l2 level1 lfo1; */
496
497
  mso-pagination:none;
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Gb
3
- VERSION = "1.1.2"
3
+ VERSION = "1.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-gb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-25 00:00:00.000000000 Z
11
+ date: 2019-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-iso