metanorma-cc 1.4.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1154,4 +1154,3 @@ ol
1154
1154
  ul
1155
1155
  {margin-bottom:0cm;
1156
1156
  margin-left:18pt;}
1157
-
@@ -1,4 +1,5 @@
1
1
  require_relative "base_convert"
2
+ require_relative "init"
2
3
  require "isodoc"
3
4
 
4
5
  module IsoDoc
@@ -45,6 +46,7 @@ module IsoDoc
45
46
  end
46
47
 
47
48
  include BaseConvert
49
+ include Init
48
50
  end
49
51
  end
50
52
  end
@@ -0,0 +1,2 @@
1
+ annex: Appendix
2
+
@@ -0,0 +1,10 @@
1
+ module IsoDoc
2
+ module CC
3
+ class I18n < IsoDoc::I18n
4
+ def load_yaml1(lang, script)
5
+ y = YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
6
+ super.merge(y)
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,23 @@
1
+ require "isodoc"
2
+ require_relative "metadata"
3
+ require_relative "xref"
4
+ require_relative "i18n"
5
+
6
+ module IsoDoc
7
+ module CC
8
+ module Init
9
+ def metadata_init(lang, script, i18n)
10
+ @meta = Metadata.new(lang, script, i18n)
11
+ end
12
+
13
+ def xref_init(lang, script, klass, i18n, options)
14
+ @xrefs = Xref.new(lang, script, HtmlConvert.new(language: lang, script: script), i18n, options)
15
+ end
16
+
17
+ def i18n_init(lang, script, i18nyaml = nil)
18
+ @i18n = I18n.new(lang, script, i18nyaml || @i18nyaml)
19
+ end
20
+ end
21
+ end
22
+ end
23
+
@@ -6,7 +6,6 @@ module IsoDoc
6
6
  # A {Converter} implementation that generates CC output, and a document
7
7
  # schema encapsulation of the document for validation
8
8
  class Metadata < IsoDoc::Metadata
9
-
10
9
  def initialize(lang, script, labels)
11
10
  super
12
11
  set(:tc, "XXXX")
@@ -1,9 +1,18 @@
1
- require_relative "base_convert"
1
+ require_relative "init"
2
2
  require "isodoc"
3
3
 
4
4
  module IsoDoc
5
5
  module CC
6
6
  class PresentationXMLConvert < IsoDoc::PresentationXMLConvert
7
+ def annex1(f)
8
+ lbl = @xrefs.anchor(f['id'], :label)
9
+ if t = f.at(ns("./title"))
10
+ t.children = "<strong>#{t.children.to_xml}</strong>"
11
+ end
12
+ prefix_name(f, "<br/>", lbl, "title")
13
+ end
14
+
15
+ include Init
7
16
  end
8
17
  end
9
18
  end
@@ -1,4 +1,5 @@
1
1
  require_relative "base_convert"
2
+ require_relative "init"
2
3
  require "isodoc"
3
4
 
4
5
  module IsoDoc
@@ -32,6 +33,7 @@ module IsoDoc
32
33
  end
33
34
 
34
35
  include BaseConvert
36
+ include Init
35
37
  end
36
38
  end
37
39
  end
@@ -0,0 +1,6 @@
1
+ module IsoDoc
2
+ module CC
3
+ class Xref < IsoDoc::Xref
4
+ end
5
+ end
6
+ end
@@ -38,7 +38,7 @@ module Metanorma
38
38
  IsoDoc::CC::WordConvert.new(options).convert(inname, isodoc_node, nil, outname)
39
39
  when :pdf
40
40
  IsoDoc::CC::PdfConvert.new(options).convert(inname, isodoc_node, nil, outname)
41
- when :pdf
41
+ when :presentation
42
42
  IsoDoc::CC::PresentationXMLConvert.new(options).convert(inname, isodoc_node, nil, outname)
43
43
  else
44
44
  super
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module CC
3
- VERSION = "1.4.1"
3
+ VERSION = "1.5.2"
4
4
  end
5
5
  end
@@ -28,10 +28,11 @@ Gem::Specification.new do |spec|
28
28
  spec.require_paths = ["lib"]
29
29
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
30
30
 
31
- spec.add_dependency "metanorma-standoc", "~> 1.4.0"
32
- spec.add_dependency "isodoc", "~> 1.1.0"
31
+ spec.add_dependency "metanorma-standoc", "~> 1.5.0"
32
+ spec.add_dependency "isodoc", "~> 1.2.0"
33
33
 
34
34
  spec.add_development_dependency "byebug", "~> 9.1"
35
+ spec.add_development_dependency "sassc", "2.4.0"
35
36
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
36
37
  spec.add_development_dependency "guard", "~> 2.14"
37
38
  spec.add_development_dependency "guard-rspec", "~> 4.7"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-cc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.5.2
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-07-10 00:00:00.000000000 Z
11
+ date: 2020-08-27 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.4.0
19
+ version: 1.5.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.4.0
26
+ version: 1.5.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.1.0
33
+ version: 1.2.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.1.0
40
+ version: 1.2.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: byebug
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '9.1'
55
+ - !ruby/object:Gem::Dependency
56
+ name: sassc
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '='
60
+ - !ruby/object:Gem::Version
61
+ version: 2.4.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 2.4.0
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: equivalent-xml
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -205,23 +219,31 @@ files:
205
219
  - lib/asciidoctor/cc/validate_section.rb
206
220
  - lib/isodoc/cc/base_convert.rb
207
221
  - lib/isodoc/cc/csd.standard.xsl
222
+ - lib/isodoc/cc/html/_coverpage.css
208
223
  - lib/isodoc/cc/html/_coverpage.scss
224
+ - lib/isodoc/cc/html/cc.css
209
225
  - lib/isodoc/cc/html/cc.scss
210
226
  - lib/isodoc/cc/html/dots-w@2x.png
211
227
  - lib/isodoc/cc/html/dots@2x.png
212
228
  - lib/isodoc/cc/html/header.html
213
229
  - lib/isodoc/cc/html/html_cc_intro.html
214
230
  - lib/isodoc/cc/html/html_cc_titlepage.html
231
+ - lib/isodoc/cc/html/htmlstyle.css
215
232
  - lib/isodoc/cc/html/htmlstyle.scss
216
233
  - lib/isodoc/cc/html/scripts.html
217
234
  - lib/isodoc/cc/html/word_cc_intro.html
218
235
  - lib/isodoc/cc/html/word_cc_titlepage.html
236
+ - lib/isodoc/cc/html/wordstyle.css
219
237
  - lib/isodoc/cc/html/wordstyle.scss
220
238
  - lib/isodoc/cc/html_convert.rb
239
+ - lib/isodoc/cc/i18n-en.yaml
240
+ - lib/isodoc/cc/i18n.rb
241
+ - lib/isodoc/cc/init.rb
221
242
  - lib/isodoc/cc/metadata.rb
222
243
  - lib/isodoc/cc/pdf_convert.rb
223
244
  - lib/isodoc/cc/presentation_xml_convert.rb
224
245
  - lib/isodoc/cc/word_convert.rb
246
+ - lib/isodoc/cc/xref.rb
225
247
  - lib/metanorma-cc.rb
226
248
  - lib/metanorma/cc.rb
227
249
  - lib/metanorma/cc/processor.rb