metanorma-rsd 1.4.3 → 1.4.8
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.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +10 -10
- data/.github/workflows/ubuntu.yml +11 -11
- data/.github/workflows/windows.yml +11 -12
- data/README.adoc +5 -5
- data/lib/asciidoctor/rsd/biblio.rng +144 -49
- data/lib/asciidoctor/rsd/converter.rb +40 -7
- data/lib/asciidoctor/rsd/isodoc.rng +49 -5
- data/lib/isodoc/rsd/base_convert.rb +56 -0
- data/lib/isodoc/rsd/html/header.html +15 -15
- data/lib/isodoc/rsd/html/html_rsd_titlepage.html +1 -1
- data/lib/isodoc/rsd/html/htmlstyle.scss +6 -7
- data/lib/isodoc/rsd/html/logo.png +0 -0
- data/lib/isodoc/rsd/html/rsd.scss +57 -60
- data/lib/isodoc/rsd/html/scripts.html +14 -27
- data/lib/isodoc/rsd/html/word_rsd_intro.html +5 -5
- data/lib/isodoc/rsd/html/word_rsd_titlepage.html +69 -14
- data/lib/isodoc/rsd/html/wordstyle.scss +43 -30
- data/lib/isodoc/rsd/html_convert.rb +16 -8
- data/lib/isodoc/rsd/metadata.rb +2 -28
- data/lib/isodoc/rsd/pdf_convert.rb +16 -11
- data/lib/isodoc/rsd/rsd.standard.xsl +6642 -0
- data/lib/isodoc/rsd/word_convert.rb +15 -8
- data/lib/metanorma-rsd.rb +1 -0
- data/lib/metanorma/rsd.rb +2 -2
- data/lib/metanorma/rsd/processor.rb +3 -6
- data/lib/metanorma/rsd/version.rb +1 -1
- data/metanorma-rsd.gemspec +2 -2
- data/metanorma.yml +14 -1
- metadata +8 -7
- data/lib/asciidoctor/rsd/validate.rb +0 -22
- data/lib/isodoc/rsd/html/scripts.pdf.html +0 -72
| @@ -1,24 +1,31 @@ | |
| 1 1 | 
             
            require "isodoc"
         | 
| 2 | 
            -
            require "isodoc/ | 
| 2 | 
            +
            require "isodoc/generic/word_convert"
         | 
| 3 3 | 
             
            require "isodoc/rsd/metadata"
         | 
| 4 4 |  | 
| 5 5 | 
             
            module IsoDoc
         | 
| 6 6 | 
             
              module Rsd
         | 
| 7 7 | 
             
                # A {Converter} implementation that generates Word output, and a document
         | 
| 8 8 | 
             
                # schema encapsulation of the document for validation
         | 
| 9 | 
            -
                class WordConvert < IsoDoc:: | 
| 9 | 
            +
                class WordConvert < IsoDoc::Generic::WordConvert
         | 
| 10 10 | 
             
                  def configuration
         | 
| 11 11 | 
             
                    Metanorma::Rsd.configuration
         | 
| 12 12 | 
             
                  end
         | 
| 13 13 |  | 
| 14 | 
            -
                  def  | 
| 15 | 
            -
                     | 
| 14 | 
            +
                  def make_body2(body, docxml)
         | 
| 15 | 
            +
                    body.div **{ class: "WordSection2" } do |div2|
         | 
| 16 | 
            +
                      boilerplate docxml, div2
         | 
| 17 | 
            +
                      abstract docxml, div2
         | 
| 18 | 
            +
                      foreword docxml, div2
         | 
| 19 | 
            +
                      executivesummary docxml, div2
         | 
| 20 | 
            +
                      introduction docxml, div2
         | 
| 21 | 
            +
                      preface docxml, div2
         | 
| 22 | 
            +
                      acknowledgements docxml, div2
         | 
| 23 | 
            +
                      div2.p { |p| p << " " } # placeholder
         | 
| 24 | 
            +
                    end
         | 
| 25 | 
            +
                    section_break(body)
         | 
| 16 26 | 
             
                  end
         | 
| 17 27 |  | 
| 18 | 
            -
                   | 
| 19 | 
            -
                    @meta.security isoxml, out
         | 
| 20 | 
            -
                    super
         | 
| 21 | 
            -
                  end
         | 
| 28 | 
            +
                  include BaseConvert
         | 
| 22 29 | 
             
                end
         | 
| 23 30 | 
             
              end
         | 
| 24 31 | 
             
            end
         | 
    
        data/lib/metanorma-rsd.rb
    CHANGED
    
    | @@ -1,5 +1,6 @@ | |
| 1 1 | 
             
            require "asciidoctor" unless defined? Asciidoctor::Converter
         | 
| 2 2 | 
             
            require_relative "asciidoctor/rsd/converter"
         | 
| 3 | 
            +
            require_relative "isodoc/rsd/base_convert"
         | 
| 3 4 | 
             
            require_relative "isodoc/rsd/html_convert"
         | 
| 4 5 | 
             
            require_relative "isodoc/rsd/word_convert"
         | 
| 5 6 | 
             
            require_relative "isodoc/rsd/pdf_convert"
         | 
    
        data/lib/metanorma/rsd.rb
    CHANGED
    
    | @@ -1,11 +1,11 @@ | |
| 1 1 | 
             
            require "metanorma"
         | 
| 2 | 
            -
            require "metanorma- | 
| 2 | 
            +
            require "metanorma-generic"
         | 
| 3 3 | 
             
            require "metanorma/rsd/processor"
         | 
| 4 4 |  | 
| 5 5 | 
             
            module Metanorma
         | 
| 6 6 | 
             
              module Rsd
         | 
| 7 7 |  | 
| 8 | 
            -
                class Configuration < Metanorma:: | 
| 8 | 
            +
                class Configuration < Metanorma::Generic::Configuration
         | 
| 9 9 | 
             
                  def initialize(*args)
         | 
| 10 10 | 
             
                    super
         | 
| 11 11 | 
             
                  end
         | 
| @@ -2,12 +2,9 @@ require "metanorma/processor" | |
| 2 2 |  | 
| 3 3 | 
             
            module Metanorma
         | 
| 4 4 | 
             
              module Rsd
         | 
| 5 | 
            -
                class Processor < Metanorma::Processor
         | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 8 | 
            -
                    @short = :rsd
         | 
| 9 | 
            -
                    @input_format = :asciidoc
         | 
| 10 | 
            -
                    @asciidoctor_backend = :rsd
         | 
| 5 | 
            +
                class Processor < Metanorma::Generic::Processor
         | 
| 6 | 
            +
                  def configuration
         | 
| 7 | 
            +
                    Metanorma::Rsd.configuration
         | 
| 11 8 | 
             
                  end
         | 
| 12 9 |  | 
| 13 10 | 
             
                  def output_formats
         | 
    
        data/metanorma-rsd.gemspec
    CHANGED
    
    | @@ -30,9 +30,9 @@ Gem::Specification.new do |spec| | |
| 30 30 |  | 
| 31 31 | 
             
              spec.add_dependency "htmlentities", "~> 4.3.4"
         | 
| 32 32 | 
             
              #spec.add_dependency "nokogiri"
         | 
| 33 | 
            -
              spec.add_dependency "metanorma-standoc", "~> 1. | 
| 33 | 
            +
              spec.add_dependency "metanorma-standoc", "~> 1.4.0"
         | 
| 34 34 | 
             
              spec.add_dependency "isodoc", "~> 1.0.0"
         | 
| 35 | 
            -
              spec.add_dependency 'metanorma- | 
| 35 | 
            +
              spec.add_dependency 'metanorma-generic', '~> 1.4.0'
         | 
| 36 36 |  | 
| 37 37 | 
             
              spec.add_development_dependency "byebug", "~> 9.1"
         | 
| 38 38 | 
             
              spec.add_development_dependency "equivalent-xml", "~> 0.6"
         | 
    
        data/metanorma.yml
    CHANGED
    
    | @@ -1,12 +1,16 @@ | |
| 1 | 
            +
            metanorma_name: rsd
         | 
