asciidoctor-csd 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee70980fdab95cdcec168095febdcb817ebd2a37697498df49bca41971a6cce8
4
- data.tar.gz: c23a81f3d5bbd536361ac4f9cd5eb7497357d3e860edcb6b0bf8eb4944276191
3
+ metadata.gz: db09e64e71d053c8d6f96dace3585128671e73b2d17fa457c94874437d395be6
4
+ data.tar.gz: 229faf5e732ae9dab4c76439f8f68bde91d7fd6bbee0f8c19c3456f0953393b3
5
5
  SHA512:
6
- metadata.gz: c7254bffe6f9b937fcea7975c0ac8917c53325b16f569e66834115247c0f7fff74f3be8431087727f796b35b4d7110099338599b8df8ccab13cdf7e227264c17
7
- data.tar.gz: 6335116e1c1bb883ab6a60df3e2498b543457948c3c4e2af38c910076d2692093634d524893c335bf0ad55848921e2ba92fb488870c6335d4cfeec9de723305a
6
+ metadata.gz: 92e902e976ab3c90c717bbde1d1fbbb2e0b1fad4bf9c7b8e6f7fb1f5677b9011afde70fab98aa202387e5318186384fa2fb090e0c96230541383900d417c7043
7
+ data.tar.gz: 4a226694a83f6b0bdbd699bab3cc1f5986c81413834566752e544afbe964f2f74e559c3cf7822463740654a589ad60bae1ae441c3b1e6767f89d1caeba6f66bb
@@ -25,8 +25,8 @@ Gem::Specification.new do |spec|
25
25
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
26
  spec.require_paths = ["lib"]
27
27
 
28
- spec.add_dependency "asciidoctor-iso", ">= 0.9.0"
29
- spec.add_dependency "isodoc", ">= 0.8.0"
28
+ spec.add_dependency "asciidoctor-iso", "~> 0.10.2"
29
+ spec.add_dependency "isodoc", "~> 0.8.8"
30
30
 
31
31
  spec.add_development_dependency "bundler", "~> 1.15"
32
32
  spec.add_development_dependency "byebug", "~> 9.1"
@@ -18,7 +18,21 @@
18
18
  of this.
19
19
  -->
20
20
  <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
21
- <include href="biblio.rng"/>
21
+ <include href="biblio.rng">
22
+ <define name="status">
23
+ <element name="status">
24
+ <choice>
25
+ <value>proposal</value>
26
+ <value>working_draft</value>
27
+ <value>committee_draft</value>
28
+ <value>draft_standard</value>
29
+ <value>final_draft</value>
30
+ <value>published</value>
31
+ <value>withdrawn</value>
32
+ </choice>
33
+ </element>
34
+ </define>
35
+ </include>
22
36
  <start>
23
37
  <ref name="standard-document"/>
24
38
  </start>
@@ -28,9 +42,10 @@
28
42
  <optional>
29
43
  <ref name="version"/>
30
44
  </optional>
31
- <oneOrMore>
32
- <ref name="sections"/>
33
- </oneOrMore>
45
+ <optional>
46
+ <ref name="preface"/>
47
+ </optional>
48
+ <ref name="sections"/>
34
49
  <zeroOrMore>
35
50
  <ref name="annex"/>
36
51
  </zeroOrMore>
@@ -44,11 +59,6 @@
44
59
  <ref name="BibData"/>
45
60
  </element>
46
61
  </define>
47
- <define name="status">
48
- <element name="status">
49
- <ref name="FormattedString"/>
50
- </element>
51
- </define>
52
62
  <define name="version">
53
63
  <element name="version">
54
64
  <optional>
@@ -77,6 +87,13 @@
77
87
  <text/>
78
88
  </element>
79
89
  </define>
90
+ <define name="preface">
91
+ <element name="preface">
92
+ <oneOrMore>
93
+ <ref name="content"/>
94
+ </oneOrMore>
95
+ </element>
96
+ </define>
80
97
  <define name="sections">
81
98
  <element name="sections">
82
99
  <oneOrMore>
@@ -104,7 +121,9 @@
104
121
  </define>
105
122
  <define name="section-title">
106
123
  <element name="title">
107
- <text/>
124
+ <zeroOrMore>
125
+ <ref name="TextElement"/>
126
+ </zeroOrMore>
108
127
  </element>
109
128
  </define>
110
129
  <define name="content">
@@ -324,7 +343,7 @@
324
343
  <attribute name="id">
325
344
  <data type="ID"/>
326
345
  </attribute>
327
- <ref name="BasicBlock"/>
346
+ <ref name="paragraph"/>
328
347
  </element>
329
348
  </define>
330
349
  <define name="termsource">
@@ -423,7 +442,7 @@
423
442
  <data type="ID"/>
424
443
  </attribute>
425
444
  <oneOrMore>
426
- <ref name="paragraph-with-footnote"/>
445
+ <ref name="paragraph"/>
427
446
  </oneOrMore>
428
447
  </element>
429
448
  </define>
@@ -690,21 +709,20 @@
690
709
  <ref name="tname"/>
