metanorma-standoc 1.6.4 → 1.6.5

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 (31) hide show
  1. checksums.yaml +4 -4
  2. data/lib/asciidoctor/standoc/base.rb +8 -16
  3. data/lib/asciidoctor/standoc/basicdoc.rng +32 -0
  4. data/lib/asciidoctor/standoc/cleanup.rb +1 -1
  5. data/lib/asciidoctor/standoc/cleanup_ref.rb +17 -24
  6. data/lib/asciidoctor/standoc/cleanup_terms.rb +3 -0
  7. data/lib/asciidoctor/standoc/converter.rb +3 -0
  8. data/lib/asciidoctor/standoc/isodoc.rng +15 -0
  9. data/lib/asciidoctor/standoc/macros.rb +19 -63
  10. data/lib/asciidoctor/standoc/macros_terms.rb +82 -0
  11. data/lib/asciidoctor/standoc/ref.rb +12 -21
  12. data/lib/asciidoctor/standoc/table.rb +12 -0
  13. data/lib/asciidoctor/standoc/term_lookup_cleanup.rb +86 -0
  14. data/lib/metanorma/standoc/version.rb +1 -1
  15. data/spec/asciidoctor-standoc/blocks_spec.rb +8 -8
  16. data/spec/asciidoctor-standoc/cleanup_sections_spec.rb +6 -6
  17. data/spec/asciidoctor-standoc/cleanup_spec.rb +70 -9
  18. data/spec/asciidoctor-standoc/macros_plantuml_spec.rb +307 -0
  19. data/spec/asciidoctor-standoc/macros_spec.rb +228 -277
  20. data/spec/asciidoctor-standoc/section_spec.rb +11 -11
  21. data/spec/asciidoctor-standoc/table_spec.rb +86 -0
  22. data/spec/fixtures/diagram_definitions.lutaml +4 -4
  23. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +49 -49
  24. data/spec/vcr_cassettes/isobib_get_123.yml +14 -14
  25. data/spec/vcr_cassettes/isobib_get_123_1.yml +28 -28
  26. data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +37 -37
  27. data/spec/vcr_cassettes/isobib_get_123_2001.yml +14 -14
  28. data/spec/vcr_cassettes/isobib_get_124.yml +14 -14
  29. data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +8 -8
  30. data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +51 -61
  31. metadata +5 -2
@@ -1,6 +1,6 @@
1
1
  module Asciidoctor
2
2
  module Standoc
3
- module Lists
3
+ module Refs
4
4
  def iso_publisher(t, code)