| 1 2 | 
             
            organization_name_short: Ribose
         | 
| 2 3 | 
             
            organization_name_long: Ribose
         | 
| 3 4 | 
             
            document_namespace: https://www.metanorma.org/ns/rsd
         | 
| 4 5 | 
             
            xml_root_tag: 'rsd-standard'
         | 
| 5 | 
            -
            logo_path: lib/isodoc/rsd/html/logo. | 
| 6 | 
            +
            logo_path: lib/isodoc/rsd/html/logo.png
         | 
| 6 7 | 
             
            validate_rng_file: lib/asciidoctor/rsd/rsd.rng
         | 
| 7 8 | 
             
            htmlcoverpage: lib/isodoc/rsd/html/html_rsd_titlepage.html
         | 
| 8 9 | 
             
            htmlintropage: lib/isodoc/rsd/html/html_rsd_intro.html
         | 
| 9 10 | 
             
            htmlstylesheet: lib/isodoc/rsd/html/htmlstyle.scss
         | 
| 11 | 
            +
            html_bodyfont: '"Source Sans Pro",sans-serif'
         | 
| 12 | 
            +
            html_headerfont: '"Source Sans Pro",sans-serif'
         | 
| 13 | 
            +
            html_monospacefont: '"Source Code Pro",monospace'
         | 
| 10 14 | 
             
            scripts: lib/isodoc/rsd/html/scripts.html
         | 
| 11 15 | 
             
            scripts_pdf: lib/isodoc/rsd/html/scripts.pdf.html
         | 
| 12 16 | 
             
            standardstylesheet: lib/isodoc/rsd/html/rsd.scss
         | 
| @@ -14,6 +18,9 @@ header: lib/isodoc/rsd/html/header.html | |
| 14 18 | 
             
            wordcoverpage: lib/isodoc/rsd/html/word_rsd_titlepage.html
         | 
| 15 19 | 
             
            wordintropage: lib/isodoc/rsd/html/word_rsd_intro.html
         | 
| 16 20 | 
             
            wordstylesheet: lib/isodoc/rsd/html/wordstyle.scss
         | 
| 21 | 
            +
            word_bodyfont: '"Source Sans Pro","Arial",sans-serif'
         | 
| 22 | 
            +
            word_headerfont: '"Source Sans Pro","Arial",sans-serif'
         | 
| 23 | 
            +
            word_monospacefont: '"Source Code Pro",monospace'
         | 
| 17 24 | 
             
            docid_template: "{{ docnumeric }}{% if stageabbr %}({{ stageabbr }}){%endif%}"
         | 
| 18 25 | 
             
            published_stages:
         | 
| 19 26 | 
             
              - published
         | 
| @@ -21,3 +28,9 @@ stage_abbreviations: | |
| 21 28 | 
             
              working-draft: wd
         | 
| 22 29 | 
             
              committee-draft: cd
         | 
| 23 30 | 
             
              draft-standard: d
         | 
| 31 | 
            +
            metadata_extensions:
         | 
| 32 | 
            +
             - security
         | 
| 33 | 
            +
             - recipient
         | 
| 34 | 
            +
            webfont:
         | 
| 35 | 
            +
              - "https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,600,600i&display=swap"
         | 
| 36 | 
            +
              - "https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,300;0,600;1,300;1,600&display=swap" 
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: metanorma-rsd
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.4. | 
| 4 | 
            +
              version: 1.4.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 | 
            +
            date: 2020-06-08 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: htmlentities
         | 
| @@ -30,14 +30,14 @@ dependencies: | |
| 30 30 | 
             
                requirements:
         | 
| 31 31 | 
             
                - - "~>"
         | 
| 32 32 | 
             
                  - !ruby/object:Gem::Version
         | 
| 33 | 
            -
                    version: 1. | 
| 33 | 
            +
                    version: 1.4.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. | 
| 40 | 
            +
                    version: 1.4.0
         | 
| 41 41 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 42 42 | 
             
              name: isodoc
         | 
| 43 43 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -53,7 +53,7 @@ dependencies: | |
| 53 53 | 
             
                  - !ruby/object:Gem::Version
         | 
