metanorma-ogc 1.2.7 → 1.2.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +7 -5
  3. data/lib/asciidoctor/ogc/basicdoc.rng +52 -3
  4. data/lib/asciidoctor/ogc/converter.rb +0 -1
  5. data/lib/asciidoctor/ogc/isodoc.rng +51 -3
  6. data/lib/isodoc/ogc/base_convert.rb +2 -2
  7. data/lib/isodoc/ogc/html/htmlstyle.css +206 -206
  8. data/lib/isodoc/ogc/html/htmlstyle.scss +4 -4
  9. data/lib/isodoc/ogc/html/ogc.css +21 -21
  10. data/lib/isodoc/ogc/html/ogc.scss +21 -21
  11. data/lib/isodoc/ogc/html/ogc_wp.css +35 -35
  12. data/lib/isodoc/ogc/html/ogc_wp.scss +35 -35
  13. data/lib/isodoc/ogc/html/wordstyle.css +19 -19
  14. data/lib/isodoc/ogc/html/wordstyle.scss +19 -19
  15. data/lib/isodoc/ogc/html/wordstyle_wp.css +23 -23
  16. data/lib/isodoc/ogc/html/wordstyle_wp.scss +23 -23
  17. data/lib/isodoc/ogc/html_convert.rb +6 -3
  18. data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +263 -55
  19. data/lib/isodoc/ogc/ogc.best-practice.xsl +263 -55
  20. data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +263 -55
  21. data/lib/isodoc/ogc/ogc.community-practice.xsl +263 -55
  22. data/lib/isodoc/ogc/ogc.community-standard.xsl +263 -55
  23. data/lib/isodoc/ogc/ogc.discussion-paper.xsl +263 -55
  24. data/lib/isodoc/ogc/ogc.engineering-report.xsl +263 -55
  25. data/lib/isodoc/ogc/ogc.other.xsl +263 -55
  26. data/lib/isodoc/ogc/ogc.policy.xsl +263 -55
  27. data/lib/isodoc/ogc/ogc.reference-model.xsl +263 -55
  28. data/lib/isodoc/ogc/ogc.release-notes.xsl +263 -55
  29. data/lib/isodoc/ogc/ogc.standard.xsl +263 -55
  30. data/lib/isodoc/ogc/ogc.test-suite.xsl +263 -55
  31. data/lib/isodoc/ogc/ogc.user-guide.xsl +263 -55
  32. data/lib/isodoc/ogc/ogc.white-paper.xsl +255 -47
  33. data/lib/isodoc/ogc/presentation_xml_convert.rb +13 -0
  34. data/lib/isodoc/ogc/word_convert.rb +9 -5
  35. data/lib/isodoc/ogc/xref.rb +8 -4
  36. data/lib/metanorma/ogc.rb +7 -0
  37. data/lib/metanorma/ogc/processor.rb +16 -8
  38. data/lib/metanorma/ogc/version.rb +1 -1
  39. data/metanorma-ogc.gemspec +2 -2
  40. metadata +6 -6
@@ -148,6 +148,19 @@ module IsoDoc
148
148
  recommendation_to_table(docxml)
149
149
  end
150
150
 
151
+ def section(docxml)
152
+ super
153
+ references(docxml)
154
+ end
155
+
156
+ def references(docxml)
157
+ docxml.xpath(ns("//bibitem/date")).each do |d|
158
+ d.xpath(ns("./on | ./from | ./to")).each do |d1|
159
+ d1.children = d1.text.sub(/^(\d\d\d\d).*$/, "\\1")
160
+ end
161
+ end
162
+ end
163
+
151
164
  include Init
152
165
  end
153
166
  end
@@ -17,11 +17,13 @@ module IsoDoc
17
17
 
18
18
  def default_fonts(options)
19
19
  {
20
- bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' :
21
- '"Times New Roman",serif'),
22
- headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' :
23
- '"Times New Roman",serif'),
24
- monospacefont: '"Courier New",monospace'
20
+ bodyfont: '"Times New Roman",serif',
21
+ headerfont: '"Times New Roman",serif',
22
+ monospacefont: '"Courier New",monospace',
23
+ normalfontsize: "10.5pt",
24
+ monospacefontsize: "10.0pt",
25
+ footnotefontsize: "10.0pt",
26
+ smallerfontsize: "10.0pt",
25
27
  }
26
28
  end
27
29
 
@@ -47,6 +49,8 @@ module IsoDoc
47
49
  @doctype = "white-paper"
48
50
  options[:bodyfont] = '"Arial",sans-serif'
49
51
  options[:headerfont] = '"Lato",sans-serif'
52
+ options[:normalfontsize] = "11.0pt"
53
+ options[:footnotefontsize] = "11.0pt"
50
54
  end
51
55
  super
52
56
  end
@@ -1,5 +1,8 @@
1
1
  module IsoDoc
2
2
  module Ogc
3
+ class Counter < IsoDoc::XrefGen::Counter
4
+ end
5
+
3
6
  class Xref < IsoDoc::Xref
4
7
  def initialize(lang, script, klass, labels, options)
5
8
  @reqtlabels = {}
