metanorma-iho 1.2.4 → 1.2.6

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.
@@ -24,7 +24,7 @@ module IsoDoc
24
24
 
25
25
  def bibrenderer(options = {})
26
26
  ::Relaton::Render::Iho::General.new(options
27
- .merge(language: @lang, i18nhash: @i18n.get))
27
+ .merge(language: @lang, script: @script, i18nhash: @i18n.get))
28
28
  end
29
29
 
30
30
  def info(isoxml, out)
@@ -150,6 +150,17 @@ _bib)
150
150
  %w(• — o)
151
151
  end
152
152
 
153
+ def bibliography_bibitem_tag1(ref, idx, norm)
154
+ ref.xpath(ns("./bibitem")).each do |b|
155
+ implicit_reference(b) and next
156
+ # display ordinal biblio tags whatever the supress-identifier status
157
+ # b["suppress_identifier"] == "true" and next
158
+ idx += 1 unless b["hidden"]
159
+ insert_biblio_tag(b, idx, !norm, standard?(b))
160
+ end
161
+ idx
162
+ end
163
+
153
164
  include Init
154
165
  end
155
166
  end
@@ -45,13 +45,15 @@ module Metanorma
45
45
  super
46
46
  end
47
47
 
48
+ def title_main(node, xml)
49
+ title = node.attr("title") || node.attr("doctitle")
50
+ add_title_xml(xml, title, "en", "title-main")
51
+ end
52
+
48
53
  def title(node, xml)
49
54
  m = full_title_prep(node)
50
55
  full_title(m, xml)
51
- title = node.attr("title")
52
- xml.title **attr_code(type: "title-main") do |t1|
53
- t1 << Metanorma::Utils::asciidoc_sub(title)
54
- end
56
+ title_main(node, xml)
55
57
  %i(appendix annex part supplement).each do |w|
56
58
  typed_title(m, xml, w)
57
59
  end
@@ -61,9 +63,7 @@ module Metanorma
61
63
  metadata[type] or return
62
64
  title = full_title_part(metadata, type, TITLE_COMPONENTS[type][:id],
63
65
  TITLE_COMPONENTS[type][:info])
64
- xml.title **attr_code(type: "title-#{type}") do |t1|
65
- t1 << Metanorma::Utils::asciidoc_sub(title)
66
- end
66
+ add_title_xml(xml, title, "en", "title-#{type}")
67
67
  end
68
68
 
69
69
  TITLE_COMPONENTS = {
@@ -79,9 +79,7 @@ module Metanorma
79
79
  acc << full_title_part(metadata, p, TITLE_COMPONENTS[p][:id],
80
80
  TITLE_COMPONENTS[p][:info])
81
81
  end
82
- xml.title **attr_code(type: "main") do |t1|
83
- t1 << Metanorma::Utils::asciidoc_sub(parts.compact.join(", "))
84
- end
82
+ add_title_xml(xml, parts.compact.join(", "), "en", "main")
85
83
  end
86
84
 
87
85
  TITLE_ID_LABELS = { main: "", annex: "Annex", appendix: "Appendix",
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <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">
3
- <!-- VERSION v2.1.2 -->
3
+ <!-- VERSION v2.1.3 -->
4
4
 
5
5
  <!--
6
6
  ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
@@ -455,14 +455,7 @@ normative or informative references, some split references into sections organiz
455
455
  </ref>
456
456
  </zeroOrMore>
457
457
  <zeroOrMore>
458
- <ref name="doc_bibitem">
459
- <a:documentation>Bibliographic item cited in the document</a:documentation>
460
- </ref>
461
- <zeroOrMore>
462
- <ref name="note">
463
- <a:documentation>Annotation of the bibliographic item</a:documentation>
464
- </ref>
465
- </zeroOrMore>
458
+ <ref name="ReferenceEntry"/>
466
459
  </zeroOrMore>
467
460
  <zeroOrMore>
468
461
  <ref name="references">
@@ -604,18 +597,21 @@ gives an explicit page orientation</a:documentation>
604
597
  </element>
605
598
  </optional>
606
599
  </define>
607
- </include>
608
- <!-- end overrides -->
609
- <define name="FnAttributes" combine="interleave">
610
- <ref name="RequiredId"/>
611
- <optional>
612
- <attribute name="hiddenref">
613
- <a:documentation>If true, number the footnote as normal, but suppress display of the footnote reference in the document body.
600
+ <define name="FnAttributes">
601
+ <ref name="RequiredId"/>
602
+ <optional>
603
+ <attribute name="hiddenref">
604
+ <a:documentation>If true, number the footnote as normal, but suppress display of the footnote reference in the document body.
614
605
  This is done if the footnote reference is already presented in some other form, e.g. within a figure image.</a:documentation>
615
- <data type="boolean"/>
606
+ <data type="boolean"/>
607
+ </attribute>
608
+ </optional>
609
+ <attribute name="reference">
610
+ <a:documentation>The number of the footnote, used to identify it visually</a:documentation>
616
611
  </attribute>
617
- </optional>
618
- </define>
612
+ </define>
613
+ </include>
614
+ <!-- end overrides -->
619
615
  <define name="TdAttributes" combine="interleave">
620
616
  <ref name="RequiredId"/>
621
617
  <optional>
@@ -853,6 +849,17 @@ titlecase, or lowercase</a:documentation>
853
849
  <value>informative</value>
854
850
  </choice>
855
851
  </define>
852
+ <define name="ReferenceEntry">
853
+ <a:documentation>Entry in bibliography</a:documentation>
854
+ <ref name="doc_bibitem">
855
+ <a:documentation>Bibliographic item cited in the document</a:documentation>
856
+ </ref>
857
+ <zeroOrMore>
858
+ <ref name="note">
859
+ <a:documentation>Annotation of the bibliographic item</a:documentation>
860
+ </ref>
861
+ </zeroOrMore>
862
+ </define>
856
863
  <define name="doc_bibitem">
857
864
  <a:documentation>Standardisation document representation of bibliographic entry</a:documentation>
858
865
  <element name="bibitem">
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Iho
3
- VERSION = "1.2.4".freeze
3
+ VERSION = "1.2.6".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iho
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-09-01 00:00:00.000000000 Z
11
+ date: 2025-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic