metanorma-un 0.9.0 → 0.9.1

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.
@@ -16,19 +16,25 @@ module IsoDoc
16
16
 
17
17
  def default_fonts(options)
18
18
  {
19
- bodyfont: (options[:script] == "Hans" ? '"Source Han Sans",serif' :
20
- '"Times New Roman",serif'),
21
- headerfont: (options[:script] == "Hans" ? '"Source Han Sans",sans-serif' :
22
- '"Times New Roman",serif'),
23
- monospacefont: '"Courier New",monospace',
24
- normalfontsize: "10.5pt",
25
- monospacefontsize: "10.0pt",
26
- smallerfontsize: "10.0pt",
27
- footnotefontsize: "9.0pt",
19
+ bodyfont: (if options[:script] == "Hans"
20
+ '"Source Han Sans",serif'
21
+ else
22
+ '"Times New Roman",serif'
23
+ end),
24
+ headerfont: (if options[:script] == "Hans"
25
+ '"Source Han Sans",sans-serif'
26
+ else
27
+ '"Times New Roman",serif'
28
+ end),
29
+ monospacefont: '"Courier New",monospace',
30
+ normalfontsize: "10.5pt",
31
+ monospacefontsize: "10.0pt",
32
+ smallerfontsize: "10.0pt",
33
+ footnotefontsize: "9.0pt",
28
34
  }
29
35
  end
30
36
 
31
- def default_file_locations(options)
37
+ def default_file_locations(_options)
32
38
  {
33
39
  wordstylesheet: html_doc_path("wordstyle.scss"),
34
40
  standardstylesheet: html_doc_path("unece.scss"),
@@ -40,11 +46,11 @@ module IsoDoc
40
46
  }
41
47
  end
42
48
 
43
- def footnotes(div)
49
+ def footnotes(_div)
44
50
  if @meta.get[:item_footnote]
45
51
  fn = noko do |xml|
46
- xml.aside **{ id: "ftnitem" } do |div|
47
- div.p @meta.get[:item_footnote]
52
+ xml.aside **{ id: "ftnitem" } do |d|
53
+ d.p @meta.get[:item_footnote]
48
54
  end
49
55
  end.join("\n")
50
56
  @footnotes.unshift fn
@@ -77,18 +83,18 @@ module IsoDoc
77
83
  introduction docxml, div2
78
84
  preface docxml, div2
79
85
  acknowledgements docxml, div2
80
- div2.p { |p| p << "&nbsp;" } # placeholder
86
+ div2.p { |p| p << "&#xa0;" } # placeholder
81
87
  end
82
88
  section_break(body)
83
89
  end
84
90
 
85
91
  ENDLINE = <<~END.freeze
86
- <v:line
87
- alt="" style='position:absolute;left:0;text-align:left;z-index:251662848;
88
- mso-wrap-edited:f;mso-width-percent:0;mso-height-percent:0;
89
- mso-width-percent:0;mso-height-percent:0'
90
- from="6.375cm,20.95pt" to="10.625cm,20.95pt"
91
- strokeweight="1.5pt"/>
92
+ <v:line
93
+ alt="" style='position:absolute;left:0;text-align:left;z-index:251662848;
94
+ mso-wrap-edited:f;mso-width-percent:0;mso-height-percent:0;
95
+ mso-width-percent:0;mso-height-percent:0'
96
+ from="6.375cm,20.95pt" to="10.625cm,20.95pt"
97
+ strokeweight="1.5pt"/>
92
98
  END
93
99
 
94
100
  def end_line(_isoxml, out)
@@ -138,7 +144,7 @@ module IsoDoc
138
144
  abstract.parent = (abstractbox || preface_container) if abstract &&
139
145
  (abstractbox || preface_container)
140
146
  abstractbox and abstract&.xpath(".//p/br")&.each do |a|
141
- a.parent.remove if /page-break-before:always/.match(a["style"])
147
+ a.parent.remove if /page-break-before:always/.match?(a["style"])
142
148
  end
143
149
  docxml&.at("//p[@class = 'AbstractTitle']")&.remove if abstractbox
144
150
  foreword.parent = preface_container if foreword && preface_container
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module UN
3
- VERSION = "0.9.0".freeze
3
+ VERSION = "0.9.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-un
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-09 00:00:00.000000000 Z
11
+ date: 2022-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639