isodoc 1.8.1 → 1.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/isodoc.gemspec +1 -1
- data/lib/isodoc/class_utils.rb +1 -1
- data/lib/isodoc/function/cleanup.rb +1 -11
- data/lib/isodoc/function/inline.rb +3 -3
- data/lib/isodoc/function/terms.rb +0 -3
- data/lib/isodoc/function/utils.rb +10 -5
- data/lib/isodoc/i18n.rb +31 -10
- data/lib/isodoc/presentation_function/block.rb +2 -3
- data/lib/isodoc/presentation_function/image.rb +2 -2
- data/lib/isodoc/presentation_function/terms.rb +95 -30
- data/lib/isodoc/presentation_xml_convert.rb +2 -1
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/xref/xref_gen.rb +10 -7
- data/lib/isodoc/xref/xref_gen_seq.rb +159 -148
- data/lib/isodoc/xref/xref_sect_gen.rb +5 -10
- data/lib/isodoc/xref.rb +2 -0
- data/lib/isodoc/xslfo_convert.rb +23 -1
- data/lib/isodoc-yaml/i18n-ar.yaml +3 -0
- data/lib/isodoc-yaml/i18n-de.yaml +3 -0
- data/lib/isodoc-yaml/i18n-en.yaml +8 -5
- data/lib/isodoc-yaml/i18n-es.yaml +3 -0
- data/lib/isodoc-yaml/i18n-fr.yaml +3 -0
- data/lib/isodoc-yaml/i18n-ru.yaml +3 -0
- data/lib/isodoc-yaml/i18n-zh-Hans.yaml +3 -0
- data/spec/isodoc/cleanup_spec.rb +0 -129
- data/spec/isodoc/i18n_spec.rb +53 -10
- data/spec/isodoc/inline_spec.rb +33 -43
- data/spec/isodoc/lists_spec.rb +64 -64
- data/spec/isodoc/postproc_spec.rb +0 -73
- data/spec/isodoc/section_spec.rb +12 -12
- data/spec/isodoc/terms_spec.rb +317 -303
- data/spec/isodoc/xref_spec.rb +80 -9
- data/spec/isodoc/xslfo_convert_spec.rb +35 -0
- data/spec/spec_helper.rb +1 -1
- metadata +8 -8
data/spec/isodoc/xref_spec.rb
CHANGED
@@ -1869,7 +1869,7 @@ RSpec.describe IsoDoc do
|
|
1869
1869
|
<title>2.</title>
|
1870
1870
|
<term id='_waxy_rice'>
|
1871
1871
|
<name>2.1.</name>
|
1872
|
-
<preferred>waxy rice</preferred>
|
1872
|
+
<preferred><strong>waxy rice</strong></preferred>
|
1873
1873
|
<termnote id='note1'>
|
1874
1874
|
<name>Note 1 to entry</name>
|
1875
1875
|
<p id='_b0cb3dfd-78fc-47dd-a339-84070d947463'>
|
@@ -1880,7 +1880,7 @@ RSpec.describe IsoDoc do
|
|
1880
1880
|
</term>
|
1881
1881
|
<term id='_nonwaxy_rice'>
|
1882
1882
|
<name>2.2.</name>
|
1883
|
-
<preferred>nonwaxy rice</preferred>
|
1883
|
+
<preferred><strong>nonwaxy rice</strong></preferred>
|
1884
1884
|
<termnote id='note2'>
|
1885
1885
|
<name>Note 1 to entry</name>
|
1886
1886
|
<p id='_b0cb3dfd-78fc-47dd-a339-84070d947463'>
|
@@ -1957,7 +1957,7 @@ RSpec.describe IsoDoc do
|
|
1957
1957
|
<title>2.</title>
|
1958
1958
|
<term id='_waxy_rice'>
|
1959
1959
|
<name>2.1.</name>
|
1960
|
-
<preferred>waxy rice</preferred>
|
1960
|
+
<preferred><strong>waxy rice</strong></preferred>
|
1961
1961
|
<termnote id='note1'>
|
1962
1962
|
<name>Note 1 to entry</name>
|
1963
1963
|
<p id='_b0cb3dfd-78fc-47dd-a339-84070d947463'>
|
@@ -1967,7 +1967,7 @@ RSpec.describe IsoDoc do
|
|
1967
1967
|
</termnote>
|
1968
1968
|
<term id='_nonwaxy_rice'>
|
1969
1969
|
<name>2.1.1.</name>
|
1970
|
-
<preferred>nonwaxy rice</preferred>
|
1970
|
+
<preferred><strong>nonwaxy rice</strong></preferred>
|
1971
1971
|
<termnote id='note2'>
|
1972
1972
|
<name>Note 1 to entry</name>
|
1973
1973
|
<p id='_b0cb3dfd-78fc-47dd-a339-84070d947463'>
|
@@ -2046,7 +2046,7 @@ RSpec.describe IsoDoc do
|
|
2046
2046
|
<title>2.</title>
|
2047
2047
|
<term id='_waxy_rice'>
|
2048
2048
|
<name>2.1.</name>
|
2049
|
-
<preferred>waxy rice</preferred>
|
2049
|
+
<preferred><strong>waxy rice</strong></preferred>
|
2050
2050
|
<termexample id='note1'>
|
2051
2051
|
<name>EXAMPLE</name>
|
2052
2052
|
<p id='_b0cb3dfd-78fc-47dd-a339-84070d947463'>
|
@@ -2057,7 +2057,7 @@ RSpec.describe IsoDoc do
|
|
2057
2057
|
</term>
|
2058
2058
|
<term id='_nonwaxy_rice'>
|
2059
2059
|
<name>2.2.</name>
|
2060
|
-
<preferred>nonwaxy rice</preferred>
|
2060
|
+
<preferred><strong>nonwaxy rice</strong></preferred>
|
2061
2061
|
<termexample id='note2'>
|
2062
2062
|
<name>EXAMPLE 1</name>
|
2063
2063
|
<p id='_b0cb3dfd-78fc-47dd-a339-84070d947463'>
|
@@ -2134,7 +2134,7 @@ RSpec.describe IsoDoc do
|
|
2134
2134
|
<title>2.</title>
|
2135
2135
|
<term id='_waxy_rice'>
|
2136
2136
|
<name>2.1.</name>
|
2137
|
-
<preferred>waxy rice</preferred>
|
2137
|
+
<preferred><strong>waxy rice</strong></preferred>
|
2138
2138
|
<termexample id='note1'>
|
2139
2139
|
<name>EXAMPLE</name>
|
2140
2140
|
<p id='_b0cb3dfd-78fc-47dd-a339-84070d947463'>
|
@@ -2144,7 +2144,7 @@ RSpec.describe IsoDoc do
|
|
2144
2144
|
</termexample>
|
2145
2145
|
<term id='_nonwaxy_rice'>
|
2146
2146
|
<name>2.1.1.</name>
|
2147
|
-
<preferred>nonwaxy rice</preferred>
|
2147
|
+
<preferred><strong>nonwaxy rice</strong></preferred>
|
2148
2148
|
<termexample id='note2'>
|
2149
2149
|
<name>EXAMPLE 1</name>
|
2150
2150
|
<p id='_b0cb3dfd-78fc-47dd-a339-84070d947463'>
|
@@ -2317,7 +2317,7 @@ RSpec.describe IsoDoc do
|
|
2317
2317
|
</title>
|
2318
2318
|
<term id='J'>
|
2319
2319
|
<name>3.1.1.</name>
|
2320
|
-
<preferred>Term2</preferred>
|
2320
|
+
<preferred><strong>Term2</strong></preferred>
|
2321
2321
|
</term>
|
2322
2322
|
</terms>
|
2323
2323
|
<definitions id='K'>
|
@@ -2800,6 +2800,77 @@ RSpec.describe IsoDoc do
|
|
2800
2800
|
.to be_equivalent_to xmlpp(output)
|
2801
2801
|
end
|
2802
2802
|
|
2803
|
+
it "cross-references definition list terms that are stem expressions" do
|
2804
|
+
input = <<~INPUT
|
2805
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
2806
|
+
<preface>
|
2807
|
+
<foreword>
|
2808
|
+
<p>
|
2809
|
+
<xref target="N1"/>
|
2810
|
+
</p>
|
2811
|
+
</foreword>
|
2812
|
+
<introduction id="intro">
|
2813
|
+
<dl id="N01">
|
2814
|
+
<dt id="N1"><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow><mover accent="true"><mrow><mi>e</mi></mrow><mo>^</mo></mover></mrow><mrow><mi>r</mi></mrow></msub></math></stem>
|
2815
|
+
<index><primary>
|
2816
|
+
<stem type="MathML">
|
2817
|
+
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
2818
|
+
<msub>
|
2819
|
+
<mrow>
|
2820
|
+
<mover accent="true">
|
2821
|
+
<mrow>
|
2822
|
+
<mi>e</mi>
|
2823
|
+
</mrow>
|
2824
|
+
<mo>^</mo>
|
2825
|
+
</mover>
|
2826
|
+
</mrow>
|
2827
|
+
<mrow>
|
2828
|
+
<mi>r</mi>
|
2829
|
+
</mrow>
|
2830
|
+
</msub>
|
2831
|
+
</math>
|
2832
|
+
</stem>
|
2833
|
+
</primary></index></dt><dd>
|
2834
|
+
<p id="_543e0447-dfc6-477e-00cb-1738d6853190"><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>r</mi></math></stem>-direction</p>
|
2835
|
+
</dd>
|
2836
|
+
</dl>
|
2837
|
+
</clause>
|
2838
|
+
</annex>
|
2839
|
+
</iso-standard>
|
2840
|
+
INPUT
|
2841
|
+
output = <<~OUTPUT
|
2842
|
+
<foreword displayorder='1'>
|
2843
|
+
<p>
|
2844
|
+
<xref target='N1'>
|
2845
|
+
Introduction, Definition List:
|
2846
|
+
<stem type='MathML'>
|
2847
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2848
|
+
<msub>
|
2849
|
+
<mrow>
|
2850
|
+
<mover accent='true'>
|
2851
|
+
<mrow>
|
2852
|
+
<mi>e</mi>
|
2853
|
+
</mrow>
|
2854
|
+
<mo>^</mo>
|
2855
|
+
</mover>
|
2856
|
+
</mrow>
|
2857
|
+
<mrow>
|
2858
|
+
<mi>r</mi>
|
2859
|
+
</mrow>
|
2860
|
+
</msub>
|
2861
|
+
</math>
|
2862
|
+
<!-- (hat e)_((r)) -->
|
2863
|
+
</stem>
|
2864
|
+
</xref>
|
2865
|
+
</p>
|
2866
|
+
</foreword>
|
2867
|
+
OUTPUT
|
2868
|
+
expect(xmlpp(Nokogiri::XML(IsoDoc::PresentationXMLConvert.new({})
|
2869
|
+
.convert("test", input, true))
|
2870
|
+
.at("//xmlns:foreword").to_xml))
|
2871
|
+
.to be_equivalent_to xmlpp(output)
|
2872
|
+
end
|
2873
|
+
|
2803
2874
|
it "cross-references bookmarks" do
|
2804
2875
|
input = <<~INPUT
|
2805
2876
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
@@ -61,4 +61,39 @@ RSpec.describe IsoDoc do
|
|
61
61
|
expect(convert.pdf_options(nil))
|
62
62
|
.to eq({ "--param baseassetpath=" => "ABC" })
|
63
63
|
end
|
64
|
+
|
65
|
+
it "test pdf encryption options" do
|
66
|
+
convert = IsoDoc::XslfoPdfConvert.new(
|
67
|
+
{
|
68
|
+
pdfencryptionlength: "a",
|
69
|
+
pdfownerpassword: "b",
|
70
|
+
pdfuserpassword: "c",
|
71
|
+
pdfallowprint: "d",
|
72
|
+
pdfallowcopycontent: "e",
|
73
|
+
pdfalloweditcontent: "f",
|
74
|
+
pdfalloweditannotations: "g",
|
75
|
+
pdfallowfillinforms: "h",
|
76
|
+
pdfallowaccesscontent: "i",
|
77
|
+
pdfallowassembledocument: "j",
|
78
|
+
pdfallowprinthq: "k",
|
79
|
+
pdfencryptmetadata: "l",
|
80
|
+
},
|
81
|
+
)
|
82
|
+
|
83
|
+
expect(convert.pdf_options(nil))
|
84
|
+
.to eq({
|
85
|
+
"--allow-access-content" => "i",
|
86
|
+
"--allow-assemble-document" => "j",
|
87
|
+
"--allow-copy-content" => "e",
|
88
|
+
"--allow-edit-annotations" => "g",
|
89
|
+
"--allow-edit-content" => "f",
|
90
|
+
"--allow-fill-in-forms" => "h",
|
91
|
+
"--allow-print" => "d",
|
92
|
+
"--allow-print-hq" => "k",
|
93
|
+
"--encrypt-metadata" => "l",
|
94
|
+
"--encryption-length" => "a",
|
95
|
+
"--owner-password" => "b",
|
96
|
+
"--user-password" => "c",
|
97
|
+
})
|
98
|
+
end
|
64
99
|
end
|
data/spec/spec_helper.rb
CHANGED
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: 1.8.
|
4
|
+
version: 1.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciimath
|
@@ -193,19 +193,19 @@ dependencies:
|
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
|
-
name:
|
196
|
+
name: debug
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
|
-
- - "
|
199
|
+
- - ">="
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version: '
|
201
|
+
version: '0'
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
|
-
- - "
|
206
|
+
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version: '
|
208
|
+
version: '0'
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: equivalent-xml
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -532,7 +532,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
532
532
|
- !ruby/object:Gem::Version
|
533
533
|
version: '0'
|
534
534
|
requirements: []
|
535
|
-
rubygems_version: 3.2.
|
535
|
+
rubygems_version: 3.2.32
|
536
536
|
signing_key:
|
537
537
|
specification_version: 4
|
538
538
|
summary: Convert documents in IsoDoc into Word and HTML in AsciiDoc.
|