5
5
  code.sub(/ .*$/, "").split(/\//).each do |abbrev|
6
6
  t.contributor do |c|
@@ -70,8 +70,7 @@ module Asciidoctor
70
70
 
71
71
  def isorefmatches(xml, m)
72
72
  yr = norm_year(m[:year])
73
- ref = fetch_ref xml, m[:code], yr, title: m[:text], usrlbl: m[:usrlbl],
74
- lang: (@lang || :all)
73
+ ref = fetch_ref xml, m[:code], yr, title: m[:text], usrlbl: m[:usrlbl], lang: (@lang || :all)
75
74
  return use_my_anchor(ref, m[:anchor]) if ref
76
75
  xml.bibitem **attr_code(ref_attributes(m)) do |t|
77
76
  isorefrender1(t, m, yr)
@@ -105,8 +104,7 @@ module Asciidoctor
105
104
  def conditional_date(t, m, noyr)
106
105
  m.names.include?("year") and !m[:year].nil? and
107
106
  t.date(**{ type: "published" }) do |d|
108
- noyr and d.on "--" or
109
- set_date_range(d, norm_year(m[:year]))
107
+ noyr and d.on "--" or set_date_range(d, norm_year(m[:year]))
110
108
  end
111
109
  end
112
110
 
@@ -114,8 +112,7 @@ module Asciidoctor
114
112
  yr = norm_year(m[:year])
115
113
  hasyr = !yr.nil? && yr != "--"
116
114
  ref = fetch_ref xml, m[:code], hasyr ? yr : nil, all_parts: true,
117
- no_year: yr == "--", text: m[:text], usrlbl: m[:usrlbl],
118
- lang: (@lang || :all)
115
+ no_year: yr == "--", text: m[:text], usrlbl: m[:usrlbl], lang: (@lang || :all)
119
116
  return use_my_anchor(ref, m[:anchor]) if ref
120
117
  isorefmatches3_1(xml, m, yr, hasyr, ref)
121
118
  end
@@ -140,8 +137,7 @@ module Asciidoctor
140
137
  end
141
138
  docid(t, m[:usrlbl]) if m[:usrlbl]
142
139
  docid(t, /^\d+$/.match(code[:id]) ? "[#{code[:id]}]" : code[:id])
143
- code[:type] == "repo" and
144
- t.docidentifier code[:key], **{ type: "repository" }
140
+ code[:type] == "repo" and t.docidentifier code[:key], **{ type: "repository" }
145
141
  end
146
142
 
147
143
  def refitem_render(xml, m, code)
@@ -155,9 +151,8 @@ module Asciidoctor
155
151
  end
156
152
 
157
153
  MALFORMED_REF = "no anchor on reference, markup may be malformed: see "\
158
- "https://www.metanorma.com/author/topics/document-format/"\
159
- "bibliography/ , https://www.metanorma.com/author/iso/topics/markup/"\
160
- "#bibliographies".freeze
154
+ "https://www.metanorma.com/author/topics/document-format/bibliography/ , "\
155
+ "https://www.metanorma.com/author/iso/topics/markup/#bibliographies".freeze
161
156
 
162
157
  def analyse_ref_nofetch(ret)
163
158
  return ret unless m = /^nofetch\((?<id>.+)\)$/.match(ret[:id])
@@ -165,9 +160,8 @@ module Asciidoctor
165
160
  end
166
161
 
167
162
  def analyse_ref_repo_path(ret)
168
- return ret unless m =
169
- /^(?<type>repo|path):\((?<key>[^,]+),?(?<id>.*)\)$/.match(ret[:id])
170
- id = m[:id].empty? ? m[:key].sub(%r{^[^/]+/}, "") : m[:id]
163
+ return ret unless m = /^(?<type>repo|path):\((?<key>[^,]+),?(?<id>.*)\)$/.match(ret[:id])
164
+ id = m[:id].empty? ? m[:key].sub(%r{^[^/]+/}, "") : m[:id]
171
165
  ret.merge(id: id, type: m[:type], key: m[:key], nofetch: true)
172
166
  end
173
167
 
@@ -194,8 +188,7 @@ module Asciidoctor
194
188
  def refitem1(xml, item, m)
195
189
  code = analyse_ref_code(m[:code])
196
190
  unless code[:id] && code[:numeric] || code[:nofetch]
197
- ref = fetch_ref xml, code[:id],
198
- m.names.include?("year") ? m[:year] : nil, title: m[:text],
191
+ ref = fetch_ref xml, code[:id], m.names.include?("year") ? m[:year] : nil, title: m[:text],
199
192
  usrlbl: m[:usrlbl], lang: (@lang || :all)
200
193
  return use_my_anchor(ref, m[:anchor]) if ref
201
194
  end
@@ -212,8 +205,7 @@ module Asciidoctor
212
205
 
213
206
  ISO_REF = %r{^<ref\sid="(?<anchor>[^"]+)">
214
207
  \[(?<usrlbl>\([^)]+\))?(?<code>(ISO|IEC)[^0-9]*\s[0-9-]+|IEV)
215
- (:(?<year>[0-9][0-9-]+))?\]</ref>,?\s*
216
- (?<text>.*)$}xm
208
+ (:(?<year>[0-9][0-9-]+))?\]</ref>,?\s*(?<text>.*)$}xm
217
209
 
218
210
  ISO_REF_NO_YEAR = %r{^<ref\sid="(?<anchor>[^"]+)">
219
211
  \[(?<usrlbl>\([^)]+\))?(?<code>(ISO|IEC)[^0-9]*\s[0-9-]+):
@@ -239,8 +231,7 @@ module Asciidoctor
239
231
 
240
232
  def reference1(node, item, xml)
241
233
  matched, matched2, matched3 = reference1_matches(item)
242
- if matched3.nil? && matched2.nil? && matched.nil?
243
- refitem(xml, item, node)
234
+ if matched3.nil? && matched2.nil? && matched.nil? then refitem(xml, item, node)
244
235
  elsif !matched.nil? then isorefmatches(xml, matched)
245
236
  elsif !matched2.nil? then isorefmatches2(xml, matched2)
246
237
  elsif !matched3.nil? then isorefmatches3(xml, matched3)
@@ -17,6 +17,7 @@ module Asciidoctor
17
17
  @table_fn_number = "a"
18
18
  noko do |xml|
19
19
  xml.table **attr_code(table_attrs(node)) do |xml_table|
20
+ colgroup(node, xml_table)
20
21
  table_name(node, xml_table)
21
22
  %i(head body foot).reject do |tblsec|
22
23
  node.rows[tblsec].empty?
@@ -28,6 +29,17 @@ module Asciidoctor
28
29
 
29
30
  private
30
31
 
32
+ def colgroup(node, xml_table)
33
+ return if node.option? "autowidth"
34
+ cols = node&.attr("cols")&.split(/,/) or return
35
+ return unless cols.size > 1 and cols.all? { |c| /\d/.match(c) }
36
+ xml_table.colgroup do |cg|
37
+ node.columns.each do |col|
38
+ cg.col **{ width: "#{col.attr 'colpcwidth'}%" }
39
+ end
40
+ end
41
+ end
42
+
31
43
  def table_name(node, xml_table)
32
44
  if node.title?
33
45
  xml_table.name do |n|
@@ -0,0 +1,86 @@
1
+ # frozen_string_literal: true.
2
+
3
+ module Asciidoctor
4
+ module Standoc
5
+ # Intelligent term lookup xml modifier
6
+ # Lookup all `term` and `calause` tags and replace `termxref` tags with
7
+ # `xref`:target tag
8
+ class TermLookupCleanup
9
+ AUTOMATIC_GENERATED_ID_REGEXP = /\A_/
10
+ EXISTING_TERM_REGEXP = /\Aterm-/
11
+
12
+ attr_reader :xmldoc, :termlookup, :log
13
+
14
+ def initialize(xmldoc, log)
15
+ @xmldoc = xmldoc
16
+ @log = log
17
+ @termlookup = {}
18
+ end
19
+
20
+ def call
21
+ @termlookup = replace_automatic_generated_ids_terms
22
+ set_termxref_tags_target
23
+ end
24
+
25
+ private
26
+
27
+ def set_termxref_tags_target
28
+ xmldoc.xpath('//termxref').each do |node|
29
+ target = normalize_ref_id(node.text)
30
+ if termlookup[target].nil?
31
+ remove_missing_ref(node, target)
32
+ next
33
+ end
34
+ modify_ref_node(node, target)
35
+ end
36
+ end
37
+
38
+ def remove_missing_ref(node, target)
39
+ log.add('AsciiDoc Input', node,
40
+ %(Error: Term reference in `term[#{target}]` missing: \
41
+ "#{target}" is not defined in document))
42
+ term_name_node = node.previous.previous
43
+ term_name_node.remove
44
+ term_name_node.name = "strong"
45
+ term_name_node.children.first.content =
46
+ %(term "#{term_name_node.text}" not resolved)
47
+ node.add_previous_sibling(term_name_node)
48
+ node.remove
49
+ end
50
+
51
+ def modify_ref_node(node, target)
52
+ node.name = 'xref'
53
+ node['target'] = termlookup[target]
54
+ node.children.remove
55
+ node.remove_attribute('defaultref')
56
+ end
57
+
58
+ def replace_automatic_generated_ids_terms
59
+ xmldoc.xpath('//term').each.with_object({}) do |term_node, res|
60
+ normalize_id_and_memorize(term_node, res, './preferred')
61
+ end
62
+ end
63
+
64
+ def normalize_id_and_memorize(term_node, res_table, text_selector)
65
+ term_text = normalize_ref_id(term_node.at(text_selector).text)
66
+ unless AUTOMATIC_GENERATED_ID_REGEXP.match(term_node['id']).nil?
67
+ term_node['id'] = unique_text_id(term_text)
68
+ end
69
+ res_table[term_text] = term_node['id']
70
+ end
71
+
72
+ def normalize_ref_id(text)
73
+ text.downcase.gsub(/[[:space:]]/, '-')
74
+ end
75
+
76
+ def unique_text_id(text)
77
+ return "term-#{text}" if xmldoc.at("//*[@id = 'term-#{text}']").nil?
78
+ (1..Float::INFINITY).lazy.each do |index|
79
+ if xmldoc.at("//*[@id = 'term-#{text}-#{index}']").nil?
80
+ break("term-#{text}-#{index}")
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
@@ -19,6 +19,6 @@ module Metanorma
19
19
  end
20
20
 
21
21
  module Standoc
22
- VERSION = "1.6.4".freeze
22
+ VERSION = "1.6.5".freeze
23
23
  end
24
24
  end
@@ -318,7 +318,7 @@ RSpec.describe Asciidoctor::Standoc do
318
318
  <terms id="_" obligation="normative">
319
319
  <title>Terms and definitions</title>
320
320
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
321
- <term id="_">
321
+ <term id="term-term1">
322
322
  <preferred>Term1</preferred>
323
323
  <termnote id="_">
324
324
  <p id="_">This is a note</p>
@@ -383,7 +383,7 @@ RSpec.describe Asciidoctor::Standoc do
383
383
  <sections>
384
384
  <terms id="_" obligation="normative"><title>Terms, definitions and symbols</title>
385
385
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
386
- <term id="_">
386
+ <term id="term-term1">
387
387
  <preferred>Term1</preferred>
388
388
  </term>
389
389
  <definitions id="_" obligation="normative" type="symbols">
@@ -528,7 +528,7 @@ RSpec.describe Asciidoctor::Standoc do
528
528
  <terms id="_" obligation="normative">
529
529
  <title>Terms and definitions</title>
530
530
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
531
- <term id="_">
531
+ <term id="term-term1">
532
532
  <preferred>Term1</preferred>
533
533
 
534
534
  <termexample id="ABC">
@@ -583,7 +583,7 @@ RSpec.describe Asciidoctor::Standoc do
583
583
  #{BLANK_HDR}
584
584
  <sections>
585
585
  <terms id="_" obligation="normative"><title>Terms, definitions and symbols</title>
586
- <p id="_">For the purposes of this document, the following terms and definitions apply.</p><term id="_">
586
+ <p id="_">For the purposes of this document, the following terms and definitions apply.</p><term id="term-term1">
587
587
  <preferred>Term1</preferred>
588
588
  </term>
589
589
  <definitions id="_" obligation="normative" type="symbols">
@@ -972,7 +972,7 @@ RSpec.describe Asciidoctor::Standoc do
972
972
  <terms id="_" obligation="normative">
973
973
  <title>Terms and definitions</title><p id="_">For the purposes of this document,
974
974
  the following terms and definitions apply.</p>
975
- <term id="_">
975
+ <term id="term-term1">
976
976
  <preferred>Term1</preferred>
977
977
  <termsource status="identical">
978
978
  <origin bibitemid="ISO2191" type="inline" citeas="">
