isodoc 1.2.1 → 1.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/isodoc.gemspec +1 -0
- data/lib/isodoc-yaml/i18n-fr.yaml +1 -1
- data/lib/isodoc/base_style/all.css +1 -1
- data/lib/isodoc/base_style/metanorma_word.css +6 -0
- data/lib/isodoc/base_style/metanorma_word.scss +6 -0
- data/lib/isodoc/base_style/reset.css +1 -1
- data/lib/isodoc/base_style/reset.scss +1 -1
- data/lib/isodoc/convert.rb +1 -1
- data/lib/isodoc/function/blocks.rb +1 -0
- data/lib/isodoc/function/cleanup.rb +1 -1
- data/lib/isodoc/function/references.rb +4 -2
- data/lib/isodoc/function/section.rb +13 -1
- data/lib/isodoc/function/table.rb +1 -0
- data/lib/isodoc/function/to_word_html.rb +3 -0
- data/lib/isodoc/function/utils.rb +1 -1
- data/lib/isodoc/html_function/html.rb +1 -0
- data/lib/isodoc/i18n.rb +8 -50
- data/lib/isodoc/metadata.rb +49 -35
- data/lib/isodoc/metadata_date.rb +5 -0
- data/lib/isodoc/presentation_function/bibdata.rb +24 -0
- data/lib/isodoc/presentation_function/block.rb +14 -0
- data/lib/isodoc/presentation_function/inline.rb +27 -14
- data/lib/isodoc/presentation_xml_convert.rb +4 -0
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_function/body.rb +1 -0
- data/lib/isodoc/word_function/postprocess.rb +1 -1
- data/lib/isodoc/word_function/table.rb +3 -2
- data/lib/isodoc/xref.rb +1 -0
- data/lib/isodoc/xref/xref_anchor.rb +8 -3
- data/lib/isodoc/xref/xref_counter.rb +21 -7
- data/lib/isodoc/xref/xref_gen.rb +29 -6
- data/lib/isodoc/xref/xref_sect_gen.rb +1 -1
- data/lib/isodoc/xslfo_convert.rb +6 -1
- data/spec/assets/i18n.yaml +9 -0
- data/spec/isodoc/blocks_spec.rb +281 -13
- data/spec/isodoc/cleanup_spec.rb +3 -1
- data/spec/isodoc/i18n_spec.rb +43 -5
- data/spec/isodoc/inline_spec.rb +47 -5
- data/spec/isodoc/metadata_spec.rb +24 -15
- data/spec/isodoc/postproc_spec.rb +39 -3
- data/spec/isodoc/ref_spec.rb +4 -1
- data/spec/isodoc/section_spec.rb +134 -10
- data/spec/isodoc/table_spec.rb +306 -207
- data/spec/isodoc/terms_spec.rb +1 -1
- data/spec/isodoc/xref_spec.rb +46 -18
- data/spec/spec_helper.rb +4 -0
- metadata +17 -2
data/spec/isodoc/terms_spec.rb
CHANGED
@@ -74,7 +74,7 @@ RSpec.describe IsoDoc do
|
|
74
74
|
INPUT
|
75
75
|
|
76
76
|
presxml = <<~"PRESXML"
|
77
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
77
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
78
78
|
<sections>
|
79
79
|
<terms id='_terms_and_definitions' obligation='normative'>
|
80
80
|
<title depth='1'>
|
data/spec/isodoc/xref_spec.rb
CHANGED
@@ -14,7 +14,7 @@ RSpec.describe IsoDoc do
|
|
14
14
|
</iso-standard
|
15
15
|
INPUT
|
16
16
|
<?xml version='1.0'?>
|
17
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
17
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
18
18
|
<preface>
|
19
19
|
<foreword>
|
20
20
|
<p>
|
@@ -167,7 +167,7 @@ RSpec.describe IsoDoc do
|
|
167
167
|
</iso-standard>
|
168
168
|
INPUT
|
169
169
|
<?xml version='1.0'?>
|
170
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
170
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
171
171
|
<preface>
|
172
172
|
<foreword>
|
173
173
|
<p>
|
@@ -377,7 +377,7 @@ RSpec.describe IsoDoc do
|
|
377
377
|
</iso-standard>
|
378
378
|
INPUT
|
379
379
|
<?xml version='1.0'?>
|
380
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
380
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
381
381
|
<preface>
|
382
382
|
<foreword id='fwd'>
|
383
383
|
<p>
|
@@ -546,7 +546,7 @@ RSpec.describe IsoDoc do
|
|
546
546
|
</iso-standard>
|
547
547
|
INPUT
|
548
548
|
<?xml version='1.0'?>
|
549
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
549
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
550
550
|
<preface>
|
551
551
|
<foreword id='fwd'>
|
552
552
|
<p>
|
@@ -684,7 +684,7 @@ RSpec.describe IsoDoc do
|
|
684
684
|
</iso-standard>
|
685
685
|
INPUT
|
686
686
|
<?xml version='1.0'?>
|
687
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
687
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
688
688
|
<preface>
|
689
689
|
<foreword>
|
690
690
|
<p>
|
@@ -844,7 +844,7 @@ RSpec.describe IsoDoc do
|
|
844
844
|
</iso-standard>
|
845
845
|
INPUT
|
846
846
|
<?xml version='1.0'?>
|
847
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
847
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
848
848
|
<preface>
|
849
849
|
<foreword>
|
850
850
|
<p>
|
@@ -1002,7 +1002,7 @@ RSpec.describe IsoDoc do
|
|
1002
1002
|
</iso-standard>
|
1003
1003
|
INPUT
|
1004
1004
|
<?xml version='1.0'?>
|
1005
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
1005
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
1006
1006
|
<preface>
|
1007
1007
|
<foreword>
|
1008
1008
|
<p>
|
@@ -1162,7 +1162,7 @@ RSpec.describe IsoDoc do
|
|
1162
1162
|
</iso-standard>
|
1163
1163
|
INPUT
|
1164
1164
|
<?xml version='1.0'?>
|
1165
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
1165
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
1166
1166
|
<preface>
|
1167
1167
|
<foreword>
|
1168
1168
|
<p>
|
@@ -1322,7 +1322,7 @@ RSpec.describe IsoDoc do
|
|
1322
1322
|
</iso-standard>
|
1323
1323
|
INPUT
|
1324
1324
|
<?xml version='1.0'?>
|
1325
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
1325
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
1326
1326
|
<preface>
|
1327
1327
|
<foreword>
|
1328
1328
|
<p>
|
@@ -1465,7 +1465,7 @@ OUTPUT
|
|
1465
1465
|
</iso-standard>
|
1466
1466
|
INPUT
|
1467
1467
|
<?xml version='1.0'?>
|
1468
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
1468
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
1469
1469
|
<preface>
|
1470
1470
|
<foreword>
|
1471
1471
|
<p>
|
@@ -1656,7 +1656,7 @@ OUTPUT
|
|
1656
1656
|
</iso-standard>
|
1657
1657
|
INPUT
|
1658
1658
|
<?xml version='1.0'?>
|
1659
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
1659
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
1660
1660
|
<preface>
|
1661
1661
|
<foreword>
|
1662
1662
|
<p>
|
@@ -1831,7 +1831,7 @@ OUTPUT
|
|
1831
1831
|
</iso-standard>
|
1832
1832
|
INPUT
|
1833
1833
|
<?xml version='1.0'?>
|
1834
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
1834
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
1835
1835
|
<preface>
|
1836
1836
|
<foreword>
|
1837
1837
|
<p>
|
@@ -1976,7 +1976,7 @@ OUTPUT
|
|
1976
1976
|
</iso-standard>
|
1977
1977
|
INPUT
|
1978
1978
|
<?xml version='1.0'?>
|
1979
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
1979
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
1980
1980
|
<preface>
|
1981
1981
|
<foreword obligation='informative'>
|
1982
1982
|
<title>Foreword</title>
|
@@ -2191,7 +2191,7 @@ OUTPUT
|
|
2191
2191
|
</iso-standard>
|
2192
2192
|
INPUT
|
2193
2193
|
<?xml version='1.0'?>
|
2194
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
2194
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
2195
2195
|
<preface>
|
2196
2196
|
<foreword>
|
2197
2197
|
<p>
|
@@ -2355,7 +2355,7 @@ OUTPUT
|
|
2355
2355
|
</iso-standard>
|
2356
2356
|
INPUT
|
2357
2357
|
<?xml version='1.0'?>
|
2358
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
2358
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
2359
2359
|
<preface>
|
2360
2360
|
<foreword>
|
2361
2361
|
<p>
|
@@ -2491,7 +2491,7 @@ OUTPUT
|
|
2491
2491
|
</iso-standard>
|
2492
2492
|
INPUT
|
2493
2493
|
<?xml version='1.0'?>
|
2494
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
2494
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
2495
2495
|
<preface>
|
2496
2496
|
<foreword>
|
2497
2497
|
<p>
|
@@ -2592,7 +2592,7 @@ OUTPUT
|
|
2592
2592
|
</iso-standard>
|
2593
2593
|
INPUT
|
2594
2594
|
<?xml version='1.0'?>
|
2595
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
2595
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
2596
2596
|
<preface>
|
2597
2597
|
<foreword id='fwd'>
|
2598
2598
|
<p>
|
@@ -2661,6 +2661,9 @@ INPUT
|
|
2661
2661
|
<xref target="N8"/>
|
2662
2662
|
<xref target="N9"/>
|
2663
2663
|
<xref target="N10"/>
|
2664
|
+
<xref target="N11"/>
|
2665
|
+
<xref target="N12"/>
|
2666
|
+
<xref target="N13"/>
|
2664
2667
|
</p>
|
2665
2668
|
</foreword>
|
2666
2669
|
<introduction id="intro">
|
@@ -2694,11 +2697,20 @@ INPUT
|
|
2694
2697
|
<figure id="N10" subsequence="C"> <name>Split-it-right sample divider</name>
|
2695
2698
|
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png"/>
|
2696
2699
|
</figure>
|
2700
|
+
<figure id="N11" number="A.1"> <name>Split-it-right sample divider</name>
|
2701
|
+
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png"/>
|
2702
|
+
</figure>
|
2703
|
+
<figure id="N12"> <name>Split-it-right sample divider</name>
|
2704
|
+
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png"/>
|
2705
|
+
</figure>
|
2706
|
+
<figure id="N13" number="100"> <name>Split-it-right sample divider</name>
|
2707
|
+
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png"/>
|
2708
|
+
</figure>
|
2697
2709
|
</introduction>
|
2698
2710
|
</iso-standard>
|
2699
2711
|
INPUT
|
2700
2712
|
<?xml version='1.0'?>
|
2701
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
2713
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
2702
2714
|
<preface>
|
2703
2715
|
<foreword id='fwd'>
|
2704
2716
|
<p>
|
@@ -2712,6 +2724,9 @@ INPUT
|
|
2712
2724
|
<xref target='N8'>Figure 9d</xref>
|
2713
2725
|
<xref target='N9'>Figure 20f</xref>
|
2714
2726
|
<xref target='N10'>Figure 20g</xref>
|
2727
|
+
<xref target='N11'>Figure A.1</xref>
|
2728
|
+
<xref target='N12'>Figure A.2</xref>
|
2729
|
+
<xref target='N13'>Figure 100</xref>
|
2715
2730
|
</p>
|
2716
2731
|
</foreword>
|
2717
2732
|
<introduction id='intro'>
|
@@ -2755,6 +2770,19 @@ INPUT
|
|
2755
2770
|
<name>Figure 20g — Split-it-right sample divider</name>
|
2756
2771
|
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
2757
2772
|
</figure>
|
2773
|
+
<figure id='N11' number='A.1'>
|
2774
|
+
<name>Figure A.1 — Split-it-right sample divider</name>
|
2775
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
2776
|
+
</figure>
|
2777
|
+
<figure id='N12'>
|
2778
|
+
<name>Figure A.2 — Split-it-right sample divider</name>
|
2779
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
2780
|
+
</figure>
|
2781
|
+
<figure id='N13' number='100'>
|
2782
|
+
<name>Figure 100 — Split-it-right sample divider</name>
|
2783
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
2784
|
+
</figure>
|
2785
|
+
|
2758
2786
|
</introduction>
|
2759
2787
|
</preface>
|
2760
2788
|
</iso-standard>
|
data/spec/spec_helper.rb
CHANGED
@@ -29,6 +29,10 @@ def xmlpp(x)
|
|
29
29
|
s
|
30
30
|
end
|
31
31
|
|
32
|
+
def metadata(x)
|
33
|
+
Hash[x.sort].delete_if{ |k, v| v.nil? || v.respond_to?(:empty?) && v.empty? }
|
34
|
+
end
|
35
|
+
|
32
36
|
def strip_guid(x)
|
33
37
|
x.gsub(%r{ id="_[^"]+"}, ' id="_"').gsub(%r{ target="_[^"]+"}, ' target="_"').
|
34
38
|
gsub(%r( href="#[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{13}"), ' href="#_"').
|
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.2.
|
4
|
+
version: 1.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciimath
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: 1.1.0
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: relaton-cli
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: rake
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -352,6 +366,7 @@ files:
|
|
352
366
|
- lib/isodoc/metadata.rb
|
353
367
|
- lib/isodoc/metadata_date.rb
|
354
368
|
- lib/isodoc/pdf_convert.rb
|
369
|
+
- lib/isodoc/presentation_function/bibdata.rb
|
355
370
|
- lib/isodoc/presentation_function/block.rb
|
356
371
|
- lib/isodoc/presentation_function/inline.rb
|
357
372
|
- lib/isodoc/presentation_function/section.rb
|