metanorma-itu 1.0.14 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/macos.yml +8 -0
  3. data/.github/workflows/ubuntu.yml +10 -0
  4. data/.github/workflows/windows.yml +8 -0
  5. data/lib/asciidoctor/itu/biblio.rng +36 -6
  6. data/lib/asciidoctor/itu/cleanup.rb +15 -8
  7. data/lib/asciidoctor/itu/converter.rb +18 -27
  8. data/lib/asciidoctor/itu/front.rb +25 -0
  9. data/lib/asciidoctor/itu/isodoc.rng +450 -4
  10. data/lib/asciidoctor/itu/reqt.rng +23 -0
  11. data/lib/isodoc/itu.rb +1 -0
  12. data/lib/isodoc/itu/base_convert.rb +71 -17
  13. data/lib/isodoc/itu/html/_coverpage.scss +7 -3
  14. data/lib/isodoc/itu/html/html_itu_titlepage.html +4 -5
  15. data/lib/isodoc/itu/html/htmlstyle.scss +9 -5
  16. data/lib/isodoc/itu/html/itu.scss +27 -0
  17. data/lib/isodoc/itu/html/scripts.html +10 -7
  18. data/lib/isodoc/itu/html/word_itu_intro.html +11 -1
  19. data/lib/isodoc/itu/html/word_itu_titlepage.html +1 -4
  20. data/lib/isodoc/itu/html/wordstyle.scss +6 -5
  21. data/lib/isodoc/itu/html_convert.rb +3 -3
  22. data/lib/isodoc/itu/i18n-en.yaml +2 -1
  23. data/lib/isodoc/itu/itu.recommendation-annex.xsl +4358 -0
  24. data/lib/isodoc/itu/itu.recommendation.xsl +1354 -447
  25. data/lib/isodoc/itu/itu.resolution.xsl +1354 -447
  26. data/lib/isodoc/itu/metadata.rb +16 -6
  27. data/lib/isodoc/itu/pdf_convert.rb +6 -12
  28. data/lib/isodoc/itu/presentation_xml_convert.rb +10 -0
  29. data/lib/isodoc/itu/ref.rb +45 -23
  30. data/lib/isodoc/itu/terms.rb +9 -22
  31. data/lib/isodoc/itu/word_convert.rb +10 -8
  32. data/lib/isodoc/itu/xref.rb +56 -21
  33. data/lib/metanorma/itu/processor.rb +12 -6
  34. data/lib/metanorma/itu/version.rb +1 -1
  35. data/metanorma-itu.gemspec +2 -2
  36. metadata +12 -12
  37. data/lib/isodoc/itu/html/scripts.pdf.html +0 -72
@@ -2,8 +2,12 @@ require "metanorma/processor"
2
2
 
3
3
  module Metanorma
4
4
  module ITU
5
- def self.pdf_fonts
6
- ["Arial", "Courier", "Times New Roman"]
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
+ }
7
11
  end
8
12
 
9
13
  class Processor < Metanorma::Processor
@@ -30,14 +34,16 @@ module Metanorma
30
34
  Metanorma::Input::Asciidoc.new.process(file, filename, @asciidoctor_backend)
31
35
  end
32
36
 
33
- def output(isodoc_node, outname, format, options={})
37
+ def output(isodoc_node, inname, outname, format, options={})
34
38
  case format
35
39
  when :html
36
- IsoDoc::ITU::HtmlConvert.new(options).convert(outname, isodoc_node)
40
+ IsoDoc::ITU::HtmlConvert.new(options).convert(inname, isodoc_node, nil, outname)
37
41
  when :doc
38
- IsoDoc::ITU::WordConvert.new(options).convert(outname, isodoc_node)
42
+ IsoDoc::ITU::WordConvert.new(options).convert(inname, isodoc_node, nil, outname)
39
43
  when :pdf
40
- IsoDoc::ITU::PdfConvert.new(options).convert(outname, isodoc_node)
44
+ IsoDoc::ITU::PdfConvert.new(options).convert(inname, isodoc_node, nil, outname)
45
+ when :presentation
46
+ IsoDoc::ITU::PresentationXMLConvert.new(options).convert(inname, isodoc_node, nil, outname)
41
47
  else
42
48
  super
43
49
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ITU
3
- VERSION = "1.0.14"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -26,8 +26,8 @@ Gem::Specification.new do |spec|
26
26
 
27
27
  spec.add_dependency "htmlentities", "~> 4.3.4"
28
28
  spec.add_dependency "ruby-jing"
29
- spec.add_dependency "metanorma-standoc", "~> 1.3.0"
30
- spec.add_dependency "isodoc", "~> 1.0.0"
29
+ spec.add_dependency "metanorma-standoc", "~> 1.4.0"
30
+ spec.add_dependency "isodoc", "~> 1.1.0"
31
31
 
32
32
  spec.add_development_dependency "byebug", "~> 9.1"
33
33
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
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.0.14
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-01 00:00:00.000000000 Z
11
+ date: 2020-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.3.0
47
+ version: 1.4.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.3.0
54
+ version: 1.4.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: isodoc
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.0.0
61
+ version: 1.1.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.0.0
68
+ version: 1.1.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: byebug
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -269,16 +269,17 @@ files:
269
269
  - lib/isodoc/itu/html/itu.scss
270
270
  - lib/isodoc/itu/html/logo.png
271
271
  - lib/isodoc/itu/html/scripts.html
272
- - lib/isodoc/itu/html/scripts.pdf.html
273
272
  - lib/isodoc/itu/html/word_itu_intro.html
274
273
  - lib/isodoc/itu/html/word_itu_titlepage.html
275
274
  - lib/isodoc/itu/html/wordstyle.scss
276
275
  - lib/isodoc/itu/html_convert.rb
277
276
  - lib/isodoc/itu/i18n-en.yaml
277
+ - lib/isodoc/itu/itu.recommendation-annex.xsl
278
278
  - lib/isodoc/itu/itu.recommendation.xsl
279
279
  - lib/isodoc/itu/itu.resolution.xsl
280
280
  - lib/isodoc/itu/metadata.rb
281
281
  - lib/isodoc/itu/pdf_convert.rb
282
+ - lib/isodoc/itu/presentation_xml_convert.rb
282
283
  - lib/isodoc/itu/ref.rb
283
284
  - lib/isodoc/itu/terms.rb
284
285
  - lib/isodoc/itu/word_convert.rb
@@ -292,7 +293,7 @@ homepage: https://github.com/metanorma/metanorma-itu
292
293
  licenses:
293
294
  - BSD-2-Clause
294
295
  metadata: {}
295
- post_install_message:
296
+ post_install_message:
296
297
  rdoc_options: []
297
298
  require_paths:
298
299
  - lib
@@ -307,9 +308,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
307
308
  - !ruby/object:Gem::Version
308
309
  version: '0'
309
310
  requirements: []
310
- rubyforge_project:
311
- rubygems_version: 2.7.6
312
- signing_key:
311
+ rubygems_version: 3.0.3
312
+ signing_key:
313
313
  specification_version: 4
314
314
  summary: Metanorma for the ITU
315
315
  test_files: []
@@ -1,72 +0,0 @@
1
- <script>
2
- //TOC generation
3
- $('#toc').toc({
4
- 'selectors': toclevel(), //elements to use as headings
5
- 'container': 'main', //element to find all selectors in
6
- 'smoothScrolling': true, //enable or disable smooth scrolling on click
7
- 'prefix': 'toc', //prefix for anchor tags and class names
8
- 'onHighlight': function(el) {}, //called when a new section is highlighted
9
- 'highlightOnScroll': false, //add class to heading that is currently in focus
10
- 'highlightOffset': 100, //offset to trigger the next headline
11
- 'anchorName': function(i, heading, prefix) { //custom function for anchor name
12
- return prefix+i;
13
- },
14
- 'headerText': function(i, heading, $heading) { //custom function building the header-item text
15
- return $heading.text();
16
- },
17
- 'itemClass': function(i, heading, $heading, prefix) { // custom function for item class
18
- return $heading[0].tagName.toLowerCase();
19
- }
20
- });
21
-
22
- </script>
23
-
24
- <script>
25
- //TOC toggle animation
26
- $('#toggle').on('click', function(){
27
- if( $('nav').is(':visible') ) {
28
- $('nav').animate({ 'left': '-353px' }, 'slow', function(){
29
- $('nav').hide();
30
- });
31
- $('.container').animate({ 'padding-left': '31px' }, 'slow');
32
- }
33
- else {
34
- $('nav').show();
35
- $('nav').animate({ 'left': '0px' }, 'slow');
36
- $('.container').animate({ 'padding-left': '360px' }, 'slow');
37
- }
38
- });
39
- </script>
40
-
41
- <script>
42
- // Scroll to top button
43
- window.onscroll = function() {scrollFunction()};
44
-
45
- function scrollFunction() {
46
- if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
47
- document.getElementById("myBtn").style.display = "block";
48
- } else {
49
- document.getElementById("myBtn").style.display = "none";
50
- }
51
- }
52
-
53
- // When the user clicks on the button, scroll to the top of the document
54
- function topFunction() {
55
- document.body.scrollTop = 0;
56
- document.documentElement.scrollTop = 0;
57
- }
58
- </script>
59
-
60
- <script>
61
- /*
62
- $(document).ready(function() {
63
- $('[id^=toc]').each(function ()
64
- {
65
- var currentToc = $(this);
66
- var url = window.location.href;
67
- currentToc.wrap("<a href='" + url + "#" + currentToc.attr("id") + "' </a>");
68
- });
69
- });
70
- */
71
- </script>
72
-