metanorma-iso 2.0.7 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/lib/asciidoctor/iso/base.rb +0 -1
  3. data/lib/asciidoctor/iso/cleanup.rb +0 -1
  4. data/lib/asciidoctor/iso/converter.rb +0 -1
  5. data/lib/asciidoctor/iso/deprecated.rb +4 -2
  6. data/lib/asciidoctor/iso/front.rb +0 -1
  7. data/lib/asciidoctor/iso/front_id.rb +0 -1
  8. data/lib/asciidoctor/iso/section.rb +0 -1
  9. data/lib/asciidoctor/iso/validate.rb +0 -1
  10. data/lib/asciidoctor/iso/validate_image.rb +0 -1
  11. data/lib/asciidoctor/iso/validate_requirements.rb +0 -1
  12. data/lib/asciidoctor/iso/validate_section.rb +0 -1
  13. data/lib/asciidoctor/iso/validate_style.rb +0 -1
  14. data/lib/asciidoctor/iso/validate_title.rb +0 -1
  15. data/lib/html2doc/lists.rb +37 -0
  16. data/lib/isodoc/iso/html/html_iso_titlepage.html +7 -2
  17. data/lib/isodoc/iso/html/isodoc-dis.css +196 -156
  18. data/lib/isodoc/iso/html/isodoc-dis.scss +193 -156
  19. data/lib/isodoc/iso/html/word_iso_intro-dis.html +7 -0
  20. data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +3 -2
  21. data/lib/isodoc/iso/html/word_iso_titlepage.html +8 -2
  22. data/lib/isodoc/iso/html/wordstyle-dis.css +204 -34
  23. data/lib/isodoc/iso/html/wordstyle-dis.scss +198 -34
  24. data/lib/isodoc/iso/i18n-en.yaml +2 -1
  25. data/lib/isodoc/iso/i18n-fr.yaml +1 -0
  26. data/lib/isodoc/iso/i18n-ru.yaml +1 -0
  27. data/lib/isodoc/iso/i18n-zh-Hans.yaml +1 -0
  28. data/lib/isodoc/iso/index.rb +1 -1
  29. data/lib/isodoc/iso/init.rb +17 -1
  30. data/lib/isodoc/iso/iso.amendment.xsl +726 -299
  31. data/lib/isodoc/iso/iso.international-standard.xsl +726 -299
  32. data/lib/isodoc/iso/metadata.rb +75 -63
  33. data/lib/isodoc/iso/presentation_inline.rb +90 -0
  34. data/lib/isodoc/iso/presentation_xml_convert.rb +39 -100
  35. data/lib/isodoc/iso/presentation_xref.rb +126 -0
  36. data/lib/isodoc/iso/word_cleanup.rb +16 -2
  37. data/lib/isodoc/iso/word_convert.rb +27 -10
  38. data/lib/isodoc/iso/word_dis_convert.rb +174 -0
  39. data/lib/isodoc/iso/xref.rb +50 -30
  40. data/lib/metanorma/iso/biblio.rng +62 -10
  41. data/lib/metanorma/iso/boilerplate-fr.xml +1 -1
  42. data/lib/metanorma/iso/boilerplate-ru.xml +1 -3
  43. data/lib/metanorma/iso/boilerplate.xml +1 -3
  44. data/lib/metanorma/iso/cleanup.rb +7 -6
  45. data/lib/metanorma/iso/front_id.rb +28 -11
  46. data/lib/metanorma/iso/isodoc.rng +56 -0
  47. data/lib/metanorma/iso/version.rb +1 -1
  48. data/lib/metanorma-iso.rb +1 -0
  49. data/lib/relaton/render/config.yml +4 -0
  50. data/lib/relaton/render/general.rb +13 -0
  51. data/metanorma-iso.gemspec +1 -1
  52. data/spec/isodoc/amd_spec.rb +15 -14
  53. data/spec/isodoc/blocks_spec.rb +286 -179
  54. data/spec/isodoc/i18n_spec.rb +296 -133
  55. data/spec/isodoc/inline_spec.rb +35 -42
  56. data/spec/isodoc/iso_spec.rb +43 -27
  57. data/spec/isodoc/postproc_spec.rb +25 -0
  58. data/spec/isodoc/ref_spec.rb +66 -69
  59. data/spec/isodoc/section_spec.rb +78 -76
  60. data/spec/isodoc/table_spec.rb +2 -2
  61. data/spec/isodoc/terms_spec.rb +2 -2
  62. data/spec/isodoc/word_dis_spec.rb +760 -0
  63. data/spec/isodoc/xref_spec.rb +51 -51
  64. data/spec/metanorma/amd_spec.rb +39 -16
  65. data/spec/metanorma/base_spec.rb +17 -9
  66. data/spec/metanorma/blocks_spec.rb +4 -4
  67. data/spec/metanorma/cleanup_spec.rb +11 -11
  68. data/spec/metanorma/section_spec.rb +3 -3
  69. data/spec/spec_helper.rb +5 -2
  70. data/spec/vcr_cassettes/withdrawn_iso.yml +26 -26
  71. metadata +11 -5
  72. data/spec/vcr_cassettes/docrels.yml +0 -385
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0ab6798337782ba38553fa7a2bff698116c2ab6a2a3f86ff1c527de2603e4c6
4
- data.tar.gz: 5fb2bd8e338ad4d7277cd6a5459ba41ad93d9dcabe88816304f437b7ba7f7704
3
+ metadata.gz: ece1ba1ab21e854c356cda66dc015f61a9b6ebdd93969e7144600093869a3775
4
+ data.tar.gz: 117895e15001e6a101dc4a255f6ce9380f10bf984edcd754203bf45ab6ab5445
5
5
  SHA512:
