isodoc 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/convert.rb +36 -18
  3. data/lib/isodoc/function/inline.rb +24 -13
  4. data/lib/isodoc/function/references.rb +1 -1
  5. data/lib/isodoc/i18n.rb +20 -7
  6. data/lib/isodoc/metadata_contributor.rb +1 -1
  7. data/lib/isodoc/presentation_function/bibdata.rb +26 -9
  8. data/lib/isodoc/presentation_function/inline.rb +111 -75
  9. data/lib/isodoc/presentation_function/math.rb +1 -0
  10. data/lib/isodoc/presentation_function/xrefs.rb +100 -0
  11. data/lib/isodoc/version.rb +1 -1
  12. data/lib/isodoc/word_function/body.rb +11 -1
  13. data/lib/isodoc/word_function/postprocess.rb +4 -6
  14. data/lib/isodoc/word_function/postprocess_cover.rb +82 -1
  15. data/lib/isodoc/xref/xref_anchor.rb +1 -0
  16. data/lib/isodoc/xref/xref_gen.rb +2 -1
  17. data/lib/isodoc/xref/xref_sect_gen.rb +14 -8
  18. data/lib/isodoc/xslfo_convert.rb +19 -19
  19. data/lib/isodoc-yaml/i18n-ar.yaml +11 -0
  20. data/lib/isodoc-yaml/i18n-de.yaml +11 -0
  21. data/lib/isodoc-yaml/i18n-en.yaml +11 -0
  22. data/lib/isodoc-yaml/i18n-es.yaml +11 -0
  23. data/lib/isodoc-yaml/i18n-fr.yaml +11 -0
  24. data/lib/isodoc-yaml/i18n-ru.yaml +11 -0
  25. data/lib/isodoc-yaml/i18n-zh-Hans.yaml +11 -0
  26. data/spec/isodoc/blocks_spec.rb +1 -1
  27. data/spec/isodoc/inline_spec.rb +528 -22
  28. data/spec/isodoc/metadata_spec.rb +1 -1
  29. data/spec/isodoc/postproc_spec.rb +466 -2
  30. data/spec/isodoc/presentation_xml_spec.rb +139 -0
  31. data/spec/isodoc/ref_spec.rb +7 -7
  32. data/spec/isodoc/section_spec.rb +1 -2
  33. data/spec/isodoc/terms_spec.rb +8 -8
  34. data/spec/isodoc/xref_spec.rb +60 -1188
  35. data/spec/isodoc/xslfo_convert_spec.rb +12 -7
  36. metadata +3 -2
@@ -731,14 +731,14 @@ RSpec.describe IsoDoc do
731
731
  <div>
732
732
  <h1 class='ForewordTitle'>Foreword</h1>
733
733
  <p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
734
- <a href='#ISO712'>[110]</a>
735
- <a href='#ISBN'>[1]</a>
736
- <a href='#ISSN'>[2]</a>
734
+ [110]
735
+ [1]
736
+ [2]
737
737
  <a href='#ISO16634'>ISO 16634:-- (all parts)</a>
738
- <a href='#ref1'>ICC/167</a>
739
- <a href='#ref10'>[10]</a>
740
- <a href='#ref12'>Citn</a>
741
- <a href='#zip_ffs'>[5]</a>
738
+ ICC/167
739
+ [10]
740
+ Citn
741
+ [5]
742
742
  </p>
743
743
  </div>
744
744
  <p class='zzSTDTitle1'/>
@@ -1,7 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
3
  RSpec.describe IsoDoc do
4
- =begin
5
4
  it "processes prefatory blocks" do
6
5
  input = <<~INPUT
7
6
  <iso-standard xmlns="http://riboseinc.com/isoxml">
@@ -1496,7 +1495,7 @@ RSpec.describe IsoDoc do
1496
1495
  .new({ suppressheadingnumbers: true })
1497
1496
  .convert("test", input, true))).to be_equivalent_to xmlpp(output)
1498
1497
  end
1499
- =end
1498
+
1500
1499
  it "processes floating titles" do
1501
1500
  input = <<~INPUT
