isodoc 2.0.2 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/convert.rb +36 -18
- data/lib/isodoc/function/inline.rb +24 -13
- data/lib/isodoc/function/references.rb +18 -6
- data/lib/isodoc/html_function/html.rb +6 -0
- data/lib/isodoc/i18n.rb +20 -7
- data/lib/isodoc/metadata.rb +1 -1
- data/lib/isodoc/metadata_contributor.rb +1 -1
- data/lib/isodoc/presentation_function/bibdata.rb +26 -9
- data/lib/isodoc/presentation_function/block.rb +24 -0
- data/lib/isodoc/presentation_function/image.rb +3 -4
- data/lib/isodoc/presentation_function/inline.rb +118 -76
- data/lib/isodoc/presentation_function/math.rb +1 -0
- data/lib/isodoc/presentation_function/xrefs.rb +100 -0
- data/lib/isodoc/presentation_xml_convert.rb +1 -0
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_function/body.rb +11 -1
- data/lib/isodoc/word_function/postprocess.rb +4 -6
- data/lib/isodoc/word_function/postprocess_cover.rb +82 -1
- data/lib/isodoc/xref/xref_anchor.rb +1 -0
- data/lib/isodoc/xref/xref_gen.rb +2 -1
- data/lib/isodoc/xref/xref_sect_gen.rb +14 -8
- data/lib/isodoc/xslfo_convert.rb +19 -19
- data/lib/isodoc-yaml/i18n-ar.yaml +11 -0
- data/lib/isodoc-yaml/i18n-de.yaml +11 -0
- data/lib/isodoc-yaml/i18n-en.yaml +11 -0
- data/lib/isodoc-yaml/i18n-es.yaml +11 -0
- data/lib/isodoc-yaml/i18n-fr.yaml +11 -0
- data/lib/isodoc-yaml/i18n-ru.yaml +11 -0
- data/lib/isodoc-yaml/i18n-zh-Hans.yaml +11 -0
- data/spec/isodoc/blocks_spec.rb +13 -77
- data/spec/isodoc/inline_spec.rb +565 -22
- data/spec/isodoc/metadata_spec.rb +1 -1
- data/spec/isodoc/postproc_spec.rb +466 -2
- data/spec/isodoc/presentation_xml_spec.rb +380 -78
- data/spec/isodoc/ref_spec.rb +96 -11
- data/spec/isodoc/section_spec.rb +1 -2
- data/spec/isodoc/table_spec.rb +1 -1
- data/spec/isodoc/terms_spec.rb +8 -8
- data/spec/isodoc/xref_spec.rb +71 -1190
- data/spec/isodoc/xslfo_convert_spec.rb +12 -7
- metadata +3 -2
@@ -1,17 +1,17 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
RSpec.describe IsoDoc do
|
4
|
-
it "test
|
4
|
+
it "test default pdf_options" do
|
5
5
|
convert = IsoDoc::XslfoPdfConvert.new(
|
6
6
|
{
|
7
7
|
datauriimage: false,
|
8
8
|
},
|
9
9
|
)
|
10
10
|
|
11
|
-
expect(convert.pdf_options(nil)).to eq({})
|
11
|
+
expect(convert.pdf_options(nil)).to eq({ "--syntax-highlight": nil })
|
12
12
|
end
|
13
13
|
|
14
|
-
it "test
|
14
|
+
it "test default pdf_options for nil font_manifest_file" do
|
15
15
|
convert = IsoDoc::XslfoPdfConvert.new(
|
16
16
|
{
|
17
17
|
datauriimage: false,
|
@@ -21,17 +21,19 @@ RSpec.describe IsoDoc do
|
|
21
21
|
},
|
22
22
|
)
|
23
23
|
|
24
|
-
expect(convert.pdf_options(nil)).to eq({})
|
24
|
+
expect(convert.pdf_options(nil)).to eq({ "--syntax-highlight": nil })
|
25
25
|
end
|
26
26
|
|
27
27
|
it "test --font-manifest pdf_options" do
|
28
28
|
mn2pdf_opts = {
|
29
|
-
|
29
|
+
"--syntax-highlight": nil,
|
30
|
+
font_manifest: "/tmp/manifest.yml",
|
30
31
|
}
|
31
32
|
convert = IsoDoc::XslfoPdfConvert.new(
|
32
33
|
{
|
33
34
|
datauriimage: false,
|
34
35
|
IsoDoc::XslfoPdfConvert::MN2PDF_OPTIONS => mn2pdf_opts,
|
36
|
+
font_manifest: "/tmp/manifest.yml",
|
35
37
|
},
|
36
38
|
)
|
37
39
|
|
@@ -47,7 +49,8 @@ RSpec.describe IsoDoc do
|
|
47
49
|
)
|
48
50
|
|
49
51
|
expect(convert.pdf_options(nil))
|
50
|
-
.to eq({ "--param align-cross-elements=" => "clause table note"
|
52
|
+
.to eq({ "--param align-cross-elements=" => "clause table note",
|
53
|
+
"--syntax-highlight": nil })
|
51
54
|
end
|
52
55
|
|
53
56
|
it "test --baseassetpath pdf_options" do
|
@@ -59,7 +62,8 @@ RSpec.describe IsoDoc do
|
|
59
62
|
)
|
60
63
|
|
61
64
|
expect(convert.pdf_options(nil))
|
62
|
-
.to eq({ "--param baseassetpath=" => "ABC"
|
65
|
+
.to eq({ "--param baseassetpath=" => "ABC",
|
66
|
+
"--syntax-highlight": nil })
|
63
67
|
end
|
64
68
|
|
65
69
|
it "test pdf encryption options" do
|
@@ -93,6 +97,7 @@ RSpec.describe IsoDoc do
|
|
93
97
|
"--encrypt-metadata" => "l",
|
94
98
|
"--encryption-length" => "a",
|
95
99
|
"--owner-password" => "b",
|
100
|
+
:"--syntax-highlight" => nil,
|
96
101
|
"--user-password" => "c",
|
97
102
|
})
|
98
103
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isodoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciimath
|
@@ -451,6 +451,7 @@ files:
|
|
451
451
|
- lib/isodoc/presentation_function/math.rb
|
452
452
|
- lib/isodoc/presentation_function/section.rb
|
453
453
|
- lib/isodoc/presentation_function/terms.rb
|
454
|
+
- lib/isodoc/presentation_function/xrefs.rb
|
454
455
|
- lib/isodoc/presentation_xml_convert.rb
|
455
456
|
- lib/isodoc/sassc_importer.rb
|
456
457
|
- lib/isodoc/version.rb
|