6
- metadata.gz: 332c563391b705ca5c237770e39a48ec8b3c6a05fa97114544ce6a0d3f26662520953afb111c4205a6b5b78fb2e449c801a7e72c684bf738fe0264fd8ad90b75
7
- data.tar.gz: 219553636a274835f7e1f44ae0818ac568947014a89958b540bae0057912f3efa686cce6c9230158090c75593807df5a47152bd69dcd056f002ff3925f402d34
6
+ metadata.gz: 8fbd1971cc910147a7bf86d14a79157981e93054f92b8598c0fc85472c39d500808cf7c45b15f6e067d8866bff30873291f35eef7d7973e15496401f0b992a11
7
+ data.tar.gz: ce54b6ce2c17355ad428dfdf63142beb9e64f79446ff6793ac03a47ab39f79d8af218e2fe6d000869dbb52cc49dd4ce884a6bab145caad897350a5fb59bf5998
@@ -1,3 +1,2 @@
1
1
  require "asciidoctor/iso/deprecated"
2
2
  require "metanorma/iso/base"
3
-
@@ -1,3 +1,2 @@
1
1
  require "asciidoctor/iso/deprecated"
2
2
  require "metanorma/iso/cleanup"
3
-
@@ -1,3 +1,2 @@
1
1
  require "asciidoctor/iso/deprecated"
2
2
  require "metanorma/iso/converter"
3
-
@@ -1,5 +1,7 @@
1
- warn "Please replace your references to Asciidoctor::ISO with Metanorma::ISO and your instances of require 'asciidoctor/iso' with require 'metanorma/iso'"
1
+ warn "Please replace your references to Asciidoctor::ISO with Metanorma::ISO "\
2
+ "and your instances of require 'asciidoctor/iso' with "\
3
+ "require 'metanorma/iso'"
2
4
 
3
- exit 127 if ENV['METANORMA_DEPRECATION_FAIL']
5
+ exit 127 if ENV["METANORMA_DEPRECATION_FAIL"]
4
6
 
5
7
  Asciidoctor::ISO = Metanorma::ISO unless defined? Asciidoctor::ISO
@@ -1,3 +1,2 @@
1
1
  require "asciidoctor/iso/deprecated"
2
2
  require "metanorma/iso/front"
3
-
@@ -1,3 +1,2 @@
1
1
  require "asciidoctor/iso/deprecated"