@@ -982,7 +982,7 @@ RSpec.describe Asciidoctor::Standoc do
982
982
  </origin>
983
983
  </termsource>
984
984
  </term>
985
- <term id='_'>
985
+ <term id='term-term2'>
986
986
  <preferred>Term2</preferred>
987
987
  <definition>
988
988
  <p id='_'>Definition</p>
@@ -1032,7 +1032,7 @@ RSpec.describe Asciidoctor::Standoc do
1032
1032
  <title>Terms and definitions</title>
1033
1033
  <p id="_">For the purposes of this document,
1034
1034
  the following terms and definitions apply.</p>
1035
- <term id="_">
1035
+ <term id="term-term1">
1036
1036
  <preferred>Term1</preferred>
1037
1037
  <termsource status="modified">
1038
1038
  <origin bibitemid="ISO2191" type="inline" citeas="">
@@ -1045,7 +1045,7 @@ RSpec.describe Asciidoctor::Standoc do
1045
1045
  </modification>
1046
1046
  </termsource>
1047
1047
  </term>
1048
- <term id='_'>
1048
+ <term id='term-term2'>
1049
1049
  <preferred>Term2</preferred>
1050
1050
  <definition>
1051
1051
  <p id='_'>Definition</p>
@@ -21,7 +21,7 @@ RSpec.describe Asciidoctor::Standoc do
21
21
  <terms id="_" obligation="normative"><title>Terms and definitions</title>
22
22
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
23
23
 
24
- <term id="_">
24
+ <term id="term-time">
25
25
  <preferred>Time</preferred>
26
26
  <definition><p id="_">This paragraph is extraneous</p></definition>
27
27
  </term></terms>
@@ -456,7 +456,7 @@ INPUT
456
456
  </fn>
457
457
  </title>
458
458
  <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
459
- <term id='_'>
459
+ <term id='term-term1'>
460
460
  <preferred>Term1</preferred>
461
461
  </term>
462
462
  </terms>
@@ -728,7 +728,7 @@ INPUT
728
728
  <terms id='_' obligation='normative'>
729
729
  <title>Terms and definitions</title>
730
730
  <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
731
- <term id='_'>
731
+ <term id='term-term1'>
732
732
  <preferred>Term1</preferred>
733
733
  </term>
734
734
  </terms>
@@ -962,7 +962,7 @@ INPUT
962
962
  Pour les besoins du présent document, les termes et définitions suivants
963
963
  s’appliquent.
964
964
  </p>
965
- <term id='_'>
965
+ <term id='term-term1'>
966
966
  <preferred>Term1</preferred>
967
967
  </term>
968
968
  </terms>
@@ -1193,7 +1193,7 @@ INPUT
1193
1193
  <terms id='_' obligation='normative'>
1194
1194
  <title>术语和定义</title>
1195
1195
  <p id='_'>下列术语和定义适用于本文件。</p>
1196
- <term id='_'>
1196
+ <term id='term-term1'>
1197
1197
  <preferred>Term1</preferred>
1198
1198
  </term>
1199
1199
  </terms>
@@ -1424,7 +1424,7 @@ INPUT
1424
1424
  <terms id='_' obligation='normative'>
1425
1425
  <title>Terms and definitions</title>
1426
1426
  <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
1427
- <term id='_'>
1427
+ <term id='term-term1'>
1428
1428
  <preferred>Term1</preferred>
1429
1429
  </term>
1430
1430
  </terms>
@@ -158,7 +158,7 @@ RSpec.describe Asciidoctor::Standoc do
158
158
  <terms id="_" obligation="normative">
159
159
  <title>Terms and definitions</title>
160
160
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
161
- <term id="_"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
161
+ <term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
162
162
  <mrow>
163
163
  <mi>t</mi>
164
164
  </mrow>
@@ -200,11 +200,11 @@ RSpec.describe Asciidoctor::Standoc do
200
200
  <terms id="_" obligation="normative">
201
201
  <title>Terms and definitions</title>
202
202
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
203
- <term id="_">
203
+ <term id="term-tempus">
204
204
  <preferred>Tempus</preferred>
205
205
  <domain>relativity</domain><definition><p id="_"> Time</p></definition>
206
206
  </term>
207
- <term id='_'>
207
+ <term id='term-tempus1'>
208
208
  <preferred>Tempus1</preferred>
209
209
  <domain>relativity2</domain>
210
210
  <definition>
@@ -243,7 +243,7 @@ RSpec.describe Asciidoctor::Standoc do
243
243
  <terms id="_" obligation="normative">
244
244
  <title>Terms and definitions</title>
245
245
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
246
- <term id="_"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
246
+ <term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
247
247
  <mrow>
248
248
  <mi>t</mi>
249
249
  </mrow>
@@ -530,7 +530,7 @@ RSpec.describe Asciidoctor::Standoc do
530
530
  <terms id="_" obligation="normative">
531
531
  <title>Terms and definitions</title>
532
532
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
533
- <term id="_">
533
+ <term id="term-term1">
534
534
  <preferred>Term1</preferred>
535
535
  <termsource status="identical">
536
536
  <origin bibitemid="ISO2191" type="inline" citeas="">
@@ -1059,7 +1059,7 @@ RSpec.describe Asciidoctor::Standoc do
1059
1059
  <terms id="_" obligation="normative">
1060
1060
  <title>Terms and definitions</title>
1061
1061
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
1062
- <term id="_"><preferred>Term</preferred>
1062
+ <term id="term-term"><preferred>Term</preferred>
1063
1063
 
1064
1064
 
1065
1065
 
@@ -1123,7 +1123,7 @@ RSpec.describe Asciidoctor::Standoc do
1123
1123
  <sections>
1124
1124
  <terms id="_" obligation="normative"><title>Terms and definitions</title>
1125
1125
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
1126
- <term id="_">
1126
+ <term id="term-automation1">
1127
1127
  <preferred>Automation1</preferred>
1128
1128
  <termsource status="identical">
1129
1129
  <origin bibitemid="IEC60050-103" type="inline" citeas="IEC 60050-103:2009">
@@ -1133,7 +1133,7 @@ RSpec.describe Asciidoctor::Standoc do
1133
1133
  </origin>
1134
1134
  </termsource>
1135
1135
  </term>
1136
- <term id="_">
1136
+ <term id="term-automation2">
1137
1137
  <preferred>Automation2</preferred>
1138
1138
  <termsource status="identical">
1139
1139
  <origin bibitemid="IEC60050-102" type="inline" citeas="IEC 60050-102:2007">
@@ -1143,7 +1143,7 @@ RSpec.describe Asciidoctor::Standoc do
1143
1143
  </origin>
1144
1144
  </termsource>
1145
1145
  </term>
1146
- <term id="_">
1146
+ <term id="term-automation3">
1147
1147
  <preferred>Automation3</preferred>
1148
1148
  <termsource status="identical">
1149
1149
  <origin bibitemid="IEC60050-103" type="inline" citeas="IEC 60050-103:2009">
@@ -1415,6 +1415,14 @@ OUTPUT
1415
1415
  * [[[iso125,ISO 125]]] _Standard 124_
1416
1416
  * [[[iso126,1]]] _Standard 123_
1417
1417
 
1418
+ [bibliography]
1419
+ == Bibliography Redux
1420
+
1421
+ [bibliography]
1422
+ === Clause 1
1423
+ * [[[iso127,ISO 124]]] _Standard 124_
1424
+ * [[[iso128,1]]] _Standard 123_
1425
+
1418
1426
  INPUT
1419
1427
  #{BLANK_HDR}
1420
1428
  <sections><clause id="_" inline-header="false" obligation="normative">
@@ -1462,6 +1470,29 @@ OUTPUT
1462
1470
  </formattedref>
1463
1471
  <docidentifier type="metanorma">[4]</docidentifier>
1464
1472
  </bibitem>
1473
+ </references>
1474
+ </clause>
1475
+ <clause id='_' obligation='informative'>
1476
+ <title>Bibliography Redux</title>
1477
+ <references id='_' normative='false' obligation='informative'>
1478
+ <title>Clause 1</title>
1479
+ <bibitem id='iso127' type='standard'>
1480
+ <title format='text/plain'>Standard 124</title>
1481
+ <docidentifier>ISO 124</docidentifier>
1482
+ <docnumber>124</docnumber>
1483
+ <contributor>
1484
+ <role type='publisher'/>
1485
+ <organization>
1486
+ <name>ISO</name>
1487
+ </organization>
1488
+ </contributor>
1489
+ </bibitem>
1490
+ <bibitem id='iso128'>
1491
+ <formattedref format='application/x-isodoc+xml'>
1492
+ <em>Standard 123</em>
1493
+ </formattedref>
1494
+ <docidentifier type='metanorma'>[6]</docidentifier>
1495
+ </bibitem>
1465
1496
  </references></clause></bibliography>
1466
1497
  </standard-document>
1467
1498
  OUTPUT
@@ -1927,6 +1958,11 @@ Author
1927
1958
  <mi>α</mi>
1928
1959
  <mo>+</mo>
1929
1960
  <mi>AB</mi>
1961
+ <mstyle mathvariant="italic">
1962
+ <mrow>
1963
+ <mi>Α</mi>
1964
+ </mrow>
1965
+ </mstyle>
1930
1966
  </math>
1931
1967
  ++++
1932
1968
  INPUT
@@ -1946,6 +1982,11 @@ expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_foo
1946
1982
  <mi>α</mi>
1947
1983
  <mo>+</mo>
1948
1984
  <mi>AB</mi>
1985
+ <mstyle mathvariant='italic'>
1986
+ <mrow>
1987
+ <mi>Α</mi>
1988
+ </mrow>
1989
+ </mstyle>
1949
1990
  </math>
1950
1991
  </stem>
1951
1992
  </formula>
@@ -1968,6 +2009,11 @@ expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_foo
1968
2009
  <mi>α</mi>
1969
2010
  <mo>+</mo>
1970
2011
  <mi>AB</mi>
2012
+ <mstyle mathvariant='italic'>
2013
+ <mrow>
2014
+ <mi>Α</mi>
2015
+ </mrow>
2016
+ </mstyle>
1971
2017
  </math>
1972
2018
  </stem>
1973
2019
  </formula>
@@ -1990,6 +2036,11 @@ expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_foo
1990
2036
  <mi>α</mi>
1991
2037
  <mo>+</mo>
1992
2038
  <mi>AB</mi>
2039
+ <mstyle mathvariant='italic'>
2040
+ <mrow>
2041
+ <mi>Α</mi>
2042
+ </mrow>
2043
+ </mstyle>
1993
2044
  </math>
1994
2045
  </stem>
1995
2046
  </formula>
@@ -2012,6 +2063,11 @@ expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_foo
2012
2063
  <mi mathvariant="normal">α</mi>
2013
2064
  <mo>+</mo>
2014
2065
  <mi>AB</mi>
2066
+ <mstyle mathvariant='italic'>
2067
+ <mrow>
2068
+ <mi>Α</mi>
2069
+ </mrow>
2070
+ </mstyle>
2015
2071
  </math>
2016
2072
  </stem>
2017
2073
  </formula>
@@ -2034,6 +2090,11 @@ expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_foo
2034
2090
  <mi>α</mi>
2035
2091
  <mo>+</mo>
2036
2092
  <mi>AB</mi>
2093
+ <mstyle mathvariant='italic'>
2094
+ <mrow>
2095
+ <mi>Α</mi>
2096
+ </mrow>
2097
+ </mstyle>
2037
2098
  </math>
2038
2099
  </stem>
2039
2100
  </formula>