metanorma-iso 2.1.1 → 2.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/lib/html2doc/lists.rb +145 -10
  3. data/lib/isodoc/iso/base_convert.rb +10 -0
  4. data/lib/isodoc/iso/html/html_iso_titlepage.html +2 -0
  5. data/lib/isodoc/iso/html/isodoc-dis.css +173 -257
  6. data/lib/isodoc/iso/html/isodoc-dis.scss +173 -249
  7. data/lib/isodoc/iso/html/isodoc.css +38 -13
  8. data/lib/isodoc/iso/html/isodoc.scss +38 -12
  9. data/lib/isodoc/iso/html/style-human.css +14 -1
  10. data/lib/isodoc/iso/html/style-human.scss +10 -1
  11. data/lib/isodoc/iso/html/style-iso.css +35 -23
  12. data/lib/isodoc/iso/html/style-iso.scss +31 -23
  13. data/lib/isodoc/iso/html/word_iso_intro-dis.html +1 -6
  14. data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +24 -13
  15. data/lib/isodoc/iso/html/word_iso_titlepage-prf.html +58 -0
  16. data/lib/isodoc/iso/html/word_iso_titlepage.html +6 -2
  17. data/lib/isodoc/iso/html_convert.rb +5 -0
  18. data/lib/isodoc/iso/i18n-en.yaml +32 -4
  19. data/lib/isodoc/iso/i18n-fr.yaml +29 -3
  20. data/lib/isodoc/iso/i18n-ru.yaml +32 -4
  21. data/lib/isodoc/iso/i18n-zh-Hans.yaml +32 -3
  22. data/lib/isodoc/iso/i18n.rb +1 -1
  23. data/lib/isodoc/iso/iso.amendment.xsl +750 -307
  24. data/lib/isodoc/iso/iso.international-standard.xsl +750 -307
  25. data/lib/isodoc/iso/metadata.rb +63 -63
  26. data/lib/isodoc/iso/presentation_bibdata.rb +74 -0
  27. data/lib/isodoc/iso/presentation_xml_convert.rb +15 -4
  28. data/lib/isodoc/iso/presentation_xref.rb +8 -2
  29. data/lib/isodoc/iso/sections.rb +1 -1
  30. data/lib/isodoc/iso/word_cleanup.rb +3 -0
  31. data/lib/isodoc/iso/word_convert.rb +6 -3
  32. data/lib/isodoc/iso/word_dis_cleanup.rb +243 -0
  33. data/lib/isodoc/iso/word_dis_convert.rb +47 -108
  34. data/lib/isodoc/iso/xref.rb +34 -6
  35. data/lib/metanorma/iso/base.rb +14 -1
  36. data/lib/metanorma/iso/biblio.rng +134 -39
  37. data/lib/metanorma/iso/boilerplate-fr.xml +3 -0
  38. data/lib/metanorma/iso/boilerplate-ru.xml +3 -0
  39. data/lib/metanorma/iso/boilerplate.xml +3 -0
  40. data/lib/metanorma/iso/cleanup.rb +53 -13
  41. data/lib/metanorma/iso/front.rb +38 -6
  42. data/lib/metanorma/iso/front_id.rb +2 -0
  43. data/lib/metanorma/iso/isodoc.rng +32 -0
  44. data/lib/metanorma/iso/isostandard.rng +32 -12
  45. data/lib/metanorma/iso/validate_section.rb +0 -12
  46. data/lib/metanorma/iso/version.rb +1 -1
  47. data/spec/isodoc/amd_spec.rb +4 -30
  48. data/spec/isodoc/blocks_spec.rb +499 -2
  49. data/spec/isodoc/i18n_spec.rb +145 -80
  50. data/spec/isodoc/iso_spec.rb +50 -169
  51. data/spec/isodoc/metadata_spec.rb +223 -83
  52. data/spec/isodoc/postproc_spec.rb +41 -5
  53. data/spec/isodoc/section_spec.rb +9 -9
  54. data/spec/isodoc/word_dis_spec.rb +1332 -146
  55. data/spec/isodoc/xref_spec.rb +87 -13
  56. data/spec/metanorma/amd_spec.rb +39 -23
  57. data/spec/metanorma/base_spec.rb +174 -44
  58. data/spec/metanorma/blocks_spec.rb +21 -0
  59. data/spec/metanorma/cleanup_spec.rb +196 -196
  60. data/spec/metanorma/lists_spec.rb +2 -2
  61. data/spec/metanorma/section_spec.rb +2 -2
  62. data/spec/metanorma/validate_spec.rb +8 -19
  63. data/spec/spec_helper.rb +10 -7
  64. data/spec/vcr_cassettes/withdrawn_iso.yml +30 -30
  65. metadata +6 -8
  66. data/docs/asciiiso-syntax.adoc +0 -307
  67. data/docs/guidance.adoc +0 -487
  68. data/docs/navigation.adoc +0 -23
  69. data/docs/quickstart.adoc +0 -179
  70. data/lib/isodoc/iso/presentation_inline.rb +0 -90