2
2
  require "metanorma/iso/front_id"
3
-
@@ -1,3 +1,2 @@
1
1
  require "asciidoctor/iso/deprecated"
2
2
  require "metanorma/iso/section"
3
-
@@ -1,3 +1,2 @@
1
1
  require "asciidoctor/iso/deprecated"
2
2
  require "metanorma/iso/validate"
3
-
@@ -1,3 +1,2 @@
1
1
  require "asciidoctor/iso/deprecated"
2
2
  require "metanorma/iso/validate_image"
3
-
@@ -1,3 +1,2 @@
1
1
  require "asciidoctor/iso/deprecated"
2
2
  require "metanorma/iso/validate_requirements"
3
-
@@ -1,3 +1,2 @@
1
1
  require "asciidoctor/iso/deprecated"
2
2
  require "metanorma/iso/validate_section"
3
-
@@ -1,3 +1,2 @@
1
1
  require "asciidoctor/iso/deprecated"
2
2
  require "metanorma/iso/validate_style"
3
-
@@ -1,3 +1,2 @@
1
1
  require "asciidoctor/iso/deprecated"
2
2
  require "metanorma/iso/validate_title"
3
-
@@ -0,0 +1,37 @@
1
+ class Html2Doc
2
+ class IsoDIS < ::Html2Doc
3
+ def list2para(list)
4
+ return if list.xpath("./li").empty?
5
+
6
+ list.xpath("./li").each do |l|
7
+ l.name = "p"
8
+ if m = /level(\d) lfo/.match(l["style"])
9
+ l["class"] = list2para_style(list.name, m[1])
10
+ l.xpath("./p").each do |p|
11
+ p["class"] = list2para_style(list.name, m[1])
12
+ end
13
+ end
14
+ l&.first_element_child&.name == "p" and
15
+ l.first_element_child.replace(l.first_element_child.children)
16
+ end
17
+ list.replace(list.children)
18
+ end
19
+
20
+ def list2para_style(listtype, depth)
21
+ case listtype
22
+ when "ul"
23
+ case depth
24
+ when "1" then "ListContinue1"
25
+ when "2", "3", "4" then "MsoListContinue#{depth}"
26
+ else "MsoListContinue5"
27
+ end
28
+ when "ol"
29
+ case depth
30
+ when "1" then "ListNumber1"
31
+ when "2", "3", "4" then "MsoListNumber#{depth}"
32
+ else "MsoListNumber5"
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -4,15 +4,19 @@
4
4
  <p class="coverpage_docnumber">{{ num }}</p>
5
5
  {% endfor %}
6
6
  {% else %}
7
- <p class="coverpage_docnumber">{{ docnumber_lang }} {{ draftinfo }}</p>
7
+ <p class="coverpage_docnumber">{{ docnumber_undated }} {{ draftinfo }}</p>
8
8
  {% endif %}
9
9
 
10
+ {% if edition_display %}
11
+ <p class="coverpage_docnumber">{{ edition_display | capitalize }}</p>
12
+ {% endif %}
13
+
10
14
  {% if revdate %}
11
15
  <p class="coverpage_docnumber">{{ labels["date"]}}: {{ revdate }}</p>
12
16
  {% endif %}
13
17
 
14
18
  {% if tc_docnumber.size > 0 %}
15
- <p class="coverpage_docnumber">{{ docnumber_lang }} {{ draftinfo }}</p>
19
+ <p class="coverpage_docnumber">{{ docnumber_undated }} {{ draftinfo }}</p>
16
20
  {% endif %}
17
21
 
18
22
  <p class="coverpage_techcommittee">{{ agency }}/{{ editorialgroup | join: "/" }}</p>
@@ -61,6 +65,7 @@
61
65
  <div id="boilerplate-license-destination"/>
62
66
  </div>
63
67
  {% endif %}
68
+ <div class="coverpage-warning" id="coverpage-note-destination"/>
64
69
 
65
70
  {% if ics %}
66
71
  <p><b>ICS:</b> {{ ics }}</p>