@@ -13,7 +16,7 @@ module IsoDoc
13
16
  FIRST_LVL_REQ = IsoDoc::XrefGen::Blocks::FIRST_LVL_REQ
14
17
 
15
18
  def sequential_permission_names(clause, klass, label)
16
- c = ::IsoDoc::XrefGen::Counter.new
19
+ c = Counter.new
17
20
  clause.xpath(ns(".//#{klass}#{FIRST_LVL_REQ}")).each do |t|
18
21
  next if t["id"].nil? || t["id"].empty?
19
22
  id = c.increment(t).print
@@ -49,7 +52,7 @@ module IsoDoc
49
52
  end
50
53
 
51
54
  def sequential_permission_names1(block, lbl, klass, label)
52
- c = ::IsoDoc::XrefGen::Counter.new
55
+ c = Counter.new
53
56
  block.xpath(ns("./#{klass}")).each do |t|
54
57
  next if t["id"].nil? || t["id"].empty?
55
58
  id = "#{lbl}#{hierfigsep}#{c.increment(t).print}"
@@ -90,7 +93,7 @@ module IsoDoc
90
93
  end
91
94
 
92
95
  def hierarchical_permission_names(clause, num, klass, label)
93
- c = ::IsoDoc::XrefGen::Counter.new
96
+ c = Counter.new
94
97
  clause.xpath(ns(".//#{klass}#{FIRST_LVL_REQ}")).each do |t|
95
98
  next if t["id"].nil? || t["id"].empty?
96
99
  lbl = "#{num}#{hiersep}#{c.increment(t).print}"
@@ -119,7 +122,8 @@ module IsoDoc
119
122
  sequential_asset_names(d.xpath(ns(
120
123
  "//preface/abstract | //foreword | //introduction | "\
121
124
  "//submitters | //acknowledgements | //preface/clause")))
122
- n = section_names(d.at(ns("//clause[@type = 'scope']")), 0, 1)
125
+ n = Counter.new
126
+ n = section_names(d.at(ns("//clause[@type = 'scope']")), n, 1)
123
127
  n = section_names(d.at(ns("//clause[@type = 'conformance']")), n, 1)
124
128
  n = section_names(d.at(ns(@klass.norm_ref_xpath)), n, 1)
125
129
  n = section_names(
@@ -3,6 +3,13 @@ require "metanorma/ogc/processor"
3
3
 
4
4
  module Metanorma
5
5
  module Ogc
6
+ def self.fonts_used
7
+ {
8
+ html: ["Overpass", "SpaceMono"],
9
+ doc: ["Times New Roman", "Cambria Math", "HanSans", "Courier New"],
10
+ pdf: ["Lato", "Arial"],
11
+ }
12
+ end
6
13
 
7
14
  ORGANIZATION_NAME_SHORT = "OGC"
8
15
  ORGANIZATION_NAME_LONG = "Open Geospatial Consortium"
@@ -2,14 +2,6 @@ require "metanorma/processor"
2
2
 
3
3
  module Metanorma
4
4
  module Ogc
5
- def self.fonts_used
6
- {
7
- doc: ["Arial", "Courier New", "Times New Roman"],
8
- pdf: ["Arial", "Courier New", "Times New Roman"],
9
- html: ["Overpass", "Space Mono"]
10
- }
11
- end
12
-
13
5
  class Processor < Metanorma::Processor
14
6
 
15
7
  def initialize
@@ -26,6 +18,22 @@ module Metanorma
26
18
  )
27
19
  end
28
20
 
21
+
22
+ def fonts_manifest
23
+ {
24
+ "Lato" => nil,
25
+ "Arial" => nil,
26
+ "STIX Two Math" => nil,
27
+ "Source Han Sans" => nil,
28
+ "Fira Code" => nil,
29
+ "Courier" => nil,
30
+ "Courier New" => nil,
31
+ "Times New Roman" => nil,
32
+ "Overpass" => nil,
33
+ "Space Mono" => nil,
34
+ }
35
+ end
36
+
29
37
  def version
30
38
  "Metanorma::Ogc #{Metanorma::Ogc::VERSION}"
31
39
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "1.2.7"
3
+ VERSION = "1.2.12"
4
4
  end
5
5
  end
@@ -24,8 +24,8 @@ Gem::Specification.new do |spec|
24
24
  spec.require_paths = ["lib"]
25
25
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
26
26
 
27
- spec.add_dependency "metanorma-standoc", "~> 1.6.0"
28
- spec.add_dependency "isodoc", "~> 1.2.0"
27
+ spec.add_dependency "metanorma-standoc", "~> 1.8.0"
28
+ spec.add_dependency "isodoc", "~> 1.5.0"
29
29
  spec.add_dependency "iso-639"
30
30
 
31
31
  spec.add_development_dependency "byebug", "~> 9.1"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ogc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.7
4
+ version: 1.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-09 00:00:00.000000000 Z
11
+ date: 2021-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.6.0
19
+ version: 1.8.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.6.0
26
+ version: 1.8.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: isodoc
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.2.0
33
+ version: 1.5.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.2.0
40
+ version: 1.5.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: iso-639
43
43
  requirement: !ruby/object:Gem::Requirement