metanorma-itu 1.2.7 → 1.2.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -83,6 +83,8 @@ module IsoDoc
83
83
  def docid(isoxml, _out)
84
84
  dn = isoxml.at(ns("//bibdata/docidentifier[@type = 'ITU']"))
85
85
  set(:docnumber, dn&.text)
86
+ dn = isoxml.at(ns("//bibdata/docidentifier[@type = 'ITU-Recommendation']"))
87
+ dn and set(:recommendationnumber, dn&.text)
86
88
  dn = isoxml.at(ns("//bibdata/ext/structuredidentifier/annexid"))
87
89
  oblig = isoxml&.at(ns("//annex/@obligation"))&.text
88
90
  lbl = oblig == "informative" ? @labels["appendix"] : @labels["annex"]
@@ -16,6 +16,8 @@ module IsoDoc
16
16
  case doctype = docxml&.at(ns("//bibdata/ext/doctype"))&.text
17
17
  when "resolution" then "itu.resolution.xsl"
18
18
  when "recommendation-annex" then "itu.recommendation-annex.xsl"
19
+ when "technical-report" then "itu.technical-report.xsl"
20
+ when "technical-paper" then "itu.technical-paper.xsl"
19
21
  else
20
22
  "itu.recommendation.xsl"
21
23
  end
@@ -5,19 +5,6 @@ require "fileutils"
5
5
  module IsoDoc
6
6
  module ITU
7
7
  module BaseConvert
8
- =begin
9
- def norm_ref(isoxml, out, num)
10
- q = "//bibliography/references[@normative = 'true']"
11
- f = isoxml.at(ns(q)) or return num
12
- out.div do |div|
13
- num = num + 1
14
- clause_name(num, f.at(ns("./title")), div, nil)
15
- biblio_list(f, div, false)
16
- end
17
- num
18
- end
19
- =end
20
-
21
8
  def nonstd_bibitem(list, b, ordinal, biblio)
22
9
  list.tr **attr_code(iso_bibitem_entry_attrs(b, biblio)) do |ref|
23
10
  id = render_identifier(bibitem_ref_code(b))
@@ -55,14 +55,17 @@ module IsoDoc
55
55
  historybox = docxml.at("//div[@id='historybox']")
56
56
  sourcebox = docxml.at("//div[@id='sourcebox']")
57
57
  keywordsbox = docxml.at("//div[@id='keywordsbox']")
58
+ changelogbox = docxml.at("//div[@id='change_logbox']")
58
59
  abstract = docxml.at("//div[@class = 'Abstract']")
59
60
  history = docxml.at("//div[@class = 'history']")
60
61
  source = docxml.at("//div[@class = 'source']")
61
- keywords = docxml.at("//div[@class = 'Keywords']")
62
+ keywords = docxml.at("//div[@class = 'Keyword']")
63
+ changelog = docxml.at("//div[@id = 'change_log']")
62
64
  abstract.parent = abstractbox if abstract && abstractbox
63
65
  history.parent = historybox if history && historybox
64
66
  source.parent = sourcebox if source && sourcebox
65
67
  keywords.parent = keywordsbox if keywords && keywordsbox
68
+ changelog.parent = changelogbox if changelog && changelogbox
66
69
  end
67
70
 
68
71
  def toWord(result, filename, dir, header)
@@ -69,7 +69,12 @@ module IsoDoc
69
69
  '"Times New Roman",serif'),
70
70
  headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' :
71
71
  '"Times New Roman",serif'),
72
- monospacefont: '"Courier New",monospace' }
72
+ monospacefont: '"Courier New",monospace',
73
+ normalfontsize: "12.0pt",
74
+ footnotefontsize: "11.0pt",
75
+ smallerfontsize: "11.0pt",
76
+ monospacefontsize: "10.0pt",
77
+ }
73
78
  end
74
79
 
75
80
  def default_file_locations(options)
@@ -0,0 +1,4 @@
1
+ ---
2
+ Arial:
3
+ Courier New:
4
+ Times New Roman:
@@ -2,14 +2,6 @@ require "metanorma/processor"
2
2
 
3
3
  module Metanorma
4
4
  module ITU
5
- def self.fonts_used
6
- {
7
- html: ["Arial", "Courier New", "Times New Roman"],
8
- doc: ["Arial", "Courier New", "Times New Roman"],
9
- pdf: ["Arial", "Courier New", "Times New Roman"]
10
- }
11
- end
12
-
13
5
  class Processor < Metanorma::Processor
14
6
 
15
7
  def initialize
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ITU
3
- VERSION = "1.2.7"
3
+ VERSION = "1.2.8"
4
4
  end
5
5
  end
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.add_dependency "htmlentities", "~> 4.3.4"
28
28
  spec.add_dependency "ruby-jing"
29
29
  spec.add_dependency "metanorma-standoc", "~> 1.6.0"
30
- spec.add_dependency "isodoc", "~> 1.2.0"
30
+ spec.add_dependency "isodoc", "~> 1.3.0"
31
31
  spec.add_dependency "twitter_cldr"
32
32
  spec.add_dependency "tzinfo-data" # we need this for windows only
33
33
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-itu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.7
4
+ version: 1.2.8
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: 2020-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.2.0
61
+ version: 1.3.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.2.0
68
+ version: 1.3.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: twitter_cldr
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -322,6 +322,8 @@ files:
322
322
  - lib/isodoc/itu/itu.recommendation-annex.xsl
323
323
  - lib/isodoc/itu/itu.recommendation.xsl
324
324
  - lib/isodoc/itu/itu.resolution.xsl
325
+ - lib/isodoc/itu/itu.technical-paper.xsl
326
+ - lib/isodoc/itu/itu.technical-report.xsl
325
327
  - lib/isodoc/itu/metadata.rb
326
328
  - lib/isodoc/itu/pdf_convert.rb
327
329
  - lib/isodoc/itu/presentation_xml_convert.rb
@@ -332,6 +334,7 @@ files:
332
334
  - lib/isodoc/itu/xref.rb
333
335
  - lib/metanorma-itu.rb
334
336
  - lib/metanorma/itu.rb
337
+ - lib/metanorma/itu/fonts_manifest.yaml
335
338
  - lib/metanorma/itu/processor.rb
336
339
  - lib/metanorma/itu/version.rb
337
340
  - metanorma-itu.gemspec