| 54 54 | 
             
                    version: 1.0.0
         | 
| 55 55 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 56 | 
            -
              name: metanorma- | 
| 56 | 
            +
              name: metanorma-generic
         | 
| 57 57 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 58 58 | 
             
                requirements:
         | 
| 59 59 | 
             
                - - "~>"
         | 
| @@ -226,21 +226,22 @@ files: | |
| 226 226 | 
             
            - lib/asciidoctor/rsd/isodoc.rng
         | 
| 227 227 | 
             
            - lib/asciidoctor/rsd/reqt.rng
         | 
| 228 228 | 
             
            - lib/asciidoctor/rsd/rsd.rng
         | 
| 229 | 
            -
            - lib/ | 
| 229 | 
            +
            - lib/isodoc/rsd/base_convert.rb
         | 
| 230 230 | 
             
            - lib/isodoc/rsd/html/header.html
         | 
| 231 231 | 
             
            - lib/isodoc/rsd/html/html_rsd_intro.html
         | 
| 232 232 | 
             
            - lib/isodoc/rsd/html/html_rsd_titlepage.html
         | 
| 233 233 | 
             
            - lib/isodoc/rsd/html/htmlstyle.scss
         | 
| 234 | 
            +
            - lib/isodoc/rsd/html/logo.png
         | 
| 234 235 | 
             
            - lib/isodoc/rsd/html/logo.svg
         | 
| 235 236 | 
             
            - lib/isodoc/rsd/html/rsd.scss
         | 
| 236 237 | 
             
            - lib/isodoc/rsd/html/scripts.html
         | 
| 237 | 
            -
            - lib/isodoc/rsd/html/scripts.pdf.html
         | 
| 238 238 | 
             
            - lib/isodoc/rsd/html/word_rsd_intro.html
         | 
| 239 239 | 
             
            - lib/isodoc/rsd/html/word_rsd_titlepage.html
         | 
| 240 240 | 
             
            - lib/isodoc/rsd/html/wordstyle.scss
         | 
| 241 241 | 
             
            - lib/isodoc/rsd/html_convert.rb
         | 
| 242 242 | 
             
            - lib/isodoc/rsd/metadata.rb
         | 
| 243 243 | 
             
            - lib/isodoc/rsd/pdf_convert.rb
         | 
| 244 | 
            +
            - lib/isodoc/rsd/rsd.standard.xsl
         | 
| 244 245 | 
             
            - lib/isodoc/rsd/word_convert.rb
         | 
| 245 246 | 
             
            - lib/metanorma-rsd.rb
         | 
| 246 247 | 
             
            - lib/metanorma/rsd.rb
         | 
| @@ -1,22 +0,0 @@ | |
| 1 | 
            -
            module Asciidoctor
         | 
| 2 | 
            -
              module Rsd
         | 
| 3 | 
            -
                class Converter < Standoc::Converter
         | 
| 4 | 
            -
                  def content_validate(doc)
         | 
| 5 | 
            -
                    super
         | 
| 6 | 
            -
                    bibdata_validate(doc.root)
         | 
| 7 | 
            -
                  end
         | 
| 8 | 
            -
             | 
| 9 | 
            -
                  def bibdata_validate(doc)
         | 
| 10 | 
            -
                    stage_validate(doc)
         | 
| 11 | 
            -
                  end
         | 
| 12 | 
            -
             | 
| 13 | 
            -
                  def stage_validate(xmldoc)
         | 
| 14 | 
            -
                    stage = xmldoc&.at("//bibdata/status/stage")&.text
         | 
| 15 | 
            -
                    %w(proposal working-draft committee-draft draft-standard final-draft
         | 
| 16 | 
            -
                    published withdrawn).include? stage or
         | 
| 17 | 
            -
                    @log.add("Document Attributes", nil, "#{stage} is not a recognised status")
         | 
| 18 | 
            -
                  end
         | 
| 19 | 
            -
                end
         | 
| 20 | 
            -
              end
         | 
| 21 | 
            -
            end
         | 
| 22 | 
            -
             | 
| @@ -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 | 
            -
             |