isodoc 2.0.2 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) 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 +18 -6
  5. data/lib/isodoc/html_function/html.rb +6 -0
  6. data/lib/isodoc/i18n.rb +20 -7
  7. data/lib/isodoc/metadata.rb +1 -1
  8. data/lib/isodoc/metadata_contributor.rb +1 -1
  9. data/lib/isodoc/presentation_function/bibdata.rb +26 -9
  10. data/lib/isodoc/presentation_function/block.rb +24 -0
  11. data/lib/isodoc/presentation_function/image.rb +3 -4
  12. data/lib/isodoc/presentation_function/inline.rb +118 -76
  13. data/lib/isodoc/presentation_function/math.rb +1 -0
  14. data/lib/isodoc/presentation_function/xrefs.rb +100 -0
  15. data/lib/isodoc/presentation_xml_convert.rb +1 -0
  16. data/lib/isodoc/version.rb +1 -1
  17. data/lib/isodoc/word_function/body.rb +11 -1
  18. data/lib/isodoc/word_function/postprocess.rb +4 -6
  19. data/lib/isodoc/word_function/postprocess_cover.rb +82 -1
  20. data/lib/isodoc/xref/xref_anchor.rb +1 -0
  21. data/lib/isodoc/xref/xref_gen.rb +2 -1
  22. data/lib/isodoc/xref/xref_sect_gen.rb +14 -8
  23. data/lib/isodoc/xslfo_convert.rb +19 -19
  24. data/lib/isodoc-yaml/i18n-ar.yaml +11 -0
  25. data/lib/isodoc-yaml/i18n-de.yaml +11 -0
  26. data/lib/isodoc-yaml/i18n-en.yaml +11 -0
  27. data/lib/isodoc-yaml/i18n-es.yaml +11 -0
  28. data/lib/isodoc-yaml/i18n-fr.yaml +11 -0
  29. data/lib/isodoc-yaml/i18n-ru.yaml +11 -0
  30. data/lib/isodoc-yaml/i18n-zh-Hans.yaml +11 -0
  31. data/spec/isodoc/blocks_spec.rb +13 -77
  32. data/spec/isodoc/inline_spec.rb +565 -22
  33. data/spec/isodoc/metadata_spec.rb +1 -1
  34. data/spec/isodoc/postproc_spec.rb +466 -2
  35. data/spec/isodoc/presentation_xml_spec.rb +380 -78
  36. data/spec/isodoc/ref_spec.rb +96 -11
  37. data/spec/isodoc/section_spec.rb +1 -2
  38. data/spec/isodoc/table_spec.rb +1 -1
  39. data/spec/isodoc/terms_spec.rb +8 -8
  40. data/spec/isodoc/xref_spec.rb +71 -1190
  41. data/spec/isodoc/xslfo_convert_spec.rb +12 -7
  42. metadata +3 -2
@@ -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>