isodoc 2.0.8 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/isodoc.gemspec +4 -2
- data/lib/isodoc/convert.rb +13 -5
- data/lib/isodoc/css.rb +11 -10
- data/lib/isodoc/function/blocks.rb +0 -39
- data/lib/isodoc/function/blocks_example_note.rb +36 -1
- data/lib/isodoc/function/inline.rb +4 -0
- data/lib/isodoc/function/references.rb +4 -17
- data/lib/isodoc/function/section.rb +5 -0
- data/lib/isodoc/function/to_word_html.rb +7 -11
- data/lib/isodoc/html_function/postprocess.rb +16 -2
- data/lib/isodoc/metadata.rb +2 -1
- data/lib/isodoc/presentation_function/bibdata.rb +50 -4
- data/lib/isodoc/presentation_function/block.rb +13 -1
- data/lib/isodoc/presentation_function/section.rb +38 -2
- data/lib/isodoc/presentation_xml_convert.rb +7 -2
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_function/postprocess.rb +4 -4
- data/lib/isodoc/word_function/postprocess_cover.rb +14 -0
- data/lib/isodoc/word_function/table.rb +12 -10
- data/lib/isodoc/xref/xref_anchor.rb +1 -1
- data/lib/isodoc/xref/xref_counter.rb +4 -1
- data/lib/isodoc/xref/xref_gen_seq.rb +3 -3
- data/lib/isodoc/xref/xref_sect_gen.rb +34 -36
- data/lib/isodoc/xref.rb +19 -8
- data/lib/isodoc-yaml/i18n-ar.yaml +9 -0
- data/lib/isodoc-yaml/i18n-de.yaml +13 -0
- data/lib/isodoc-yaml/i18n-en.yaml +5 -0
- data/lib/isodoc-yaml/i18n-es.yaml +11 -0
- data/lib/isodoc-yaml/i18n-fr.yaml +12 -1
- data/lib/isodoc-yaml/i18n-ru.yaml +13 -0
- data/lib/isodoc-yaml/i18n-zh-Hans.yaml +5 -0
- data/lib/relaton/render/config.yml +4 -0
- data/lib/relaton/render/general.rb +35 -0
- data/spec/assets/i18n.yaml +6 -0
- data/spec/isodoc/blocks_spec.rb +249 -62
- data/spec/isodoc/i18n_spec.rb +266 -197
- data/spec/isodoc/inline_spec.rb +81 -107
- data/spec/isodoc/metadata_spec.rb +5 -3
- data/spec/isodoc/postproc_spec.rb +539 -397
- data/spec/isodoc/presentation_xml_spec.rb +107 -0
- data/spec/isodoc/ref_spec.rb +142 -92
- data/spec/isodoc/section_spec.rb +4 -4
- data/spec/isodoc/xref_numbering_spec.rb +31 -0
- data/spec/isodoc/xref_spec.rb +106 -106
- metadata +24 -8
data/spec/isodoc/xref_spec.rb
CHANGED
@@ -262,22 +262,22 @@ RSpec.describe IsoDoc do
|
|
262
262
|
</iso-standard>
|
263
263
|
INPUT
|
264
264
|
output = <<~OUTPUT
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
265
|
+
<foreword id='fwd' displayorder="1">
|
266
|
+
<p>
|
267
|
+
<xref target='N1'>Figure 1</xref>
|
268
|
+
<xref target='N2'>Figure (??)</xref>
|
269
|
+
<xref target='N'>Figure 2</xref>
|
270
|
+
<xref target='note1'>Figure 3</xref>
|
271
|
+
<xref target='note3'>Figure 4</xref>
|
272
|
+
<xref target='note4'>Figure 5</xref>
|
273
|
+
<xref target='note2'>Figure 6</xref>
|
274
|
+
<xref target='note51'>[note51]</xref>
|
275
|
+
<xref target='AN'>Figure A.1</xref>
|
276
|
+
<xref target='Anote1'>Figure (??)</xref>
|
277
|
+
<xref target='Anote2'>Figure A.2</xref>
|
278
|
+
<xref target='Anote3'>Figure A.3</xref>
|
279
|
+
</p>
|
280
|
+
</foreword>
|
281
281
|
OUTPUT
|
282
282
|
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
283
283
|
.convert("test", input, true))
|
@@ -824,20 +824,20 @@ RSpec.describe IsoDoc do
|
|
824
824
|
</iso-standard>
|
825
825
|
INPUT
|
826
826
|
output = <<~OUTPUT
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
827
|
+
<foreword displayorder='1'>
|
828
|
+
<p>
|
829
|
+
<xref target='N1'>Clause 1, Permission 1</xref>
|
830
|
+
<xref target='N2'>Clause 1, Permission 1-1</xref>
|
831
|
+
<xref target='N'>Clause 1, Permission 1-1-1</xref>
|
832
|
+
<xref target='Q1'>Clause 1, Requirement 1-1</xref>
|
833
|
+
<xref target='R1'>Clause 1, Recommendation 1-1</xref>
|
834
|
+
<xref target='AN1'>Permission A.1</xref>
|
835
|
+
<xref target='AN2'>Permission A.1-1</xref>
|
836
|
+
<xref target='AN'>Permission A.1-1-1</xref>
|
837
|
+
<xref target='AQ1'>Requirement A.1-1</xref>
|
838
|
+
<xref target='AR1'>Recommendation A.1-1</xref>
|
839
|
+
</p>
|
840
|
+
</foreword>
|
841
841
|
OUTPUT
|
842
842
|
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
843
843
|
.convert("test", input, true))
|
@@ -966,18 +966,18 @@ RSpec.describe IsoDoc do
|
|
966
966
|
</iso-standard>
|
967
967
|
INPUT
|
968
968
|
output = <<~OUTPUT
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
969
|
+
<foreword displayorder='1'>
|
970
|
+
<p>
|
971
|
+
<xref target='N1'>Table 1</xref>
|
972
|
+
<xref target='N2'>Table (??)</xref>
|
973
|
+
<xref target='N'>Table 2</xref>
|
974
|
+
<xref target='note1'>Table 3</xref>
|
975
|
+
<xref target='note2'>Table 4</xref>
|
976
|
+
<xref target='AN'>Table A.1</xref>
|
977
|
+
<xref target='Anote1'>Table (??)</xref>
|
978
|
+
<xref target='Anote2'>Table A.2</xref>
|
979
|
+
</p>
|
980
|
+
</foreword>
|
981
981
|
OUTPUT
|
982
982
|
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
983
983
|
.convert("test", input, true))
|
@@ -1061,13 +1061,13 @@ RSpec.describe IsoDoc do
|
|
1061
1061
|
</iso-standard>
|
1062
1062
|
INPUT
|
1063
1063
|
output = <<~OUTPUT
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1064
|
+
<foreword displayorder='1'>
|
1065
|
+
<p>
|
1066
|
+
<xref target='note1'>Clause 2.1, Note 1</xref>
|
1067
|
+
<xref target='note2'>Clause 2.1.1, Note 1</xref>
|
1068
|
+
<xref target='note3'>Clause 2.1.1, Note 2</xref>
|
1069
|
+
</p>
|
1070
|
+
</foreword>
|
1071
1071
|
OUTPUT
|
1072
1072
|
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
1073
1073
|
.convert("test", input, true))
|
@@ -1151,13 +1151,13 @@ RSpec.describe IsoDoc do
|
|
1151
1151
|
</iso-standard>
|
1152
1152
|
INPUT
|
1153
1153
|
output = <<~OUTPUT
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1154
|
+
<foreword displayorder='1'>
|
1155
|
+
<p>
|
1156
|
+
<xref target='note1'>Clause 2.1, Example</xref>
|
1157
|
+
<xref target='note2'>Clause 2.1.1, Example 1</xref>
|
1158
|
+
<xref target='note3'>Clause 2.1.1, Example 2</xref>
|
1159
|
+
</p>
|
1160
|
+
</foreword>
|
1161
1161
|
OUTPUT
|
1162
1162
|
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
1163
1163
|
.convert("test", input, true))
|
@@ -1255,31 +1255,31 @@ RSpec.describe IsoDoc do
|
|
1255
1255
|
</iso-standard>
|
1256
1256
|
INPUT
|
1257
1257
|
output = <<~OUTPUT
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1258
|
+
<foreword obligation='informative' displayorder='1'>
|
1259
|
+
<title>Foreword</title>
|
1260
|
+
<p id='A'>
|
1261
|
+
This is a preamble
|
1262
|
+
<xref target='C'>Introduction Subsection</xref>
|
1263
|
+
<xref target='C1'>Introduction, 2</xref>
|
1264
|
+
<xref target='D'>Clause 1</xref>
|
1265
|
+
<xref target='H'>Clause 3</xref>
|
1266
|
+
<xref target='I'>Clause 3.1</xref>
|
1267
|
+
<xref target='J'>Clause 3.1.1</xref>
|
1268
|
+
<xref target='K'>Clause 3.2</xref>
|
1269
|
+
<xref target='L'>Clause 4</xref>
|
1270
|
+
<xref target='M'>Clause 5</xref>
|
1271
|
+
<xref target='N'>Clause 5.1</xref>
|
1272
|
+
<xref target='O'>Clause 5.2</xref>
|
1273
|
+
<xref target='P'>Annex A</xref>
|
1274
|
+
<xref target='Q'>Annex A.1</xref>
|
1275
|
+
<xref target='Q1'>Annex A.1.1</xref>
|
1276
|
+
<xref target='QQ'>Annex B</xref>
|
1277
|
+
<xref target='QQ1'>Annex B</xref>
|
1278
|
+
<xref target='QQ2'>Annex B.1</xref>
|
1279
|
+
<xref target='R'>Clause 2</xref>
|
1280
|
+
<xref target='S'>Bibliography</xref>
|
1281
|
+
</p>
|
1282
|
+
</foreword>
|
1283
1283
|
OUTPUT
|
1284
1284
|
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
1285
1285
|
.convert("test", input, true))
|
@@ -1720,31 +1720,31 @@ RSpec.describe IsoDoc do
|
|
1720
1720
|
</iso-standard>
|
1721
1721
|
INPUT
|
1722
1722
|
output = <<~OUTPUT
|
1723
|
-
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1732
|
-
|
1733
|
-
|
1734
|
-
|
1735
|
-
|
1736
|
-
|
1737
|
-
|
1738
|
-
|
1739
|
-
|
1740
|
-
|
1741
|
-
|
1742
|
-
|
1743
|
-
|
1744
|
-
|
1745
|
-
|
1746
|
-
|
1747
|
-
|
1723
|
+
<foreword displayorder='1'>
|
1724
|
+
<p>
|
1725
|
+
<xref target='N1'>
|
1726
|
+
Introduction, Definition List:
|
1727
|
+
<stem type='MathML'>
|
1728
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
1729
|
+
<msub>
|
1730
|
+
<mrow>
|
1731
|
+
<mover accent='true'>
|
1732
|
+
<mrow>
|
1733
|
+
<mi>e</mi>
|
1734
|
+
</mrow>
|
1735
|
+
<mo>^</mo>
|
1736
|
+
</mover>
|
1737
|
+
</mrow>
|
1738
|
+
<mrow>
|
1739
|
+
<mi>r</mi>
|
1740
|
+
</mrow>
|
1741
|
+
</msub>
|
1742
|
+
</math>
|
1743
|
+
<!-- (hat e)_((r)) -->
|
1744
|
+
</stem>
|
1745
|
+
</xref>
|
1746
|
+
</p>
|
1747
|
+
</foreword>
|
1748
1748
|
OUTPUT
|
1749
1749
|
expect(xmlpp(Nokogiri::XML(IsoDoc::PresentationXMLConvert.new({})
|
1750
1750
|
.convert("test", input, true))
|
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.1.0
|
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-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciimath
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.4.0
|
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: 1.
|
40
|
+
version: 1.4.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: htmlentities
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,16 +84,16 @@ dependencies:
|
|
84
84
|
name: emf2svg
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: mathml2asciimath
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,6 +150,20 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: relaton-render
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 0.3.1
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 0.3.1
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: roman-numerals
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -490,6 +504,8 @@ files:
|
|
490
504
|
- lib/metanorma/output/base.rb
|
491
505
|
- lib/metanorma/output/utils.rb
|
492
506
|
- lib/metanorma/output/xslfo.rb
|
507
|
+
- lib/relaton/render/config.yml
|
508
|
+
- lib/relaton/render/general.rb
|
493
509
|
- spec/assets/header.html
|
494
510
|
- spec/assets/html.scss
|
495
511
|
- spec/assets/html_override.css
|