691
710
  </optional>
692
711
  <choice>
693
- <oneOrMore>
712
+ <ref name="image"/>
713
+ <zeroOrMore>
694
714
  <ref name="figure"/>
695
- </oneOrMore>
696
- <group>
697
- <zeroOrMore>
698
- <ref name="TextElement"/>
699
- </zeroOrMore>
700
- <zeroOrMore>
701
- <ref name="note"/>
702
- </zeroOrMore>
703
- <optional>
704
- <ref name="dl"/>
705
- </optional>
706
- </group>
715
+ </zeroOrMore>
707
716
  </choice>
717
+ <zeroOrMore>
718
+ <ref name="fn"/>
719
+ </zeroOrMore>
720
+ <optional>
721
+ <ref name="dl"/>
722
+ </optional>
723
+ <zeroOrMore>
724
+ <ref name="note"/>
725
+ </zeroOrMore>
708
726
  </element>
709
727
  </define>
710
728
  <define name="TextElement">
@@ -681,6 +681,14 @@
681
681
  <ref name="paragraph"/>
682
682
  </element>
683
683
  </define>
684
+ <define name="preface">
685
+ <element name="preface">
686
+ <ref name="foreword"/>
687
+ <optional>
688
+ <ref name="introduction"/>
689
+ </optional>
690
+ </element>
691
+ </define>
684
692
  </include>
685
693
  <!-- end overrides -->
686
694
  <!--
@@ -706,14 +714,6 @@
706
714
  <ref name="bibliography"/>
707
715
  </element>
708
716
  </define>
709
- <define name="preface">
710
- <element name="preface">
711
- <ref name="foreword"/>
712
- <optional>
713
- <ref name="introduction"/>
714
- </optional>
715
- </element>
716
- </define>
717
717
  <define name="bibliography">
718
718
  <element name="bibliography">
719
719
  <oneOrMore>
@@ -1,5 +1,5 @@
1
1
  module Asciidoctor
2
2
  module Csd
3
- VERSION = "0.4.4"
3
+ VERSION = "0.4.5"
4
4
  end
5
5
  end
@@ -6,28 +6,26 @@ module IsoDoc
6
6
  # A {Converter} implementation that generates CSD output, and a document
7
7
  # schema encapsulation of the document for validation
8
8
  class HtmlConvert < IsoDoc::HtmlConvert
9
- def html_doc_path(file)
10
- File.join(File.dirname(__FILE__), File.join("html", file))
11
- end
12
-
13
9
  def initialize(options)
10
+ @libdir = File.dirname(__FILE__)
14
11
  super
15
- @htmlstylesheet = generate_css(html_doc_path("htmlstyle.scss"), true, default_fonts(options))
16
- # @standardstylesheet = generate_css(html_doc_path("csd.scss"), true, default_fonts(options))
17
- @htmlcoverpage = html_doc_path("html_csd_titlepage.html")
18
- @htmlintropage = html_doc_path("html_csd_intro.html")
19
- @scripts = html_doc_path("scripts.html")
20
12
  end
21
13
 
22
14
  def default_fonts(options)
23
- b = options[:bodyfont] ||
24
- (options[:script] == "Hans" ? '"SimSun",serif' :
25
- '"Overpass",sans-serif')
26
- h = options[:headerfont] ||
27
- (options[:script] == "Hans" ? '"SimHei",sans-serif' :
28
- '"Overpass",sans-serif')
29
- m = options[:monospacefont] || '"Space Mono",monospace'
30
- "$bodyfont: #{b};\n$headerfont: #{h};\n$monospacefont: #{m};\n"
15
+ {
16
+ bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Overpass",sans-serif'),
17
+ headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Overpass",sans-serif'),
18
+ monospacefont: '"Space Mono",monospace'
19
+ }
20
+ end
21
+
22
+ def default_file_locations(options)
23
+ {
24
+ htmlstylesheet: html_doc_path("htmlstyle.scss"),
25
+ htmlcoverpage: html_doc_path("html_csd_titlepage.html"),
26
+ htmlintropage: html_doc_path("html_csd_intro.html"),
27
+ scripts: html_doc_path("scripts.html"),
28
+ }
31
29
  end
32
30
 
33
31
  def metadata_init(lang, script, labels)
@@ -30,7 +30,7 @@ module Metanorma
30
30
  when :html
31
31
  IsoDoc::Csd::HtmlConvert.new(options).convert(outname, isodoc_node)
32
32
  when :pdf
33
- require 'tempfile'
33
+ #require 'tempfile'
34
34
  # Tempfile.open("#{outname}.html") do |tmp|
35
35
  outname_html = outname + ".html"
36
36
  IsoDoc::Csd::HtmlConvert.new(options).convert(outname_html, isodoc_node)
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-csd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-08 00:00:00.000000000 Z
11
+ date: 2018-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor-iso
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.9.0
19
+ version: 0.10.2
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: 0.9.0
26
+ version: 0.10.2
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: 0.8.0
33
+ version: 0.8.8
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: 0.8.0
40
+ version: 0.8.8
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement