metanorma-itu 2.3.5 → 2.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4acc57d157430e9c4a9e37bd8f8aa0da066a3c4afb8ba55a13b3ecf43f9bf286
4
- data.tar.gz: 16e233430fd7a3b309d9df84618e34b2fa1f518481d5ed626f5bf77724ea962a
3
+ metadata.gz: 8e5ccf7d02a156a8e35cb60e886610fb211bfc8c350e30cfb2930b7d9c607067
4
+ data.tar.gz: 792305bd1bacc71c47b9158944b1ffec6351976cf2d413c34caae9bbcbf19d61
5
5
  SHA512:
6
- metadata.gz: e332ff239cac846ceaad36f20bb88641e8893821485fa73b148b7d82d635d0435caf541356fedbf782e51600a29f2a84c81e61f21eefa4151873635b8f395179
7
- data.tar.gz: 35015e7389c327bff50c85b0a9f9e1a1f3ceeedfbf73edc3d77ade41ac56c91cefeab0d7eeb1dba9511eaea81f4b2540fe148f7ce4412d02b26b4e977a16fa2e
6
+ metadata.gz: 8b332a7f7b7c3bbb22b141bb24c68df4610d0c35f5d6977f8e5c3091c79a8f0d6598bf9a68679a3dc852b474fd50cb2c291a95dcd35d8c1ebf22a56df465e1e9
7
+ data.tar.gz: d7230a61d6d476864006fc9b660d6bdfbaaeaa09697adeb31a19f0e36c243b4af0d70d56b59f1c7dc480bbd6ee19c79da53ae7e1e318119054357007bd37ea06
data/Gemfile CHANGED
@@ -4,12 +4,6 @@ Encoding.default_internal = Encoding::UTF_8
4
4
  source "https://rubygems.org"
5
5
  git_source(:github) { |repo| "https://github.com/#{repo}" }
6
6
 
7
- group :development, :test do
8
- gem "rspec"
9
- end
10
-
11
- if File.exist? "Gemfile.devel"
12
- eval File.read("Gemfile.devel"), nil, "Gemfile.devel" # rubocop:disable Security/Eval
13
- end
14
-
15
7
  gemspec
8
+
9
+ eval_gemfile("Gemfile.devel") rescue nil
@@ -132,6 +132,14 @@ a.FootnoteRef, span.FootnoteRef {
132
132
  color: red;
133
133
  text-decoration: line-through; }
134
134
 
135
+ ruby {
136
+ ruby-position: over;
137
+ -webkit-ruby-position: before; }
138
+
139
+ ruby ruby {
140
+ ruby-position: under;
141
+ -webkit-ruby-position: after; }
142
+
135
143
  /* code highlighting with line numbers */
136
144
  table.rouge-line-table td.rouge-gutter {
137
145
  -moz-user-select: none;
@@ -132,6 +132,14 @@ a.FootnoteRef, span.FootnoteRef {
132
132
  color: red;
133
133
  text-decoration: line-through; }
134
134
 
135
+ ruby {
136
+ ruby-position: over;
137
+ -webkit-ruby-position: before; }
138
+
139
+ ruby ruby {
140
+ ruby-position: under;
141
+ -webkit-ruby-position: after; }
142
+
135
143
  /* code highlighting with line numbers */
136
144
  table.rouge-line-table td.rouge-gutter {
137
145
  -moz-user-select: none;
@@ -415,6 +423,14 @@ a.FootnoteRef, span.FootnoteRef {
415
423
  color: red;
416
424
  text-decoration: line-through; }
417
425
 
426
+ ruby {
427
+ ruby-position: over;
428
+ -webkit-ruby-position: before; }
429
+
430
+ ruby ruby {
431
+ ruby-position: under;
432
+ -webkit-ruby-position: after; }
433
+
418
434
  /* code highlighting with line numbers */
419
435
  table.rouge-line-table td.rouge-gutter {
420
436
  -moz-user-select: none;
@@ -23,6 +23,7 @@ annex_subclause: فقرة
23
23
  keywords: الكلمات الدالة
24
24
  in: في
25
25
  to: إلى
26
+ nested_xref: "%2 في %1"
26
27
  where: ":حيث,"
27
28
  where_one: "حيث,"
28
29
  blankclause: تم ترك هذا الشرط فارغًا عمدًا
@@ -22,6 +22,7 @@ annex_subclause: Klausel
22
22
  keywords: Schlüsselwörter
23
23
  in: in
24
24
  to: bis
25
+ nested_xref: "%2 in %1"
25
26
  where: "wobei:"
26
27
  where_one: "wobei"
27
28
  blankclause: Diese Klausel ist absichtlich leer gelassen
@@ -25,6 +25,7 @@ in: in
25
25
  to: to
26
26
  where: "where:"
27
27
  where_one: "where"
28
+ nested_xref: "%2 in %1"
28
29
  blankclause: This clause is intentionally left blank.
29
30
  norm_with_refs_pref:
30
31
  The following ITU-T Recommendations and other references contain provisions which, through reference in this text, constitute provisions of this Recommendation. At the time of publication, the editions indicated were valid. All Recommendations and other references are subject to revision; users of this Recommendation are therefore encouraged to investigate the possibility of applying the most recent edition of the Recommendations and other references listed below. A list of the currently valid ITU-T Recommendations is regularly published. The reference to a document within this Recommendation does not give it, as a stand-alone document, the status of a Recommendation.
@@ -23,6 +23,7 @@ annex_subclause: cláusula
23
23
  keywords: Palabras clave
24
24
  in: en
25
25
  to: a
26
+ nested_xref: "%2 en %1"
26
27
  where: "donde:"
27
28
  where_one: "donde"
28
29
  blankclause: Esta cláusula se deja en blanco intencionalmente.
@@ -23,6 +23,7 @@ annex_subclause: article
23
23
  keywords: Mots clés
24
24
  in: dans
25
25
  to: à
26
+ nested_xref: "%2 dans %1"
26
27
  where: "où:"
27
28
  where_one: "où"
28
29
  blankclause: Cette clause est laissée en blanc intentionnellement.
@@ -23,6 +23,7 @@ annex_subclause: пункт
23
23
  keywords: Ключевые слова
24
24
  in: в
25
25
  to: до
26
+ nested_xref: "%2 в %1"
26
27
  where: "где:"
27
28
  where_one: "где"
28
29
  blankclause: Этот пункт намеренно оставлен пустым.
@@ -21,8 +21,9 @@ clause: 条款
21
21
  section: 节
22
22
  annex_subclause: 条款
23
23
  keywords: 关键词
24
- in: in
25
- to: to
24
+ in: 中的
25
+ to:
26
+ nested_xref: "%1中的%2"
26
27
  where: 式中:
27
28
  where_one: 式中
28
29
  blankclause: This clause is intentionally left blank.
@@ -1,22 +1,14 @@
1
1
  module IsoDoc
2
2
  module ITU
3
3
  class I18n < IsoDoc::I18n
4
- def load_yaml2x(str)
5
- YAML.load_file(File.join(File.dirname(__FILE__),
6
- "i18n-#{str}.yaml"))
4
+ def load_file(fname)
5
+ f = File.join(File.dirname(__FILE__), fname)
6
+ File.exist?(f) ? YAML.load_file(f) : {}
7
7
  end
8
8
 
9
9
  def load_yaml1(lang, script)
10
- y = case lang
11
- when "en", "fr", "ru", "de", "es", "ar"
12
- load_yaml2x(lang)
13
- when "zh"
14
- if script == "Hans" then load_yaml2x("zh-Hans")
15
- else load_yaml2x("en")
16
- end
17
- else load_yaml2x("en")
18
- end
19
- super.deep_merge(y)
10
+ y = load_file("i18n-#{yaml_lang(lang, script)}.yaml")
11
+ y.empty? ? load_file("i18n-en.yaml").merge(super) : super.deep_merge(y)
20
12
  end
21
13
  end
22
14
  end
@@ -11656,10 +11656,10 @@
11656
11656
 
11657
11657
  <xsl:variable name="toc_level">
11658
11658
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
11659
- <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
11659
+ <xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
11660
11660
  <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
11661
11661
  <xsl:choose>
11662
- <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
11662
+ <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
11663
11663
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
11664
11664
  <xsl:otherwise><!-- default value -->
11665
11665
  2
@@ -11656,10 +11656,10 @@
11656
11656
 
11657
11657
  <xsl:variable name="toc_level">
11658
11658
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
11659
- <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
11659
+ <xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
11660
11660
  <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
11661
11661
  <xsl:choose>
11662
- <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
11662
+ <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
11663
11663
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
11664
11664
  <xsl:otherwise><!-- default value -->
11665
11665
  2
@@ -11656,10 +11656,10 @@
11656
11656
 
11657
11657
  <xsl:variable name="toc_level">
11658
11658
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
11659
- <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
11659
+ <xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
11660
11660
  <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
11661
11661
  <xsl:choose>
11662
- <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
11662
+ <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
11663
11663
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
11664
11664
  <xsl:otherwise><!-- default value -->
11665
11665
  2
@@ -11656,10 +11656,10 @@
11656
11656
 
11657
11657
  <xsl:variable name="toc_level">
11658
11658
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
11659
- <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
11659
+ <xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
11660
11660
  <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
11661
11661
  <xsl:choose>
11662
- <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
11662
+ <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
11663
11663
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
11664
11664
  <xsl:otherwise><!-- default value -->
11665
11665
  2
@@ -11656,10 +11656,10 @@
11656
11656
 
11657
11657
  <xsl:variable name="toc_level">
11658
11658
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
11659
- <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
11659
+ <xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
11660
11660
  <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
11661
11661
  <xsl:choose>
11662
- <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
11662
+ <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
11663
11663
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
11664
11664
  <xsl:otherwise><!-- default value -->
11665
11665
  2
@@ -11656,10 +11656,10 @@
11656
11656
 
11657
11657
  <xsl:variable name="toc_level">
11658
11658
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
11659
- <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
11659
+ <xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
11660
11660
  <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
11661
11661
  <xsl:choose>
11662
- <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
11662
+ <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
11663
11663
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
11664
11664
  <xsl:otherwise><!-- default value -->
11665
11665
  2
@@ -11656,10 +11656,10 @@
11656
11656
 
11657
11657
  <xsl:variable name="toc_level">
11658
11658
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
11659
- <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
11659
+ <xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
11660
11660
  <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
11661
11661
  <xsl:choose>
11662
- <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
11662
+ <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
11663
11663
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
11664
11664
  <xsl:otherwise><!-- default value -->
11665
11665
  2
@@ -11656,10 +11656,10 @@
11656
11656
 
11657
11657
  <xsl:variable name="toc_level">
11658
11658
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
11659
- <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
11659
+ <xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
11660
11660
  <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
11661
11661
  <xsl:choose>
11662
- <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
11662
+ <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
11663
11663
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
11664
11664
  <xsl:otherwise><!-- default value -->
11665
11665
  2
@@ -11656,10 +11656,10 @@
11656
11656
 
11657
11657
  <xsl:variable name="toc_level">
11658
11658
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
11659
- <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
11659
+ <xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
11660
11660
  <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
11661
11661
  <xsl:choose>
11662
- <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
11662
+ <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
11663
11663
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
11664
11664
  <xsl:otherwise><!-- default value -->
11665
11665
  2
@@ -18,10 +18,6 @@ module IsoDoc
18
18
  super
19
19
  end
20
20
 
21
- def prefix_container(container, linkend, node, _target)
22
- l10n("#{linkend} #{@i18n.get['in']} #{anchor_xref(node, container)}")
23
- end
24
-
25
21
  def eref(docxml)
26
22
  docxml.xpath(ns("//eref")).each { |f| eref1(f) }
27
23
  end
@@ -52,12 +52,12 @@ module IsoDoc
52
52
  "-#{(subfignum + 96).chr}"
53
53
  end
54
54
 
55
- def sequential_figure_body(subfignum, counter, block, klass)
55
+ def sequential_figure_body(subfig, counter, elem, klass, container: false)
56
56
  label = counter.print
57
- label &&= label + subfigure_label(subfignum)
58
- @anchors[block["id"]] = anchor_struct(
59
- label, nil, @labels[klass] || klass.capitalize, klass,
60
- block["unnumbered"]
57
+ label &&= label + subfigure_label(subfig)
58
+ @anchors[elem["id"]] = anchor_struct(
59
+ label, container ? elem : nil, @labels[klass] || klass.capitalize,
60
+ klass, elem["unnumbered"]
61
61
  )
62
62
  end
63
63
 
@@ -69,7 +69,7 @@ module IsoDoc
69
69
  )
70
70
  end
71
71
 
72
- def sequential_formula_names(clause)
72
+ def sequential_formula_names(clause, container: false)
73
73
  clause.first&.xpath(ns(middle_sections))&.each do |c|
74
74
  if c["id"] && @anchors[c["id"]]
75
75
  hierarchical_formula_names(c, @anchors[c["id"]][:label] ||
@@ -715,27 +715,36 @@
715
715
  </define>
716
716
  <define name="ruby">
717
717
  <element name="ruby">
718
- <zeroOrMore>
719
- <choice>
720
- <ref name="PureTextElement"/>
721
- <ref name="rp"/>
722
- <ref name="rt"/>
723
- </choice>
724
- </zeroOrMore>
718
+ <choice>
719
+ <ref name="ruby_pronunciation"/>
720
+ <ref name="ruby_annotation"/>
721
+ </choice>
722
+ <choice>
723
+ <text/>
724
+ <ref name="ruby"/>
725
+ </choice>
725
726
  </element>
726
727
  </define>
727
- <define name="rp">
728
- <element name="rp">
729
- <zeroOrMore>
730
- <ref name="PureTextElement"/>
731
- </zeroOrMore>
728
+ <define name="ruby_pronunciation">
729
+ <element name="pronunciation">
730
+ <attribute name="value"/>
731
+ <optional>
732
+ <attribute name="script"/>
733
+ </optional>
734
+ <optional>
735
+ <attribute name="lang"/>
736
+ </optional>
732
737
  </element>
733
738
  </define>
734
- <define name="rt">
735
- <element name="rt">
736
- <zeroOrMore>
737
- <ref name="PureTextElement"/>
738
- </zeroOrMore>
739
+ <define name="ruby_annotation">
740
+ <element name="annotation">
741
+ <attribute name="value"/>
742
+ <optional>
743
+ <attribute name="script"/>
744
+ </optional>
745
+ <optional>
746
+ <attribute name="lang"/>
747
+ </optional>
739
748
  </element>
740
749
  </define>
741
750
  <define name="br">
@@ -374,6 +374,16 @@
374
374
  <ref name="image"/>
375
375
  </element>
376
376
  </define>
377
+ <define name="depiction">
378
+ <element name="depiction">
379
+ <optional>
380
+ <attribute name="scope"/>
381
+ </optional>
382
+ <zeroOrMore>
383
+ <ref name="image"/>
384
+ </zeroOrMore>
385
+ </element>
386
+ </define>
377
387
  <define name="NameWithVariants">
378
388
  <element name="primary">
379
389
  <ref name="LocalizedString"/>
@@ -760,6 +770,9 @@
760
770
  <optional>
761
771
  <ref name="validity"/>
762
772
  </optional>
773
+ <optional>
774
+ <ref name="depiction"/>
775
+ </optional>
763
776
  </define>
764
777
  <define name="ReducedBibliographicItem">
765
778
  <optional>
@@ -11,8 +11,7 @@ module Metanorma
11
11
  def resolution_inline_header(xml)
12
12
  @doctype == "resolution" or return
13
13
  xml.xpath("//clause//clause").each do |c|
14
- next if (title = c.at("./title")) && !title&.text&.empty?
15
-
14
+ (title = c.at("./title")) && !title.text&.empty? and next
16
15
  c["inline-header"] = true
17
16
  end
18
17
  end
@@ -26,6 +25,8 @@ module Metanorma
26
25
  end
27
26
 
28
27
  def insert_missing_sections(xml)
28
+ xml.at("//metanorma-extension/semantic-metadata/" \
29
+ "headless[text() = 'true']") and return nil
29
30
  insert_scope(xml)
30
31
  insert_norm_ref(xml)
31
32
  insert_terms(xml)
@@ -47,7 +48,7 @@ module Metanorma
47
48
  ins.previous =
48
49
  "<clause type='scope' #{add_id}><title>#{@i18n.scope}</title><p>" \
49
50
  "#{@i18n.clause_empty}</p></clause>"
50
- xml&.at("//sentinel")&.remove
51
+ xml.at("//sentinel")&.remove
51
52
  end
52
53
 
53
54
  def insert_norm_ref(xml)
@@ -58,7 +59,7 @@ module Metanorma
58
59
  xml.at("//bibliography/references[@normative = 'true']") or
59
60
  ins.previous = "<references #{add_id} normative='true'>" \
60
61
  "<title>#{@i18n.normref}</title></references>"
61
- xml&.at("//sentinel")&.remove
62
+ xml.at("//sentinel")&.remove
62
63
  end
63
64
 
64
65
  def insert_terms(xml)
@@ -22,7 +22,8 @@ module Metanorma
22
22
  super
23
23
  @smartquotes = node.attr("smartquotes") == "true"
24
24
  @no_insert_missing_sections = doctype(node) != "recommendation" ||
25
- node.attr("legacy-do-not-insert-missing-sections")
25
+ node.attr("legacy-do-not-insert-missing-sections") ||
26
+ node.attr("document-schema") == "legacy"
26
27
  end
27
28
 
28
29
  def boilerplate_file(_xmldoc)
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.2.8 -->
20
+ <!-- VERSION v1.2.9 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -1958,6 +1958,16 @@
1958
1958
  <data type="boolean"/>
1959
1959
  </attribute>
1960
1960
  </optional>
1961
+ <optional>
1962
+ <attribute name="type">
1963
+ <choice>
1964
+ <value>letter</value>
1965
+ <value>symbol</value>
1966
+ <value>formula</value>
1967
+ <value>equation</value>
1968
+ </choice>
1969
+ </attribute>
1970
+ </optional>
1961
1971
  <element name="name">
1962
1972
  <oneOrMore>
1963
1973
  <choice>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ITU
3
- VERSION = "2.3.5".freeze
3
+ VERSION = "2.3.7".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-itu
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.5
4
+ version: 2.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-27 00:00:00.000000000 Z
11
+ date: 2023-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc