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 +4 -4
- data/asciidoctor-csd.gemspec +2 -2
- data/lib/asciidoctor/csd/isodoc.rng +43 -25
- data/lib/asciidoctor/csd/isostandard.rng +8 -8
- data/lib/asciidoctor/csd/version.rb +1 -1
- data/lib/isodoc/csd/csdconvert.rb +15 -17
- data/lib/metanorma/csd/processor.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db09e64e71d053c8d6f96dace3585128671e73b2d17fa457c94874437d395be6
|
4
|
+
data.tar.gz: 229faf5e732ae9dab4c76439f8f68bde91d7fd6bbee0f8c19c3456f0953393b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92e902e976ab3c90c717bbde1d1fbbb2e0b1fad4bf9c7b8e6f7fb1f5677b9011afde70fab98aa202387e5318186384fa2fb090e0c96230541383900d417c7043
|
7
|
+
data.tar.gz: 4a226694a83f6b0bdbd699bab3cc1f5986c81413834566752e544afbe964f2f74e559c3cf7822463740654a589ad60bae1ae441c3b1e6767f89d1caeba6f66bb
|
data/asciidoctor-csd.gemspec
CHANGED
@@ -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", "
|
29
|
-
spec.add_dependency "isodoc", "
|
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
|
-
<
|
32
|
-
<ref name="
|
33
|
-
</
|
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
|
-
<
|
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="
|
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
|
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
|
-
<
|
712
|
+
<ref name="image"/>
|
713
|
+
<zeroOrMore>
|
694
714
|
<ref name="figure"/>
|
695
|
-
</
|
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>
|
@@ -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
|
-
|
24
|
-
(options[:script] == "Hans" ? '"SimSun",serif' :
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
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
|
+
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-
|
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.
|
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.
|
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.
|
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.
|
40
|
+
version: 0.8.8
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|