metanorma-rsd 1.4.2 → 1.4.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,24 +1,31 @@
1
1
  require "isodoc"
2
- require "isodoc/acme/word_convert"
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::Acme::WordConvert
9
+ class WordConvert < IsoDoc::Generic::WordConvert
10
10
  def configuration
11
11
  Metanorma::Rsd.configuration
12
12
  end
13
13
 
14
- def metadata_init(lang, script, labels)
15
- @meta = Metadata.new(lang, script, labels)
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 << "&nbsp;" } # placeholder
24
+ end
25
+ section_break(body)
16
26
  end
17
27
 
18
- def info(isoxml, out)
19
- @meta.security isoxml, out
20
- super
21
- end
28
+ include BaseConvert
22
29
  end
23
30
  end
24
31
  end
@@ -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"
@@ -1,11 +1,11 @@
1
1
  require "metanorma"
2
- require "metanorma-acme"
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::Acme::Configuration
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
- def initialize
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
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Rsd
3
- VERSION = "1.4.2"
3
+ VERSION = "1.4.7"
4
4
  end
5
5
  end
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
32
32
  #spec.add_dependency "nokogiri"
33
33
  spec.add_dependency "metanorma-standoc", "~> 1.3.0"
34
34
  spec.add_dependency "isodoc", "~> 1.0.0"
35
- spec.add_dependency 'metanorma-acme', '~> 1.4.0'
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"
@@ -43,5 +43,4 @@ Gem::Specification.new do |spec|
43
43
  spec.add_development_dependency "rubocop", "= 0.54.0"
44
44
  spec.add_development_dependency "simplecov", "~> 0.15"
45
45
  spec.add_development_dependency "timecop", "~> 0.9"
46
- spec.add_development_dependency "metanorma", "~> 0.3.0"
47
46
  end
@@ -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.svg
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.2
4
+ version: 1.4.7
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-03-05 00:00:00.000000000 Z
11
+ date: 2020-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -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-acme
56
+ name: metanorma-generic
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
@@ -192,20 +192,6 @@ dependencies:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0.9'
195
- - !ruby/object:Gem::Dependency
196
- name: metanorma
197
- requirement: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - "~>"
200
- - !ruby/object:Gem::Version
201
- version: 0.3.0
202
- type: :development
203
- prerelease: false
204
- version_requirements: !ruby/object:Gem::Requirement
205
- requirements:
206
- - - "~>"
207
- - !ruby/object:Gem::Version
208
- version: 0.3.0
209
195
  description: |
210
196
  metanorma-rsd lets you write RSD in AsciiDoc syntax.
211
197
 
@@ -240,21 +226,22 @@ files:
240
226
  - lib/asciidoctor/rsd/isodoc.rng
241
227
  - lib/asciidoctor/rsd/reqt.rng
242
228
  - lib/asciidoctor/rsd/rsd.rng
243
- - lib/asciidoctor/rsd/validate.rb
229
+ - lib/isodoc/rsd/base_convert.rb
244
230
  - lib/isodoc/rsd/html/header.html
245
231
  - lib/isodoc/rsd/html/html_rsd_intro.html
246
232
  - lib/isodoc/rsd/html/html_rsd_titlepage.html
247
233
  - lib/isodoc/rsd/html/htmlstyle.scss
234
+ - lib/isodoc/rsd/html/logo.png
248
235
  - lib/isodoc/rsd/html/logo.svg
249
236
  - lib/isodoc/rsd/html/rsd.scss
250
237
  - lib/isodoc/rsd/html/scripts.html
251
- - lib/isodoc/rsd/html/scripts.pdf.html
252
238
  - lib/isodoc/rsd/html/word_rsd_intro.html
253
239
  - lib/isodoc/rsd/html/word_rsd_titlepage.html
254
240
  - lib/isodoc/rsd/html/wordstyle.scss
255
241
  - lib/isodoc/rsd/html_convert.rb
256
242
  - lib/isodoc/rsd/metadata.rb
257
243
  - lib/isodoc/rsd/pdf_convert.rb
244
+ - lib/isodoc/rsd/rsd.standard.xsl
258
245
  - lib/isodoc/rsd/word_convert.rb
259
246
  - lib/metanorma-rsd.rb
260
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
- warn "Document Attributes: #{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
-