@@ -0,0 +1,58 @@
1
+ <p class="zzCover" align="right" style='text-align:right'><span lang="EN-GB"><span style='mso-no-proof:yes'><b>{{ docnumber_reference }}</b></span></span></p>
2
+
3
+ {% if revdate %}
4
+ {% assign doc_date = revdate %}
5
+ {% elsif publisheddate %}
6
+ {% assign doc_date = publisheddate %}
7
+ {% elsif issueddate %}
8
+ {% assign doc_date = issueddate %}
9
+ {% elsif createddate %}
10
+ {% assign doc_date = createddate %}
11
+ {% endif %}
12
+
13
+ {% if doc_date %}
14
+ <p class="zzCover" align="right" style='text-align:right'><span lang="EN-GB">Date: <span style='mso-no-proof:yes'><b>{{ doc_date }}</b></span></span></p>
15
+ {% endif %}
16
+
17
+ <p class="zzCover" style='font-weight:normal;'><span lang="EN-GB">{{agency}}/{{ editorialgroup | join: "/" }}</span></p>
18
+
19
+ <!--
20
+ {% if doctitleamdlabel %}
21
+ <p class="zzCover"><b>{{ doctitleamdlabel }}</b></p>
22
+ {% endif %}
23
+
24
+ {% if doctitlecorrlabel %}
25
+ <p class="zzCover"><b>{{ doctitlecorrlabel }}</b></p>
26
+ {% endif %}
27
+ -->
28
+
29
+ {% if secretariat %}
30
+ <p class="zzCover" style='font-weight:normal;'><span lang="EN-GB">{{ labels["secretariat"] }}: <span>{{ secretariat }}</span></span></p>
31
+ {% endif %}
32
+
33
+ <p class="zzCover">
34
+ <span lang="EN-GB"><b>{{ doctitleintro }}{% if doctitleintro and doctitlemain %} &#x2014; {% endif %}{{ doctitlemain }}{% if doctitlemain and doctitlepart %} &#x2014; {% endif %}{% if doctitlepart %}{% if doctitlepartlabel %}{{ doctitlepartlabel }}: {% endif %}{{ doctitlepart }}</span>{% endif %}</b>
35
+ </p>
36
+ {% if doctitleamdlabel %}
37
+ <p class="zzCover"><b>{{ doctitleamdlabel }}{% if doctitleamd %}: {{ doctitleamd }}{% endif %}</b></p>
38
+ {% endif %}
39
+ {% if doctitlecorrlabel %}
40
+ <p class="zzCover"><b>{{ doctitlecorrlabel }}</b></p>
41
+ {% endif %}
42
+
43
+ <p class="zzCover" style='font-weight:normal;'><i>{{ docsubtitleintro }}{% if docsubtitleintro and docsubtitlemain %} &#x2014; {% endif %}{{ docsubtitlemain }}{% if docsubtitlemain and docsubtitlepart %} &#x2014; {% endif %}{% if docsubtitlepart %}{% if docsubtitlepartlabel %}{{ docsubtitlepartlabel }}: {% endif %}{{ docsubtitlepart }}{% endif %}</i>
44
+ </p>
45
+ {% if docsubtitleamdlabel %}
46
+ <p class="zzCover" style='font-weight:normal;'><i>{{ docsubtitleamdlabel }}{% if docsubtitleamd %}: {{ docsubtitleamd }}{% endif %}</i></p>
47
+ {% endif %}
48
+ {% if docsubtitlecorrlabel %}
49
+ <p class="zzCover" style='font-weight:normal;'><i>{{ docsubtitlecorrlabel }}</i></p>
50
+ {% endif %}
51
+
52
+ <div class="coverpage-warning" id="coverpage-note-destination"/>
53
+
54
+ </div>
55
+
56
+ <!--</div>-->
57
+
58
+
@@ -72,16 +72,20 @@ style='mso-no-proof:yes'>{{ agency }}&#xa0;{{ editorialgroup | join: "/" }}</spa
72
72
 
73
73
 
74
74
  <p class="MsoNormal" style='margin-top:100.0pt'><span lang="EN-GB"><o:p>&#xa0;</o:p></span></p>
75
-
75
+ {% if unpublished %}
76
76
  <div style='mso-element:para-border-div;border:solid windowtext 1.0pt;
77
77
  mso-border-alt:solid windowtext .5pt;padding:1.0pt 4.0pt 1.0pt 4.0pt;
78
78
  margin-left:4.25pt;margin-right:4.25pt'>
79
79
 
80
80
  <p class="MsoNormal" align="center" style='text-align:center;border:none;
81
81
  mso-border-alt:solid windowtext .5pt;padding:0cm;mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span
82
- lang="EN-GB" style='font-size:40.0pt'>{% if unpublished %}{{ stageabbr }} stage{% endif %}<o:p></o:p></span></p>
82
+ lang="EN-GB" style='font-size:40.0pt'>{{ stageabbr }} stage<o:p></o:p></span></p>
83
83
 
84
84
  </div>
85
+ {% else %}
86
+ <p class="MsoNormal" align="center" style='text-align:center;border:none;'><span
87
+ lang="EN-GB" style='font-size:40.0pt'><o:p></o:p></span></p>
88
+ {% endif %}
85
89
 
86
90
  <p class="MsoNormal" style='margin-bottom:6.0pt'><span lang="EN-GB"><o:p>&#xa0;</o:p></span></p>
87
91
 
@@ -112,6 +112,11 @@ module IsoDoc
112
112
  end
113
113
  end
114
114
 
115
+ def ol_attrs(node)
116
+ ret = super
117
+ ret.merge(class: OL_STYLE.invert[ret[:type]])
118
+ end
119
+
115
120
  include BaseConvert
116
121
  include Init
117
122
  end
@@ -40,9 +40,37 @@ stage_dict:
40
40
  "10": New work item proposal
41
41
  "20": Working draft
42
42
  "30": Committee draft
43
- "40": Draft
44
- "50": Final draft
45
- "60": International standard
43
+ "40":
44
+ international-standard: Draft International Standard
45
+ technical-specification: Draft Technical Specification
46
+ technical-report: Draft Technical Report
47
+ publicly-available-specification: Draft Publicly Available Specification
48
+ international-workshop-agreement: Draft International Workshop Agreement
49
+ guide: Draft Guide
50
+ amendment: Draft Amendment
51
+ technical-corrigendum: Draft Technical Corrigendum
52
+ directive: Draft Directive
53
+ "50":
54
+ international-standard: Final Draft International Standard
55
+ technical-specification: Final Draft Technical Specification
56
+ technical-report: Final Draft Technical Report
57
+ publicly-available-specification: Final Draft Publicly Available Specification
58
+ international-workshop-agreement: Final Draft International Workshop Agreement
59
+ guide: Final Draft Guide
60
+ amendment: Final Draft Amendment
61
+ technical-corrigendum: Final Draft Technical Corrigendum
62
+ directive: Final Draft Directive
63
+ "60":
64
+ international-standard: International Standard
65
+ technical-specification: Technical Specification
66
+ technical-report: Technical Report
67
+ publicly-available-specification: Publicly Available Specification
68
+ international-workshop-agreement: International Workshop Agreement
69
+ guide: Guide
70
+ amendment: Amendment
71
+ technical-corrigendum: Technical Corrigendum
72
+ directive: Directive
46
73
  "90": Review
47
74
  "95": Withdrawal
48
-
75
+ locality:
76
+ appendix: Appendix
@@ -37,8 +37,34 @@ stage_dict:
37
37
  "10": Nouvelle proposition d'élément de travail
38
38
  "20": Brouillon de travail
39
39
  "30": Projet de comité
40
- "40": Brouillon
41
- "50": Version finale
42
- "60": Norme internationale
40
+ "40":
41
+ international-standard: Brouillon de la norme internationale
42
+ technical-specification: Brouillon de la spécification technique
43
+ technical-report: Brouillon du rapport technique
44
+ publicly-available-specification: Brouillon de la spécification disponible publiquement
45
+ international-workshop-agreement: Brouillon de l’accord internationale d’atelier
46
+ guide: Brouillon du guide
47
+ amendment: Brouillon de l’amendement
48
+ technical-corrigendum: Brouillon du rectificatif technique
49
+ "50":
50
+ international-standard: Version finale de la norme internationale
51
+ technical-specification: Version finale de la spécification technique
52
+ technical-report: Version finale du rapport technique
53
+ publicly-available-specification: Version finale de la spécification disponible publiquement
54
+ international-workshop-agreement: Version finale de l’accord internationale d’atelier
55
+ guide: Version finale du guide
56
+ amendment: Version finale de l’amendement
57
+ technical-corrigendum: Version finale du rectificatif technique
58
+ "60":
59
+ international-standard: Norme internationale
60
+ technical-specification: Spécification technique
61
+ technical-report: Rapport technique
62
+ publicly-available-specification: Spécification disponible publiquement
63
+ international-workshop-agreement: Accord internationale d’atelier
64
+ guide: Guide
65
+ amendment: Amendement
66
+ technical-corrigendum: Rectificatif technique
43
67
  "90": Révision
44
68
  "95": Retrait
69
+ locality:
70
+ appendix: Appendice
@@ -38,9 +38,37 @@ stage_dict:
38
38
  "10": Предложение нового рабочего элемента
39
39
  "20": Рабочий проект
40
40
  "30": Проект комитета
41
- "40": Проект Международного стандарта
42
- "50": Окончательный проект Международного стандарта
43
- "60": Международный стандарт
41
+ "40":
42
+ international-standard: Проект Международного стандарта
43
+ technical-specification: Проект Технической Спецификации
44
+ technical-report: Проект Технического Отчета
45
+ publicly-available-specification: Проект Общедоступной Спецификации
46
+ international-workshop-agreement: Проект Соглашения Международного Семинара
47
+ guide: Проект Руководства
48
+ amendment: Проект Поправки
49
+ technical-corrigendum: Проект Технического Исправления
50
+ directive: Проект Директивы
51
+ "50":
52
+ international-standard: Окончательный проект Международного стандарта
53
+ technical-specification: Окончательный проект Технической Спецификации
54
+ technical-report: Окончательный проект Технического Отчета
55
+ publicly-available-specification: Окончательный проект Общедоступной Спецификации
56
+ international-workshop-agreement: Окончательный проект Соглашения Международного Семинара
57
+ guide: Окончательный проект Руководства
58
+ amendment: Окончательный проект Поправки
59
+ technical-corrigendum: Окончательный проект Технического Исправления
60
+ directive: Окончательный проект Директивы
61
+ "60":
62
+ international-standard: Международный Стандарт
63
+ technical-specification: Техническая Спецификация
64
+ technical-report: Технический Отчет
65
+ publicly-available-specification: Общедоступная Спецификация
66
+ international-workshop-agreement: Соглашение Международного Семинара
67
+ guide: Руководство
68
+ amendment: Поправка
69
+ technical-corrigendum: Техническое Исправление
70
+ directive: Директива
44
71
  "90": Пересмотр
45
72
  "95": Отмена
46
-
73
+ locality:
74
+ appendix: Приложение
@@ -35,8 +35,37 @@ stage_dict:
35
35
  "10": 新工作项提案
36
36
  "20": 工作草案
37
37
  "30": 委员会草案
38
- "40": 草稿
39
- "50": 最终草案
40
- "60": 国际标准
38
+ "40":
39
+ international-standard: 国际标准草稿
40
+ technical-specification: 技术规格草稿
41
+ technical-report: 技术报告草稿
42
+ publicly-available-specification: 公开可用的规范草稿
43
+ international-workshop-agreement: 国际研讨会协议草稿
44
+ guide: 指南草稿
45
+ amendment: 修正草稿
46
+ technical-corrigendum: 技术勘误草稿
47
+ directive: 指令草稿
48
+ "50":
49
+ international-standard: 国际标准最终草案
50
+ technical-specification: 技术规格最终草案
51
+ technical-report: 技术报告最终草案
52
+ publicly-available-specification: 公开可用的规范最终草案
53
+ international-workshop-agreement: 国际研讨会协议最终草案
54
+ guide: 指南最终草案
55
+ amendment: 修正最终草案
56
+ technical-corrigendum: 技术勘误最终草案
57
+ directive: 指令最终草案
58
+ "60":
59
+ international-standard: 国际标准
60
+ technical-specification: 技术规格
61
+ technical-report: 技术报告
62
+ publicly-available-specification: 公开可用的规范
63
+ international-workshop-agreement: 国际研讨会协议
64
+ guide: 指南
65
+ amendment: 修正
66
+ technical-corrigendum: 技术勘误
67
+ directive: 指令
41
68
  "90": 回顾
42
69
  "95": 提款
70
+ locality:
71
+ appendix: 附录
@@ -13,7 +13,7 @@ module IsoDoc
13
13
  load_file("i18n-zh-Hans.yaml")
14
14
  else load_file("i18n-en.yaml")
15
15
  end
16
- super.merge(y)
16
+ super.deep_merge(y)
17
17
  end
18
18
  end
19
19
  end