metanorma-csa 1.5.1 → 1.6.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1155,4 +1155,3 @@ ol
1155
1155
  ul
1156
1156
  {margin-bottom:0cm;
1157
1157
  margin-left:18pt;}
1158
-
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'base_convert'
4
+ require_relative 'init'
4
5
  require 'isodoc'
5
6
 
6
7
  module IsoDoc
@@ -52,6 +53,7 @@ module IsoDoc
52
53
  end
53
54
 
54
55
  include BaseConvert
56
+ include Init
55
57
  end
56
58
  end
57
59
  end
@@ -0,0 +1,2 @@
1
+ annex: Appendix
2
+
@@ -0,0 +1,10 @@
1
+ module IsoDoc
2
+ module Csa
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,24 @@
1
+ require "isodoc"
2
+ require_relative "metadata"
3
+ require_relative "xref"
4
+ require_relative "i18n"
5
+
6
+ module IsoDoc
7
+ module Csa
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
+ html = HtmlConvert.new(language: lang, script: script)
15
+ @xrefs = Xref.new(lang, script, html, i18n, options)
16
+ end
17
+
18
+ def i18n_init(lang, script, i18nyaml = nil)
19
+ @i18n = I18n.new(lang, script, i18nyaml || @i18nyaml)
20
+ end
21
+ end
22
+ end
23
+ end
24
+
@@ -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 Csa
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,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'base_convert'
4
+ require_relative 'init'
4
5
  require 'isodoc'
5
6
 
6
7
  module IsoDoc
@@ -35,6 +36,7 @@ module IsoDoc
35
36
  end
36
37
 
37
38
  include BaseConvert
39
+ include Init
38
40
  end
39
41
  end
40
42
  end
@@ -0,0 +1,6 @@
1
+ module IsoDoc
2
+ module Csa
3
+ class Xref < IsoDoc::Xref
4
+ end
5
+ end
6
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Metanorma
4
4
  module Csa
5
- VERSION = '1.5.1'
5
+ VERSION = '1.6.2'
6
6
  end
7
7
  end
@@ -36,10 +36,11 @@ Gem::Specification.new do |spec|
36
36
  spec.add_dependency "thread_safe"
37
37
  spec.add_dependency "uuidtools"
38
38
 
39
- spec.add_dependency "metanorma-standoc", "~> 1.4.0"
40
- spec.add_dependency "isodoc", "~> 1.1.0"
39
+ spec.add_dependency "metanorma-standoc", "~> 1.5.0"
40
+ spec.add_dependency "isodoc", "~> 1.2.0"
41
41
 
42
42
  spec.add_development_dependency "byebug", "~> 9.1"
43
+ spec.add_development_dependency "sassc", "2.4.0"
43
44
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
44
45
  spec.add_development_dependency "guard", "~> 2.14"
45
46
  spec.add_development_dependency "guard-rspec", "~> 4.7"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-csa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.6.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: htmlentities
@@ -100,28 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.4.0
103
+ version: 1.5.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.4.0
110
+ version: 1.5.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: isodoc
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 1.1.0
117
+ version: 1.2.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 1.1.0
124
+ version: 1.2.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: byebug
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -136,6 +136,20 @@ dependencies:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '9.1'
139
+ - !ruby/object:Gem::Dependency
140
+ name: sassc
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '='
144
+ - !ruby/object:Gem::Version
145
+ version: 2.4.0
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '='
151
+ - !ruby/object:Gem::Version
152
+ version: 2.4.0
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: equivalent-xml
141
155
  requirement: !ruby/object:Gem::Requirement
@@ -286,6 +300,7 @@ files:
286
300
  - lib/isodoc/csa/base_convert.rb
287
301
  - lib/isodoc/csa/csa.standard.xsl
288
302
  - lib/isodoc/csa/html/csa-logo-white.png
303
+ - lib/isodoc/csa/html/csa.css
289
304
  - lib/isodoc/csa/html/csa.png
290
305
  - lib/isodoc/csa/html/csa.scss
291
306
  - lib/isodoc/csa/html/dots-w@2x.png
@@ -293,16 +308,22 @@ files:
293
308
  - lib/isodoc/csa/html/header.html
294
309
  - lib/isodoc/csa/html/html_csa_intro.html
295
310
  - lib/isodoc/csa/html/html_csa_titlepage.html
311
+ - lib/isodoc/csa/html/htmlstyle.css
296
312
  - lib/isodoc/csa/html/htmlstyle.scss
297
313
  - lib/isodoc/csa/html/scripts.html
298
314
  - lib/isodoc/csa/html/word_csa_intro.html
299
315
  - lib/isodoc/csa/html/word_csa_titlepage.html
316
+ - lib/isodoc/csa/html/wordstyle.css
300
317
  - lib/isodoc/csa/html/wordstyle.scss
301
318
  - lib/isodoc/csa/html_convert.rb
319
+ - lib/isodoc/csa/i18n-en.yaml
320
+ - lib/isodoc/csa/i18n.rb
321
+ - lib/isodoc/csa/init.rb
302
322
  - lib/isodoc/csa/metadata.rb
303
323
  - lib/isodoc/csa/pdf_convert.rb
304
324
  - lib/isodoc/csa/presentation_xml_convert.rb
305
325
  - lib/isodoc/csa/word_convert.rb
326
+ - lib/isodoc/csa/xref.rb
306
327
  - lib/metanorma-csa.rb
307
328
  - lib/metanorma/csa.rb
308
329
  - lib/metanorma/csa/processor.rb