1502
1501
  <iso-standard xmlns="http://riboseinc.com/isoxml">
@@ -137,9 +137,9 @@ RSpec.describe IsoDoc do
137
137
  PRESXML
138
138
 
139
139
  html = <<~"OUTPUT"
140
- #{HTML_HDR}
140
+ #{HTML_HDR}
141
141
  <p class="zzSTDTitle1"/>
142
- <div id="_terms_and_definitions"><h1>1.&#160; Terms and Definitions</h1><p>For the purposes of this document, the following terms and definitions apply.</p><p class="TermNum" id="paddy1">1.1.</p><p class="Terms" style="text-align:left;"><b>paddy</b>, &lt;in agriculture, dated&gt;</p><p>[SOURCE: <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>, modified
142
+ <div id="_terms_and_definitions"><h1>1.&#160; Terms and Definitions</h1><p>For the purposes of this document, the following terms and definitions apply.</p><p class="TermNum" id="paddy1">1.1.</p><p class="Terms" style="text-align:left;"><b>paddy</b>, &lt;in agriculture, dated&gt;</p><p>[SOURCE: ISO 7301:2011, Clause 3.1, modified
143
143
  &#8211;
144
144
  The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]</p>
145
145
 
@@ -171,17 +171,17 @@ RSpec.describe IsoDoc do
171
171
  </div>
172
172
  <div id="_671a1994-4783-40d0-bc81-987d06ffb74e" class="Note" style="page-break-after: avoid;page-break-inside: avoid;"><p>Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div>
173
173
  <div id="_671a1994-4783-40d0-bc81-987d06ffb74f" class="Note"><p>Note 2 to entry: <ul><li>A</li></ul><p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></p></div>
174
- <p>[SOURCE: <a href="#ISO7301">ISO 7301:2011, 3.1</a>
175
- <a href="#ISO7301">ISO 7301:2011, clause 3.1</a>]</p></div>
174
+ <p>[SOURCE: ISO 7301:2011, 3.1
175
+ ISO 7301:2011, clause 3.1]</p></div>
176
176
  </div>
177
177
  </body>
178
178
  </html>
179
179
  OUTPUT
180
180
 
181
181
  word = <<~"WORD"
182
- #{WORD_HDR}
182
+ #{WORD_HDR}
183
183
  <p class="zzSTDTitle1"/>
184
- <div id="_terms_and_definitions"><h1>1.<span style="mso-tab-count:1">&#160; </span>Terms and Definitions</h1><p>For the purposes of this document, the following terms and definitions apply.</p><p class="TermNum" id="paddy1">1.1.</p><p class="Terms" style="text-align:left;"><b>paddy</b>, &lt;in agriculture, dated&gt;</p><p>[SOURCE: <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>, modified
184
+ <div id="_terms_and_definitions"><h1>1.<span style="mso-tab-count:1">&#160; </span>Terms and Definitions</h1><p>For the purposes of this document, the following terms and definitions apply.</p><p class="TermNum" id="paddy1">1.1.</p><p class="Terms" style="text-align:left;"><b>paddy</b>, &lt;in agriculture, dated&gt;</p><p>[SOURCE: ISO 7301:2011, Clause 3.1, modified
185
185
  &#8211;
186
186
  The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]</p>
187
187
 
@@ -213,8 +213,8 @@ RSpec.describe IsoDoc do
213
213
  </div>
214
214
  <div id="_671a1994-4783-40d0-bc81-987d06ffb74e" class="Note" style="page-break-after: avoid;page-break-inside: avoid;"><p class="Note">Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div>
215
215
  <div id="_671a1994-4783-40d0-bc81-987d06ffb74f" class="Note"><p class="Note">Note 2 to entry: <ul><li>A</li></ul><p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></p></div>
216
- <p>[SOURCE: <a href="#ISO7301">ISO 7301:2011, 3.1</a>
217
- <a href="#ISO7301">ISO 7301:2011, clause 3.1</a>]</p></div>
216
+ <p>[SOURCE: ISO 7301:2011, 3.1
217
+ ISO 7301:2011, clause 3.1]</p></div>
218
218
  </div>
219
219
  </body>
220
220
  </html>