asciidoctor-csand 0.3.2 → 0.3.3

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: 1d9fb3d68f1bb9fe0cc1369cea6e5cf3579d694e7bcb43e78a145b3bd2a8737c
4
- data.tar.gz: 19b0fabc65c704e896fb0af1aa35b314664d1f5a8d82dd16ac221d90755f3f13
3
+ metadata.gz: 0d7e6e92559f254c6172e582d1aff73f44789487860bc5a6a0b67ec98bc41bce
4
+ data.tar.gz: e042c895b6106a7a026b3c787d903f0783b0401ccaae927acc6460430efd05e5
5
5
  SHA512:
6
- metadata.gz: 8b84547f8a921c19d061d87e40fa27fa3f7808e193a9eaee900696336fc7685a9224f21a3e575bedaf7ac7e4a04ead7bd61be0795cfb69152d2eb7ea2f9b36af
7
- data.tar.gz: 4bc5b7c6b183d5bda0abac8cf4a2f2954cf1d895df35249e5a644ddeca42765405394b90cba8f912487c2b7d7d78a72d93d462bbeb28e826b4183a5e5d664201
6
+ metadata.gz: 5e0ea4a9836f667bdc0362111756af5e9304882c1d9684d6986ca98df9183e441a9adcd11138f032d33f502e549aa8a1427656245d9867d95ac1f29b83ef1c29
7
+ data.tar.gz: 438c2bc286577005b2b423b4ba1e0c146d676af42e028f3dff6bdd8cd1163f6c7180b49d37794d5e8c4be14828401c1d76d4f6c23d89d84f92a1757f44c3a917
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
  git_source(:github) {|repo| "https://github.com/#{repo}" }
3
3
 
4
- gem "isodoc", github: "riboseinc/isodoc"
5
- gem "asciidoctor-iso", github: "riboseinc/asciidoctor-iso"
4
+ #gem "isodoc", github: "riboseinc/isodoc"
5
+ #gem "asciidoctor-iso", github: "riboseinc/asciidoctor-iso"
6
6
 
7
7
  gemspec
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
37
37
  spec.add_dependency "uuidtools"
38
38
 
39
39
  spec.add_dependency "asciidoctor-iso", ">= 0.9.0"
40
- spec.add_dependency "isodoc", "~> 0.8.7"
40
+ spec.add_dependency "isodoc", "~> 0.8.8"
41
41
 
42
42
  spec.add_development_dependency "bundler", "~> 1.15"
43
43
  spec.add_development_dependency "byebug", "~> 9.1"
@@ -112,10 +112,6 @@ module Asciidoctor
112
112
  File.join(File.dirname(__FILE__), "csand.rng"))
113
113
  end
114
114
 
115
- def html_doc_path(file)
116
- File.join(File.dirname(__FILE__), File.join("html", file))
117
- end
118
-
119
115
  def literal(node)
120
116
  noko do |xml|
121
117
  xml.figure **id_attr(node) do |f|
@@ -145,6 +141,10 @@ module Asciidoctor
145
141
  titlefont: node.attr("title-font"),
146
142
  i18nyaml: node.attr("i18nyaml"),
147
143
  scope: node.attr("scope"),
144
+ htmlstylesheet: node.attr("htmlstylesheet"),
145
+ htmlcoverpage: node.attr("htmlcoverpage"),
146
+ htmlintropage: node.attr("htmlintropage"),
147
+ scripts: node.attr("scripts"),
148
148
  )
149
149
  end
150
150
 
@@ -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 Csand
3
- VERSION = "0.3.2"
3
+ VERSION = "0.3.3"
4
4
  end
5
5
  end
@@ -6,28 +6,26 @@ module IsoDoc
6
6
  # A {Converter} implementation that generates CSAND 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_csand_titlepage.html")
18
- @htmlintropage = html_doc_path("html_csand_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
- '"Source Sans Pro",sans-serif')
26
- h = options[:headerfont] ||
27
- (options[:script] == "Hans" ? '"SimHei",sans-serif' :
28
- '"Source Sans Pro",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' : '"Source Sans Pro",sans-serif'),
17
+ headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Source Sans Pro",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_csand_titlepage.html"),
26
+ htmlintropage: html_doc_path("html_csand_intro.html"),
27
+ scripts: html_doc_path("scripts.html"),
28
+ }
31
29
  end
32
30
 
33
31
  def metadata_init(lang, script, labels)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-csand
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
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
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 0.8.7
173
+ version: 0.8.8
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: 0.8.7
180
+ version: 0.8.8
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: bundler
183
183
  requirement: !ruby/object:Gem::Requirement