isodoc 3.1.6 → 3.1.9

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.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/css_border_parser.rb +229 -0
  3. data/lib/isodoc/css_border_parser_vars.rb +211 -0
  4. data/lib/isodoc/function/blocks.rb +1 -1
  5. data/lib/isodoc/function/blocks_example_note.rb +0 -2
  6. data/lib/isodoc/function/footnotes.rb +4 -3
  7. data/lib/isodoc/function/inline.rb +1 -0
  8. data/lib/isodoc/function/lists.rb +0 -15
  9. data/lib/isodoc/function/section.rb +6 -2
  10. data/lib/isodoc/function/section_titles.rb +2 -2
  11. data/lib/isodoc/function/table.rb +1 -1
  12. data/lib/isodoc/function/terms.rb +1 -1
  13. data/lib/isodoc/function/to_word_html.rb +4 -1
  14. data/lib/isodoc/function/utils.rb +6 -15
  15. data/lib/isodoc/html_function/postprocess.rb +1 -2
  16. data/lib/isodoc/html_function/postprocess_cover.rb +14 -5
  17. data/lib/isodoc/init.rb +12 -3
  18. data/lib/isodoc/presentation_function/autonum.rb +4 -3
  19. data/lib/isodoc/presentation_function/block.rb +50 -10
  20. data/lib/isodoc/presentation_function/concepts.rb +19 -13
  21. data/lib/isodoc/presentation_function/docid.rb +2 -1
  22. data/lib/isodoc/presentation_function/erefs.rb +1 -2
  23. data/lib/isodoc/presentation_function/footnotes.rb +4 -4
  24. data/lib/isodoc/presentation_function/ids.rb +79 -0
  25. data/lib/isodoc/presentation_function/image.rb +1 -2
  26. data/lib/isodoc/presentation_function/inline.rb +13 -7
  27. data/lib/isodoc/presentation_function/math.rb +19 -23
  28. data/lib/isodoc/presentation_function/refs.rb +1 -1
  29. data/lib/isodoc/presentation_function/section.rb +11 -10
  30. data/lib/isodoc/presentation_function/terms.rb +50 -21
  31. data/lib/isodoc/presentation_function/title.rb +1 -3
  32. data/lib/isodoc/presentation_function/xrefs.rb +2 -2
  33. data/lib/isodoc/presentation_xml_convert.rb +3 -75
  34. data/lib/isodoc/version.rb +1 -1
  35. data/lib/isodoc/word_function/comments.rb +1 -2
  36. data/lib/isodoc/word_function/footnotes.rb +0 -29
  37. data/lib/isodoc/word_function/inline.rb +1 -1
  38. data/lib/isodoc/word_function/postprocess.rb +0 -1
  39. data/lib/isodoc/xref/xref_gen_seq.rb +5 -30
  40. data/lib/isodoc/xref/xref_sect_asset.rb +44 -0
  41. data/lib/isodoc/xref/xref_sect_gen.rb +39 -37
  42. data/lib/isodoc/xref/xref_util.rb +28 -1
  43. data/lib/isodoc-yaml/i18n-ar.yaml +1 -0
  44. data/lib/isodoc-yaml/i18n-de.yaml +1 -0
  45. data/lib/isodoc-yaml/i18n-en.yaml +1 -0
  46. data/lib/isodoc-yaml/i18n-es.yaml +1 -0
  47. data/lib/isodoc-yaml/i18n-fr.yaml +1 -0
  48. data/lib/isodoc-yaml/i18n-ja.yaml +1 -0
  49. data/lib/isodoc-yaml/i18n-ru.yaml +1 -0
  50. data/lib/isodoc-yaml/i18n-zh-Hans.yaml +1 -0
  51. data/lib/isodoc.rb +1 -1
  52. metadata +6 -2
@@ -68,7 +68,7 @@ module IsoDoc
68
68
 
69
69
  SECTIONS_XPATH =
70
70
  "//foreword | //introduction | //acknowledgements | " \
71
- "//preface/abstract | " \
71
+ "//executivesummary | //preface/abstract | " \
72
72
  "//preface/terms | //preface/definitions | //preface/references | " \
73
73
  "//preface/clause | //sections/terms | //annex | " \
74
74
  "//sections/clause | //sections/definitions | " \
@@ -91,6 +91,33 @@ module IsoDoc
91
91
  CHILD_SECTIONS
92
92
  end
93
93
 
94
+ SUBCLAUSES =
95
+ "./clause | ./references | ./term | ./terms | ./definitions".freeze
96
+
97
+ def subclauses
98
+ SUBCLAUSES
99
+ end
100
+
101
+ FIRST_LVL_REQ_RULE = <<~XPATH.freeze
102
+ [not(ancestor::permission or ancestor::requirement or ancestor::recommendation)]
103
+ XPATH
104
+
105
+ FIRST_LVL_REQ = <<~XPATH.freeze
106
+ .//permission#{FIRST_LVL_REQ_RULE} | .//requirement#{FIRST_LVL_REQ_RULE} | .//recommendation#{FIRST_LVL_REQ_RULE}
107
+ XPATH
108
+
109
+ def first_lvl_req
110
+ FIRST_LVL_REQ
111
+ end
112
+
113
+ REQ_CHILDREN = <<~XPATH.freeze
114
+ ./permission | ./requirement | ./recommendation
115
+ XPATH
116
+
117
+ def req_children
118
+ REQ_CHILDREN
119
+ end
120
+
94
121
  # if hierarchically marked up node in label already,
95
122
  # leave alone, else wrap in semx
96
123
  def semx(node, label, element = "autonum")
@@ -9,6 +9,7 @@ section: قسم
9
9
  foreword: تمهيد
10
10
  abstract: ملخص
11
11
  acknowledgements: شكر
12
+ executivesummary: الملخص التنفيذي
12
13
  termsdef: مصطلحات معرفة
13
14
  termsdefsymbolsabbrev: المصطلحات والتعريفات والرموز والاختصارات
14
15
  termsdefsymbols: المصطلحات والتعريفات والرموز
@@ -9,6 +9,7 @@ introduction: Einführung
9
9
  foreword: Vorwort
10
10
  abstract: Abstrakt
11
11
  acknowledgements: Danksagung
12
+ executivesummary: Zusammenfassung
12
13
  termsdef: Begriffe und Definitionen
13
14
  termsdefsymbolsabbrev: Begriffe, Definitionen, Symbole und abgekürzte Begriffe
14
15
  termsdefsymbols: Begriffe, Definitionen und Symbole
@@ -8,6 +8,7 @@ introduction: Introduction
8
8
  foreword: Foreword
9
9
  abstract: Abstract
10
10
  acknowledgements: Acknowledgements
11
+ executivesummary: Executive summary
11
12
  termsdef: Terms and definitions
12
13
  termsdefsymbolsabbrev: Terms, definitions, symbols and abbreviated terms
13
14
  termsdefsymbols: Terms, definitions and symbols
@@ -8,6 +8,7 @@ introduction: Introducción
8
8
  foreword: Prólogo
9
9
  abstract: Resumen
10
10
  acknowledgements: Agradecimientos
11
+ executivesummary: Resumen ejecutivo
11
12
  termsdef: Términos y definiciones
12
13
  termsdefsymbolsabbrev: Términos, definiciones, símbolos y términos abreviados
13
14
  termsdefsymbols: Términos, definiciones y símbolos
@@ -8,6 +8,7 @@ introduction: Introduction
8
8
  foreword: Avant-propos
9
9
  abstract: Résumé
10
10
  acknowledgements: Remerciements
11
+ executivesummary: Résumé exécutif
11
12
  termsdef: Termes et définitions
12
13
  termsdefsymbolsabbrev: Termes, définitions, symboles et termes abrégés
13
14
  termsdefsymbols: Termes, définitions et symboles
@@ -8,6 +8,7 @@ introduction: 序文
8
8
  foreword: まえがき
9
9
  abstract: はじめに
10
10
  acknowledgements: 謝辞
11
+ executivesummary: エグゼクティブサマリー
11
12
  termsdef: 用語及び定義
12
13
  termsdefsymbolsabbrev: 用語及び定義並びに記号及び略語
13
14
  termsdefsymbols: 用語及び定義並びに記号
@@ -8,6 +8,7 @@ introduction: Введение
8
8
  foreword: Предисловие
9
9
  abstract: Реферат
10
10
  acknowledgements: Подтверждения
11
+ executivesummary: Управляющее резюме
11
12
  termsdef: Термины и определения
12
13
  termsdefsymbolsabbrev: Термины, определения, символы и сокращенные термины
13
14
  termsdefsymbols: Термины, определения и символы
@@ -8,6 +8,7 @@ introduction: 引言
8
8
  foreword: 前言
9
9
  abstract: 摘要
10
10
  acknowledgements: 致謝
11
+ executivesummary: 执行摘要
11
12
  termsdef: 术语和定义
12
13
  termsdefsymbolsabbrev: 术语、定义、符号、代号和缩略语
13
14
  termsdefsymbols: 术语、定义、符号和代号
data/lib/isodoc.rb CHANGED
@@ -5,7 +5,6 @@ require "uuidtools"
5
5
  require "base64"
6
6
  require "mime/types"
7
7
  require "image_size"
8
- require "set"
9
8
  require "html2doc"
10
9
  require "liquid"
11
10
  require "htmlentities"
@@ -22,6 +21,7 @@ require "isodoc/headlesshtml_convert"
22
21
  require "isodoc/presentation_xml_convert"
23
22
  require "isodoc/xref"
24
23
  require "isodoc/i18n"
24
+ require "isodoc/css_border_parser"
25
25
  require "metanorma/output"
26
26
  require "relaton/render-isodoc/general"
27
27
 
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: 3.1.6
4
+ version: 3.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-15 00:00:00.000000000 Z
11
+ date: 2025-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64
@@ -399,6 +399,8 @@ files:
399
399
  - lib/isodoc/common.rb
400
400
  - lib/isodoc/convert.rb
401
401
  - lib/isodoc/css.rb
402
+ - lib/isodoc/css_border_parser.rb
403
+ - lib/isodoc/css_border_parser_vars.rb
402
404
  - lib/isodoc/function.rb
403
405
  - lib/isodoc/function/blocks.rb
404
406
  - lib/isodoc/function/blocks_example_note.rb
@@ -440,6 +442,7 @@ files:
440
442
  - lib/isodoc/presentation_function/docid.rb
441
443
  - lib/isodoc/presentation_function/erefs.rb
442
444
  - lib/isodoc/presentation_function/footnotes.rb
445
+ - lib/isodoc/presentation_function/ids.rb
443
446
  - lib/isodoc/presentation_function/image.rb
444
447
  - lib/isodoc/presentation_function/index.rb
445
448
  - lib/isodoc/presentation_function/inline.rb
@@ -476,6 +479,7 @@ files:
476
479
  - lib/isodoc/xref/xref_counter_types.rb
477
480
  - lib/isodoc/xref/xref_gen.rb
478
481
  - lib/isodoc/xref/xref_gen_seq.rb
482
+ - lib/isodoc/xref/xref_sect_asset.rb
479
483
  - lib/isodoc/xref/xref_sect_gen.rb
480
484
  - lib/isodoc/xref/xref_util.rb
481
485
  - lib/isodoc/xslfo_convert.rb