metanorma-itu 2.0.8.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/itu/base_convert.rb +1 -1
  3. data/lib/isodoc/itu/cleanup.rb +1 -1
  4. data/lib/isodoc/itu/html/html_itu_titlepage.html +1 -0
  5. data/lib/isodoc/itu/html/htmlstyle.css +6 -0
  6. data/lib/isodoc/itu/html/htmlstyle.scss +2 -0
  7. data/lib/isodoc/itu/html/itu.css +17 -9
  8. data/lib/isodoc/itu/html/itu.scss +18 -8
  9. data/lib/isodoc/itu/html/word_itu_intro.html +40 -41
  10. data/lib/isodoc/itu/html/word_itu_titlepage.html +1 -0
  11. data/lib/isodoc/itu/html/word_itu_titlepage_sp.html +1 -1
  12. data/lib/isodoc/itu/html_convert.rb +16 -11
  13. data/lib/isodoc/itu/i18n.rb +1 -1
  14. data/lib/isodoc/itu/init.rb +1 -1
  15. data/lib/isodoc/itu/itu.implementers-guide.xsl +1496 -304
  16. data/lib/isodoc/itu/itu.in-force.xsl +1496 -304
  17. data/lib/isodoc/itu/itu.recommendation-annex.xsl +1496 -304
  18. data/lib/isodoc/itu/itu.recommendation-supplement.xsl +1496 -304
  19. data/lib/isodoc/itu/itu.recommendation.xsl +1496 -304
  20. data/lib/isodoc/itu/itu.resolution.xsl +1496 -304
  21. data/lib/isodoc/itu/itu.service-publication.xsl +1496 -304
  22. data/lib/isodoc/itu/itu.technical-paper.xsl +1496 -304
  23. data/lib/isodoc/itu/itu.technical-report.xsl +1496 -304
  24. data/lib/isodoc/itu/presentation_xml_convert.rb +16 -0
  25. data/lib/isodoc/itu/ref.rb +20 -32
  26. data/lib/isodoc/itu/terms.rb +1 -1
  27. data/lib/isodoc/itu/word_cleanup.rb +10 -9
  28. data/lib/isodoc/itu/word_convert.rb +1 -1
  29. data/lib/isodoc/itu/xref.rb +42 -27
  30. data/lib/isodoc/itu/xref_section.rb +0 -15
  31. data/lib/metanorma/itu/biblio.rng +69 -42
  32. data/lib/metanorma/itu/converter.rb +2 -1
  33. data/lib/metanorma/itu/isodoc.rng +65 -0
  34. data/lib/metanorma/itu/itu.rng +3 -0
  35. data/lib/metanorma/itu/version.rb +1 -1
  36. data/lib/relaton/render/config.yml +3 -0
  37. data/lib/relaton/render/general.rb +13 -0
  38. data/metanorma-itu.gemspec +1 -1
  39. metadata +7 -5
@@ -1,6 +1,7 @@
1
1
  require_relative "init"
2
2
  require "roman-numerals"
3
3
  require "isodoc"
4
+ require_relative "../../relaton/render/general"
4
5
 
5
6
  module IsoDoc
6
7
  module ITU
@@ -121,6 +122,21 @@ module IsoDoc
121
122
  end
122
123
  end
123
124
 
125
+ def bibrenderer
126
+ ::Relaton::Render::ITU::General.new(language: @lang)
127
+ end
128
+
129
+ def bibrender(xml)
130
+ if f = xml.at(ns("./formattedref"))
131
+ f << "." unless /\.$/.match?(f.text)
132
+ else
133
+ # retain date in order to generate reference tag
134
+ xml.children =
135
+ "#{bibrenderer.render(xml.to_xml)}"\
136
+ "#{xml.xpath(ns('./docidentifier | ./uri | ./note | ./date')).to_xml}"
137
+ end
138
+ end
139
+
124
140
  def ddmmmmyyyy(date)
125
141
  if @lang == "zh"
126
142
  ddMMMyyyy(date)
@@ -5,27 +5,27 @@ require "fileutils"
5
5
  module IsoDoc
6
6
  module ITU
7
7
  module BaseConvert
8
- def nonstd_bibitem(list, b, _ordinal, biblio)
9
- list.tr **attr_code(iso_bibitem_entry_attrs(b, biblio)) do |ref|
10
- id = render_identifier(bibitem_ref_code(b))
8
+ def nonstd_bibitem(list, bibitem, _ordinal, biblio)
9
+ list.tr **attr_code(iso_bibitem_entry_attrs(bibitem, biblio)) do |ref|
10
+ id = render_identifier(bibitem_ref_code(bibitem))
11
11
  ref.td **{ style: "vertical-align:top" } do |td|
12
12
  td << (id[:metanorma] || "[#{id[:sdo]}]")
13
13
  &.gsub(/-/, "&#x2011;")&.gsub(/ /, "&#xa0;")
14
- date_note_process(b, td)
14
+ date_note_process(bibitem, td)
15
15
  end
16
- ref.td { |td| reference_format(b, td) }
16
+ ref.td { |td| reference_format(bibitem, td) }
17
17
  end
18
18
  end
19
19
 
20
- def std_bibitem_entry(list, b, ordinal, biblio)
21
- nonstd_bibitem(list, b, ordinal, biblio)
20
+ def std_bibitem_entry(list, bibitem, ordinal, biblio)
21
+ nonstd_bibitem(list, bibitem, ordinal, biblio)
22
22
  end
23
23
 
24
- def biblio_list(f, div, biblio)
24
+ def biblio_list(clause, div, biblio)
25
25
  div.table **{ class: "biblio", border: "0" } do |t|
26
26
  i = 0
27
27
  t.tbody do |tbody|
28
- f.elements.each do |b|
28
+ clause.elements.each do |b|
29
29
  if b.name == "bibitem"
30
30
  next if implicit_reference(b)
31
31
 
@@ -39,7 +39,7 @@ module IsoDoc
39
39
  end
40
40
  end
41
41
  end
42
- f.xpath(ns("./clause | ./references")).each do |x|
42
+ clause.xpath(ns("./clause | ./references")).each do |x|
43
43
  parse(x, div)
44
44
  end
45
45
  end
@@ -53,7 +53,7 @@ module IsoDoc
53
53
 
54
54
  def reference_format(biblio, ref)
55
55
  reference_format_start(biblio, ref)
56
- reference_format_title(biblio, ref)
56
+ super
57
57
  end
58
58
 
59
59
  def titlecase(str)
@@ -61,7 +61,7 @@ module IsoDoc
61
61
  end
62
62
 
63
63
  def pref_ref_code(bibitem)
64
- ret = bibitem.xpath(ns("./docidentifier[@type = 'ITU']"))
64
+ ret = bibitem.xpath(ns("./docidentifier[@type = 'ITU']"))
65
65
  ret.empty? and ret = super
66
66
  ret
67
67
  end
@@ -69,11 +69,11 @@ module IsoDoc
69
69
  IGNORE_IDS = "@type = 'DOI' or @type = 'ISSN' or @type = 'ISBN' or "\
70
70
  "@type = 'rfc-anchor' or @type = 'metanorma-ordinal'".freeze
71
71
 
72
- def multi_bibitem_ref_code(b)
73
- id = b.xpath(ns("./docidentifier[not(@type = 'metanorma' or "\
74
- "#{IGNORE_IDS})]"))
72
+ def multi_bibitem_ref_code(bibitem)
73
+ id = bibitem.xpath(ns("./docidentifier[not(@type = 'metanorma' or "\
74
+ "#{IGNORE_IDS})]"))
75
75
  id.empty? and
76
- id = b.xpath(ns("./docidentifier[not(@type = 'metanorma')]"))
76
+ id = bibitem.xpath(ns("./docidentifier[not(@type = 'metanorma')]"))
77
77
  return [] if id.empty?
78
78
 
79
79
  id.sort_by { |i| i["type"] == "ITU" ? 0 : 1 }
@@ -108,25 +108,13 @@ module IsoDoc
108
108
  end
109
109
  end
110
110
 
111
- def reference_format_start(bib, r)
111
+ def reference_format_start(bib, out)
112
112
  id = multi_bibitem_ref_code(bib)
113
113
  id1 = render_multi_identifiers(id)
114
- r << id1
114
+ out << id1
115
115
  date = bib.at(ns("./date[@type = 'published']")) and
116
- r << " (#{date.text.sub(/-.*$/, '')})"
117
- r << ", " if date || !id1.empty?
118
- end
119
-
120
- def reference_format_title(bib, r)
121
- if ftitle = bib.at(ns("./formattedref"))
122
- ftitle&.children&.each { |n| parse(n, r) }
123
- /\.$/.match(ftitle&.text) or r << "."
124
- elsif title = iso_title(bib)
125
- r.i do |i|
126
- title&.children&.each { |n| parse(n, i) }
127
- end
128
- /\.$/.match(title&.text) or r << "."
129
- end
116
+ out << " (#{date.text.sub(/-.*$/, '')})"
117
+ out << ", " if date || !id1.empty?
130
118
  end
131
119
  end
132
120
  end
@@ -37,7 +37,7 @@ module IsoDoc
37
37
  end
38
38
 
39
39
  def termnote_delim
40
- " &ndash; "
40
+ " &#x2013; "
41
41
  end
42
42
  end
43
43
  end
@@ -76,13 +76,13 @@ module IsoDoc
76
76
  @wordstylesheet&.write(@landscapestyle)
77
77
  @wordstylesheet&.close
78
78
  end
79
- Html2Doc.process(
80
- result, filename: filename,
81
- stylesheet: @wordstylesheet&.path,
82
- header_file: header&.path, dir: dir,
83
- asciimathdelims: [@openmathdelim, @closemathdelim],
84
- liststyles: { ul: @ulstyle, ol: @olstyle, steps: "l4" }
85
- )
79
+ Html2Doc.new(
80
+ filename: filename,
81
+ stylesheet: @wordstylesheet&.path,
82
+ header_file: header&.path, dir: dir,
83
+ asciimathdelims: [@openmathdelim, @closemathdelim],
84
+ liststyles: { ul: @ulstyle, ol: @olstyle, steps: "l4" }
85
+ ).process(result)
86
86
  header&.unlink
87
87
  @wordstylesheet&.unlink
88
88
  end
@@ -105,7 +105,7 @@ module IsoDoc
105
105
  %w(copyright license legal).each do |t|
106
106
  docxml&.xpath("//div[@class = 'boilerplate-#{t}']")&.each do |d|
107
107
  para = d&.at("./descendant::h1[2]") and
108
- para.previous = "<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>"
108
+ para.previous = "<p>&#xa0;</p><p>&#xa0;</p><p>&#xa0;</p>"
109
109
  d.xpath(".//h1 | .//h2").each do |p|
110
110
  p.name = "p"
111
111
  p["class"] = "boilerplateHdr"
@@ -131,9 +131,10 @@ module IsoDoc
131
131
  # i == 0 && t == "copyright" and p["style"] = "text-align:center;"
132
132
  end
133
133
  t == "copyright" or
134
- auth << "<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>"
134
+ auth << "<p>&#xa0;</p><p>&#xa0;</p><p>&#xa0;</p>"
135
135
  dest.replace(auth.remove)
136
136
  end
137
+ coverpage_note_cleanup(docxml)
137
138
  end
138
139
 
139
140
  TOPLIST = "[not(ancestor::ul) and not(ancestor::ol)]".freeze
@@ -29,7 +29,7 @@ module IsoDoc
29
29
  abstract docxml, div2
30
30
  keywords docxml, div2
31
31
  preface docxml, div2
32
- div2.p { |p| p << "&nbsp;" } # placeholder
32
+ div2.p { |p| p << "&#xa0;" } # placeholder
33
33
  end
34
34
  section_break(body)
35
35
  end
@@ -6,8 +6,11 @@ module IsoDoc
6
6
  module ITU
7
7
  class Counter < IsoDoc::XrefGen::Counter
8
8
  def print
9
- super.sub(/([0-9])(bis|ter|quater|quinquies|sexies|septies|octies|nonies)$/,
10
- "\\1<em>\\2</em>")
9
+ ret = super or return nil
10
+
11
+ ret
12
+ .sub(/([0-9])(bis|ter|quater|quinquies|sexies|septies|octies|nonies)$/,
13
+ "\\1<em>\\2</em>")
11
14
  end
12
15
  end
13
16
 
@@ -19,12 +22,14 @@ module IsoDoc
19
22
 
20
23
  def back_anchor_names(docxml)
21
24
  super
22
- if annexid = docxml
23
- &.at(ns("//bibdata/ext/structuredidentifier/annexid"))&.text
24
- docxml.xpath(ns("//annex")).each { |c| annex_names(c, annexid) }
25
- else
26
- informative_annex_names(docxml)
27
- normative_annex_names(docxml)
25
+ if @parse_settings.empty? || @parse_settings[:clauses]
26
+ if annexid = docxml
27
+ &.at(ns("//bibdata/ext/structuredidentifier/annexid"))&.text
28
+ docxml.xpath(ns("//annex")).each { |c| annex_names(c, annexid) }
29
+ else
30
+ informative_annex_names(docxml)
31
+ normative_annex_names(docxml)
32
+ end
28
33
  end
29
34
  end
30
35
 
@@ -48,25 +53,33 @@ module IsoDoc
48
53
 
49
54
  def initial_anchor_names(doc)
50
55
  @doctype = doc&.at(ns("//bibdata/ext/doctype"))&.text
51
- doc.xpath(ns("//boilerplate//clause")).each { |c| preface_names(c) }
52
- doc.xpath("//xmlns:preface/child::*").each { |c| preface_names(c) }
53
- if @hierarchical_assets
54
- hierarchical_asset_names(doc.xpath("//xmlns:preface/child::*"),
55
- "Preface")
56
- else
57
- sequential_asset_names(doc.xpath("//xmlns:preface/child::*"))
56
+ if @parse_settings.empty? || @parse_settings[:clauses]
57
+ doc.xpath(ns("//boilerplate//clause")).each { |c| preface_names(c) }
58
+ doc.xpath("//xmlns:preface/child::*").each { |c| preface_names(c) }
59
+ end
60
+ if @parse_settings.empty?
61
+ if @hierarchical_assets
62
+ hierarchical_asset_names(doc.xpath("//xmlns:preface/child::*"),
63
+ "Preface")
64
+ else
65
+ sequential_asset_names(doc.xpath("//xmlns:preface/child::*"))
66
+ end
67
+ end
68
+ if @parse_settings.empty? || @parse_settings[:clauses]
69
+ n = Counter.new
70
+ n = section_names(doc.at(ns("//clause[@type = 'scope']")), n, 1)
71
+ n = section_names(doc.at(ns(@klass.norm_ref_xpath)), n, 1)
72
+ n = section_names(
73
+ doc.at(ns("//sections/terms | //sections/clause[descendant::terms]")), n, 1
74
+ )
75
+ n = section_names(doc.at(ns("//sections/definitions")), n, 1)
76
+ clause_names(doc, n)
77
+ end
78
+ if @parse_settings.empty?
79
+ middle_section_asset_names(doc)
80
+ termnote_anchor_names(doc)
81
+ termexample_anchor_names(doc)
58
82
  end
59
- n = Counter.new
60
- n = section_names(doc.at(ns("//clause[@type = 'scope']")), n, 1)
61
- n = section_names(doc.at(ns(@klass.norm_ref_xpath)), n, 1)
62
- n = section_names(
63
- doc.at(ns("//sections/terms | //sections/clause[descendant::terms]")), n, 1
64
- )
65
- n = section_names(doc.at(ns("//sections/definitions")), n, 1)
66
- clause_names(doc, n)
67
- middle_section_asset_names(doc)
68
- termnote_anchor_names(doc)
69
- termexample_anchor_names(doc)
70
83
  end
71
84
 
72
85
  def middle_sections
@@ -134,7 +147,9 @@ module IsoDoc
134
147
 
135
148
  def hierarchical_formula_names(clause, num)
136
149
  c = Counter.new
137
- clause.xpath(ns(".//formula")).reject { |n| blank?(n["id"]) }.each do |t|
150
+ clause.xpath(ns(".//formula")).reject do |n|
151
+ blank?(n["id"])
152
+ end.each do |t|
138
153
  @anchors[t["id"]] = anchor_struct(
139
154
  "#{num}-#{c.increment(t).print}", nil,
140
155
  t["inequality"] ? @labels["inequality"] : @labels["formula"],
@@ -24,21 +24,6 @@ module IsoDoc
24
24
  xref: l10n("#{lbl} #{num}") }
25
25
  end
26
26
 
27
- def annex_names(clause, num)
28
- @anchors[clause["id"]] = annex_name_anchors(clause, num)
29
- if a = single_annex_special_section(clause)
30
- annex_names1(a, num.to_s, 1)
31
- else
32
- i = Counter.new
33
- clause.xpath(ns("./clause | ./references | ./terms | ./definitions"))
34
- .each do |c|
35
- i.increment(c)
36
- annex_names1(c, "#{num}.#{i.print}", 2)
37
- end
38
- end
39
- hierarchical_asset_names(clause, num)
40
- end
41
-
42
27
  def annex_names1(clause, num, level)
43
28
  @anchors[clause["id"]] =
44
29
  { label: num, elem: @labels["annex_subclause"],
@@ -614,12 +614,12 @@
614
614
  <optional>
615
615
  <ref name="fetched"/>
616
616
  </optional>
617
- <choice>
618
- <oneOrMore>
619
- <ref name="btitle"/>
620
- </oneOrMore>
617
+ <optional>
621
618
  <ref name="formattedref"/>
622
- </choice>
619
+ </optional>
620
+ <oneOrMore>
621
+ <ref name="btitle"/>
622
+ </oneOrMore>
623
623
  <zeroOrMore>
624
624
  <ref name="bsource"/>
625
625
  </zeroOrMore>
@@ -851,17 +851,46 @@
851
851
  </define>
852
852
  <define name="bplace">
853
853
  <element name="place">
854
- <optional>
855
- <attribute name="uri">
856
- <data type="anyURI"/>
857
- </attribute>
858
- </optional>
859
- <optional>
860
- <attribute name="region"/>
861
- </optional>
854
+ <choice>
855
+ <text/>
856
+ <group>
857
+ <ref name="bibliocity"/>
858
+ <zeroOrMore>
859
+ <ref name="biblioregion"/>
860
+ </zeroOrMore>
861
+ <zeroOrMore>
862
+ <ref name="bibliocountry"/>
863
+ </zeroOrMore>
864
+ </group>
865
+ </choice>
866
+ </element>
867
+ </define>
868
+ <define name="bibliocity">
869
+ <element name="city">
862
870
  <text/>
863
871
  </element>
864
872
  </define>
873
+ <define name="biblioregion">
874
+ <element name="region">
875
+ <ref name="RegionType"/>
876
+ </element>
877
+ </define>
878
+ <define name="bibliocountry">
879
+ <element name="country">
880
+ <ref name="RegionType"/>
881
+ </element>
882
+ </define>
883
+ <define name="RegionType">
884
+ <optional>
885
+ <attribute name="iso"/>
886
+ </optional>
887
+ <optional>
888
+ <attribute name="recommended">
889
+ <data type="boolean"/>
890
+ </attribute>
891
+ </optional>
892
+ <text/>
893
+ </define>
865
894
  <define name="bprice">
866
895
  <element name="price">
867
896
  <attribute name="currency"/>
@@ -957,36 +986,34 @@
957
986
  <ref name="SeriesType"/>
958
987
  </attribute>
959
988
  </optional>
960
- <choice>
989
+ <optional>
961
990
  <ref name="formattedref"/>
962
- <group>
963
- <ref name="btitle"/>
964
- <optional>
965
- <ref name="bplace"/>
966
- </optional>
967
- <optional>
968
- <ref name="seriesorganization"/>
969
- </optional>
970
- <optional>
971
- <ref name="abbreviation"/>
972
- </optional>
973
- <optional>
974
- <ref name="seriesfrom"/>
975
- </optional>
976
- <optional>
977
- <ref name="seriesto"/>
978
- </optional>
979
- <optional>
980
- <ref name="seriesnumber"/>
981
- </optional>
982
- <optional>
983
- <ref name="seriespartnumber"/>
984
- </optional>
985
- <optional>
986
- <ref name="seriesrun"/>
987
- </optional>
988
- </group>
989
- </choice>
991
+ </optional>
992
+ <ref name="btitle"/>
993
+ <optional>
994
+ <ref name="bplace"/>
995
+ </optional>
996
+ <optional>
997
+ <ref name="seriesorganization"/>
998
+ </optional>
999
+ <optional>
1000
+ <ref name="abbreviation"/>
1001
+ </optional>
1002
+ <optional>
1003
+ <ref name="seriesfrom"/>
1004
+ </optional>
1005
+ <optional>
1006
+ <ref name="seriesto"/>
1007
+ </optional>
1008
+ <optional>
1009
+ <ref name="seriesnumber"/>
1010
+ </optional>
1011
+ <optional>
1012
+ <ref name="seriespartnumber"/>
1013
+ </optional>
1014
+ <optional>
1015
+ <ref name="seriesrun"/>
1016
+ </optional>
990
1017
  </element>
991
1018
  </define>
992
1019
  <define name="SeriesType">
@@ -31,7 +31,7 @@ module Metanorma
31
31
  end
32
32
 
33
33
  def doctype(node)
34
- ret = super || "recommendation"
34
+ ret = node.attr("doctype")&.gsub(/\s+/, "-")&.downcase || "recommendation"
35
35
  ret = "recommendation" if ret == "article"
36
36
  ret
37
37
  end
@@ -40,6 +40,7 @@ module Metanorma
40
40
  id = Metanorma::Utils::anchor_or_uuid(node)
41
41
  noko do |xml|
42
42
  xml.ol **attr_code(id: id, class: node.attr("class")) do |xml_ol|
43
+ list_caption(node, xml_ol)
43
44
  node.items.each { |item| li(xml_ol, item) }
44
45
  end
45
46
  end.join("\n")
@@ -32,6 +32,43 @@
32
32
  <ref name="DocumentType"/>
33
33
  </element>
34
34
  </define>
35
+ <define name="admonition">
36
+ <element name="admonition">
37
+ <attribute name="type">
38
+ <ref name="AdmonitionType"/>
39
+ </attribute>
40
+ <optional>
41
+ <attribute name="class"/>
42
+ </optional>
43
+ <attribute name="id">
44
+ <data type="ID"/>
45
+ </attribute>
46
+ <optional>
47
+ <attribute name="uri">
48
+ <data type="anyURI"/>
49
+ </attribute>
50
+ </optional>
51
+ <optional>
52
+ <attribute name="coverpage">
53
+ <data type="boolean"/>
54
+ </attribute>
55
+ </optional>
56
+ <optional>
57
+ <attribute name="notag">
58
+ <data type="boolean"/>
59
+ </attribute>
60
+ </optional>
61
+ <optional>
62
+ <ref name="tname"/>
63
+ </optional>
64
+ <zeroOrMore>
65
+ <ref name="paragraph-with-footnote"/>
66
+ </zeroOrMore>
67
+ <zeroOrMore>
68
+ <ref name="note"/>
69
+ </zeroOrMore>
70
+ </element>
71
+ </define>
35
72
  <define name="index">
36
73
  <element name="index">
37
74
  <optional>
@@ -245,6 +282,9 @@
245
282
  <ref name="MultilingualRenderingType"/>
246
283
  </attribute>
247
284
  </optional>
285
+ <optional>
286
+ <ref name="tname"/>
287
+ </optional>
248
288
  <oneOrMore>
249
289
  <ref name="ul_li"/>
250
290
  </oneOrMore>
@@ -287,6 +327,9 @@
287
327
  </choice>
288
328
  </attribute>
289
329
  </optional>
330
+ <optional>
331
+ <ref name="tname"/>
332
+ </optional>
290
333
  <oneOrMore>
291
334
  <ref name="li"/>
292
335
  </oneOrMore>
@@ -323,6 +366,9 @@
323
366
  <ref name="MultilingualRenderingType"/>
324
367
  </attribute>
325
368
  </optional>
369
+ <optional>
370
+ <ref name="tname"/>
371
+ </optional>
326
372
  <oneOrMore>
327
373
  <ref name="dt"/>
328
374
  <ref name="dd"/>
@@ -851,6 +897,16 @@
851
897
  <ref name="MultilingualRenderingType"/>
852
898
  </attribute>
853
899
  </optional>
900
+ <optional>
901
+ <attribute name="coverpage">
902
+ <data type="boolean"/>
903
+ </attribute>
904
+ </optional>
905
+ <optional>
906
+ <attribute name="notag">
907
+ <data type="boolean"/>
908
+ </attribute>
909
+ </optional>
854
910
  <oneOrMore>
855
911
  <choice>
856
912
  <ref name="paragraph"/>
@@ -1178,6 +1234,7 @@
1178
1234
  <ref name="concept"/>
1179
1235
  <ref name="add"/>
1180
1236
  <ref name="del"/>
1237
+ <ref name="span"/>
1181
1238
  </choice>
1182
1239
  </define>
1183
1240
  <define name="add">
@@ -1204,6 +1261,14 @@
1204
1261
  </choice>
1205
1262
  </element>
1206
1263
  </define>
1264
+ <define name="span">
1265
+ <element name="span">
1266
+ <attribute name="class"/>
1267
+ <oneOrMore>
1268
+ <ref name="TextElement"/>
1269
+ </oneOrMore>
1270
+ </element>
1271
+ </define>
1207
1272
  <define name="concept">
1208
1273
  <element name="concept">
1209
1274
  <optional>
@@ -19,6 +19,9 @@
19
19
  <value>steps</value>
20
20
  </attribute>
21
21
  </optional>
22
+ <optional>
23
+ <ref name="tname"/>
24
+ </optional>
22
25
  <oneOrMore>
23
26
  <ref name="li"/>
24
27
  </oneOrMore>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ITU
3
- VERSION = "2.0.8.1".freeze
3
+ VERSION = "2.1.2".freeze
4
4
  end
5
5
  end
@@ -0,0 +1,3 @@
1
+ template:
2
+ # skip standardidentifier, it is inserted in front of formattedref within metanorma
3
+ standard: "<em>{{ title }}</em> ,_{{ edition | capitalize_first }} . {{ extent }}."
@@ -0,0 +1,13 @@
1
+ require "relaton-render"
2
+
3
+ module Relaton
4
+ module Render
5
+ module ITU
6
+ class General < ::Relaton::Render::IsoDoc::General
7
+ def config_loc
8
+ YAML.load_file(File.join(File.dirname(__FILE__), "config.yml"))
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
26
26
 
27
27
  spec.add_dependency "htmlentities", "~> 4.3.4"
28
- spec.add_dependency "metanorma-standoc", "~> 2.0.0"
28
+ spec.add_dependency "metanorma-standoc", "~> 2.1.0"
29
29
  spec.add_dependency "ruby-jing"
30
30
  spec.add_dependency "twitter_cldr", ">= 3.0.0"
31
31
  spec.add_dependency "tzinfo-data" # we need this for windows only