metanorma-standoc 1.8.8 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.devel +0 -0
- data/lib/asciidoctor/standoc/base.rb +11 -1
- data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +23 -14
- data/lib/asciidoctor/standoc/cleanup_section.rb +16 -15
- data/lib/asciidoctor/standoc/converter.rb +3 -1
- data/lib/asciidoctor/standoc/inline.rb +1 -1
- data/lib/asciidoctor/standoc/isodoc.rng +130 -1
- data/lib/asciidoctor/standoc/macros.rb +40 -13
- data/lib/asciidoctor/standoc/terms.rb +10 -6
- data/lib/metanorma/standoc/version.rb +5 -5
- data/metanorma-standoc.gemspec +9 -9
- data/spec/asciidoctor/base_spec.rb +14 -1
- data/spec/asciidoctor/blocks_spec.rb +10 -0
- data/spec/asciidoctor/cleanup_spec.rb +1864 -1877
- data/spec/asciidoctor/inline_spec.rb +272 -273
- data/spec/asciidoctor/macros_spec.rb +8 -2
- data/spec/asciidoctor/section_spec.rb +670 -687
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +58 -58
- data/spec/vcr_cassettes/isobib_get_123.yml +14 -14
- data/spec/vcr_cassettes/isobib_get_123_1.yml +27 -27
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +40 -40
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +15 -15
- data/spec/vcr_cassettes/isobib_get_124.yml +17 -17
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +62 -60
- metadata +65 -64
@@ -79,16 +79,20 @@ module Asciidoctor
|
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
82
|
-
def term_source_attrs(seen_xref)
|
83
|
-
|
84
|
-
|
82
|
+
def term_source_attrs(node, seen_xref)
|
83
|
+
{ case: seen_xref.children[0]["case"],
|
84
|
+
droploc: seen_xref.children[0]["droploc"],
|
85
|
+
bibitemid: seen_xref.children[0]["target"],
|
86
|
+
format: seen_xref.children[0]["format"], type: "inline" }
|
85
87
|
end
|
86
88
|
|
87
|
-
def add_term_source(xml_t, seen_xref, m)
|
89
|
+
def add_term_source(node, xml_t, seen_xref, m)
|
88
90
|
if seen_xref.children[0].name == "concept"
|
89
91
|
xml_t.origin { |o| o << seen_xref.children[0].to_xml }
|
90
92
|
else
|
91
|
-
|
93
|
+
attrs = term_source_attrs(node, seen_xref)
|
94
|
+
attrs.delete(:text)
|
95
|
+
xml_t.origin seen_xref.children[0].content, **attr_code(attrs)
|
92
96
|
end
|
93
97
|
m[:text] && xml_t.modification do |mod|
|
94
98
|
mod.p { |p| p << m[:text].sub(/^\s+/, "") }
|
@@ -116,7 +120,7 @@ module Asciidoctor
|
|
116
120
|
attrs = { status: matched[:text] ? "modified" : "identical" }
|
117
121
|
xml.termsource **attrs do |xml_t|
|
118
122
|
seen_xref = Nokogiri::XML.fragment(matched[:xref])
|
119
|
-
add_term_source(xml_t, seen_xref, matched)
|
123
|
+
add_term_source(node, xml_t, seen_xref, matched)
|
120
124
|
end
|
121
125
|
end.join("\n")
|
122
126
|
end
|
@@ -8,17 +8,17 @@ module Metanorma
|
|
8
8
|
|
9
9
|
def all_modules(mod)
|
10
10
|
[mod] + mod.constants.map { |c| mod.const_get(c) }
|
11
|
-
.select {|c| c.is_a?(Module) && parent_of(c) == mod }
|
12
|
-
.flat_map {|m| all_modules(m) }
|
11
|
+
.select { |c| c.is_a?(Module) && parent_of(c) == mod }
|
12
|
+
.flat_map { |m| all_modules(m) }
|
13
13
|
end
|
14
14
|
|
15
15
|
def versioned(mod, flavour)
|
16
|
-
all_modules(mod).select {|c| defined? c::VERSION}
|
17
|
-
select {|c| c.name =~ /::#{flavour}$/ }
|
16
|
+
all_modules(mod).select { |c| defined? c::VERSION }
|
17
|
+
.select { |c| c.name =~ /::#{flavour}$/ }
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
21
|
module Standoc
|
22
|
-
VERSION= "1.
|
22
|
+
VERSION = "1.9.0".freeze
|
23
23
|
end
|
24
24
|
end
|
data/metanorma-standoc.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
|
-
lib = File.expand_path("
|
3
|
+
lib = File.expand_path("lib", __dir__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
5
|
require "metanorma/standoc/version"
|
6
6
|
|
@@ -27,29 +27,29 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
28
28
|
|
29
29
|
spec.add_dependency "asciidoctor", "~> 2.0.0"
|
30
|
-
spec.add_dependency "ruby-jing"
|
31
|
-
spec.add_dependency "isodoc", "~> 1.5.0"
|
32
30
|
spec.add_dependency "iev", "~> 0.2.1"
|
31
|
+
spec.add_dependency "isodoc", "~> 1.6.0"
|
33
32
|
spec.add_dependency "metanorma-plugin-datastruct"
|
34
33
|
spec.add_dependency "metanorma-plugin-lutaml", "~> 0.3.0"
|
34
|
+
spec.add_dependency "ruby-jing"
|
35
35
|
# relaton-cli not just relaton, to avoid circular reference in metanorma
|
36
|
+
spec.add_dependency "asciimath2unitsml", "~> 0.3.0"
|
37
|
+
spec.add_dependency "concurrent-ruby"
|
38
|
+
spec.add_dependency "latexmath"
|
39
|
+
spec.add_dependency "mathml2asciimath"
|
40
|
+
spec.add_dependency "metanorma-utils", "~> 1.2.0"
|
36
41
|
spec.add_dependency "relaton-cli", "~> 1.7.0"
|
37
42
|
spec.add_dependency "relaton-iev", "~> 1.1.0"
|
38
|
-
spec.add_dependency "concurrent-ruby"
|
39
43
|
spec.add_dependency "unicode2latex", "~> 0.0.1"
|
40
|
-
spec.add_dependency "metanorma-utils", "~> 1.1.0"
|
41
|
-
spec.add_dependency "mathml2asciimath"
|
42
|
-
spec.add_dependency "latexmath"
|
43
|
-
spec.add_dependency "asciimath2unitsml", "~> 0.3.0"
|
44
44
|
|
45
45
|
spec.add_development_dependency "byebug"
|
46
|
-
spec.add_development_dependency "sassc", "2.4.0"
|
47
46
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
48
47
|
spec.add_development_dependency "guard", "~> 2.14"
|
49
48
|
spec.add_development_dependency "guard-rspec", "~> 4.7"
|
50
49
|
spec.add_development_dependency "rake", "~> 13.0"
|
51
50
|
spec.add_development_dependency "rspec", "~> 3.6"
|
52
51
|
spec.add_development_dependency "rubocop", "~> 1.5.2"
|
52
|
+
spec.add_development_dependency "sassc", "2.4.0"
|
53
53
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
54
54
|
spec.add_development_dependency "timecop", "~> 0.9"
|
55
55
|
spec.add_development_dependency "vcr", "~> 5.0.0"
|
@@ -763,7 +763,8 @@ OUTPUT
|
|
763
763
|
expect(html).to match(%r[an empty word intro page])
|
764
764
|
expect(html).to match(%r[word-override])
|
765
765
|
expect(html).to include('\o "1-3"')
|
766
|
-
expect(html).to include(%[Content-
|
766
|
+
expect(html).to include(%[Content-ID: <header.html>
|
767
|
+
Content-Disposition: inline; filename="header.html"
|
767
768
|
Content-Transfer-Encoding: base64
|
768
769
|
Content-Type: text/html charset="utf-8"
|
769
770
|
|
@@ -787,6 +788,18 @@ QU1FOiB0ZXN0Cgo=
|
|
787
788
|
expect(File.exist?("test.doc")).to be true
|
788
789
|
end
|
789
790
|
|
791
|
+
it "process mn2pdf attributes" do
|
792
|
+
node = Nokogiri::XML("<fake/>").at("fake")
|
793
|
+
node["mn2pdf-font-manifest-file"] = "passed/as/font/manifest/to/mn2pdf.jar"
|
794
|
+
|
795
|
+
options = Asciidoctor::Standoc::Converter
|
796
|
+
.new(:standoc, header_footer: true)
|
797
|
+
.doc_extract_attributes(node)
|
798
|
+
|
799
|
+
expect(options.dig(:mn2pdf, :font_manifest_file))
|
800
|
+
.to eq(node["mn2pdf-font-manifest-file"])
|
801
|
+
end
|
802
|
+
|
790
803
|
private
|
791
804
|
|
792
805
|
def mock_org_abbrevs
|
@@ -959,6 +959,9 @@ RSpec.describe Asciidoctor::Standoc do
|
|
959
959
|
[.source]
|
960
960
|
<<ISO2191,section=1>>
|
961
961
|
|
962
|
+
[.source]
|
963
|
+
<<ISO2191,droploc%capital%section=1>>
|
964
|
+
|
962
965
|
=== Term2
|
963
966
|
|
964
967
|
Definition
|
@@ -986,6 +989,13 @@ RSpec.describe Asciidoctor::Standoc do
|
|
986
989
|
</localityStack>
|
987
990
|
</origin>
|
988
991
|
</termsource>
|
992
|
+
<termsource status="identical">
|
993
|
+
<origin bibitemid="ISO2191" type="inline" citeas="" case='capital' droploc='true'>
|
994
|
+
<localityStack>
|
995
|
+
<locality type="section"><referenceFrom>1</referenceFrom></locality>
|
996
|
+
</localityStack>
|
997
|
+
</origin>
|
998
|
+
</termsource>
|
989
999
|
</term>
|
990
1000
|
<term id='term-term2'>
|
991
1001
|
<preferred>Term2</preferred>
|
@@ -3,141 +3,137 @@ require "relaton_iec"
|
|
3
3
|
require "fileutils"
|
4
4
|
|
5
5
|
RSpec.describe Asciidoctor::Standoc do
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
10
|
-
#{ASCIIDOC_BLANK_HDR}
|
11
|
-
|
12
|
-
[svgmap%unnumbered,number=8,subsequence=A,keep-with-next=true,keep-lines-together=true]
|
13
|
-
====
|
14
|
-
* <<ref1,Computer>>; http://www.example.com
|
15
|
-
====
|
16
|
-
|
17
|
-
[[ref1]]
|
18
|
-
.SVG title
|
19
|
-
[.svgmap]
|
20
|
-
====
|
21
|
-
image::action_schemaexpg1.svg[]
|
22
|
-
|
23
|
-
* <<ref1,Computer>>; mn://action_schema
|
24
|
-
* http://www.example.com[Phone]; http://www.example.com
|
25
|
-
====
|
26
|
-
|
27
|
-
[[ref2]]
|
28
|
-
[svgmap%unnumbered,number=8,subsequence=A,keep-with-next=true,keep-lines-together=true]
|
29
|
-
====
|
30
|
-
[alt=Workmap]
|
31
|
-
image::action_schemaexpg2.svg[]
|
32
|
-
|
33
|
-
* <<ref1,Computer>>;
|
34
|
-
* http://www.example.com[Phone]; mn://basic_attribute_schema
|
35
|
-
* <<express:action_schema:action_schema.basic,Coffee>>; mn://support_resource_schema
|
36
|
-
====
|
37
|
-
INPUT
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
OUTPUT
|
106
|
-
end
|
107
|
-
|
108
|
-
it "processes markup in sourcecode" do
|
6
|
+
it "processes svgmap" do
|
7
|
+
FileUtils.cp "spec/fixtures/action_schemaexpg1.svg", "action_schemaexpg1.svg"
|
8
|
+
FileUtils.cp "spec/fixtures/action_schemaexpg1.svg", "action_schemaexpg2.svg"
|
9
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).gsub(%r{<image.*?</image>}m, "<image/>").gsub(%r{<style.*?</style>}m, "<style/>")).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
10
|
+
#{ASCIIDOC_BLANK_HDR}
|
11
|
+
|
12
|
+
[svgmap%unnumbered,number=8,subsequence=A,keep-with-next=true,keep-lines-together=true]
|
13
|
+
====
|
14
|
+
* <<ref1,Computer>>; http://www.example.com
|
15
|
+
====
|
16
|
+
|
17
|
+
[[ref1]]
|
18
|
+
.SVG title
|
19
|
+
[.svgmap]
|
20
|
+
====
|
21
|
+
image::action_schemaexpg1.svg[]
|
22
|
+
|
23
|
+
* <<ref1,Computer>>; mn://action_schema
|
24
|
+
* http://www.example.com[Phone]; http://www.example.com
|
25
|
+
====
|
26
|
+
|
27
|
+
[[ref2]]
|
28
|
+
[svgmap%unnumbered,number=8,subsequence=A,keep-with-next=true,keep-lines-together=true]
|
29
|
+
====
|
30
|
+
[alt=Workmap]
|
31
|
+
image::action_schemaexpg2.svg[]
|
32
|
+
|
33
|
+
* <<ref1,Computer>>; mn://action_schema
|
34
|
+
* http://www.example.com[Phone]; mn://basic_attribute_schema
|
35
|
+
* <<express:action_schema:action_schema.basic,Coffee>>; mn://support_resource_schema
|
36
|
+
====
|
37
|
+
INPUT
|
38
|
+
#{BLANK_HDR}
|
39
|
+
<sections>
|
40
|
+
<svgmap unnumbered='true' number='8' subsequence='A' keep-with-next='true' keep-lines-together='true'>
|
41
|
+
<target href='http://www.example.com'>
|
42
|
+
<xref target='ref1'>Computer</xref>
|
43
|
+
</target>
|
44
|
+
</svgmap>
|
45
|
+
<figure id='ref1'>
|
46
|
+
<name>SVG title</name>
|
47
|
+
<?xml version="1.0" encoding="utf-8"??>
|
48
|
+
<!-- Generator: Adobe Illustrator 25.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
49
|
+
<svg xmlns='http://www.w3.org/2000/svg' version='1.1' id='Layer_1' x='0px' y='0px' viewbox='0 0 595.28 841.89' style='enable-background:new 0 0 595.28 841.89;' xml:space='preserve' xmlns:xlink='http://www.w3.org/1999/xlink'>
|
50
|
+
<style/>
|
51
|
+
<image/>
|
52
|
+
<a xlink:href='#ref1'>
|
53
|
+
<rect x='123.28' y='273.93' class='st0' width='88.05' height='41.84'/>
|
54
|
+
</a>
|
55
|
+
<a xlink:href='mn://basic_attribute_schema'>
|
56
|
+
<rect x='324.69' y='450.52' class='st0' width='132.62' height='40.75'/>
|
57
|
+
</a>
|
58
|
+
<a xlink:href='mn://support_resource_schema'>
|
59
|
+
<rect x='324.69' y='528.36' class='st0' width='148.16' height='40.75'/>
|
60
|
+
</a>
|
61
|
+
</svg>
|
62
|
+
</figure>
|
63
|
+
<svgmap>
|
64
|
+
<figure id='ref2' unnumbered='true' number='8' subsequence='A' keep-with-next='true' keep-lines-together='true'>
|
65
|
+
<?xml version="1.0" encoding="utf-8"??>
|
66
|
+
<!-- Generator: Adobe Illustrator 25.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
67
|
+
<svg xmlns='http://www.w3.org/2000/svg' version='1.1' id='Layer_1' x='0px' y='0px' viewbox='0 0 595.28 841.89' style='enable-background:new 0 0 595.28 841.89;' xml:space='preserve' xmlns:xlink='http://www.w3.org/1999/xlink'>
|
68
|
+
<style/>
|
69
|
+
<image/>
|
70
|
+
<a xlink:href='#ref1'>
|
71
|
+
<rect x='123.28' y='273.93' class='st0' width='88.05' height='41.84'/>
|
72
|
+
</a>
|
73
|
+
<a xlink:href='http://www.example.com'>
|
74
|
+
<rect x='324.69' y='450.52' class='st0' width='132.62' height='40.75'/>
|
75
|
+
</a>
|
76
|
+
<a xlink:href='mn://support_resource_schema'>
|
77
|
+
<rect x='324.69' y='528.36' class='st0' width='148.16' height='40.75'/>
|
78
|
+
</a>
|
79
|
+
</svg>
|
80
|
+
</figure>
|
81
|
+
<target href='mn://support_resource_schema'>
|
82
|
+
<eref bibitemid='express_action_schema' citeas=''>
|
83
|
+
<localityStack>
|
84
|
+
<locality type='anchor'>
|
85
|
+
<referenceFrom>action_schema.basic</referenceFrom>
|
86
|
+
</locality>
|
87
|
+
</localityStack>
|
88
|
+
Coffee
|
89
|
+
</eref>
|
90
|
+
</target>
|
91
|
+
</svgmap>
|
92
|
+
</sections>
|
93
|
+
<bibliography>
|
94
|
+
<references hidden='true' normative='false'>
|
95
|
+
<bibitem id='express_action_schema' type='internal'>
|
96
|
+
<docidentifier type='repository'>express/action_schema</docidentifier>
|
97
|
+
</bibitem>
|
98
|
+
</references>
|
99
|
+
</bibliography>
|
100
|
+
</standard-document>
|
101
|
+
OUTPUT
|
102
|
+
end
|
103
|
+
|
104
|
+
it "processes markup in sourcecode" do
|
109
105
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
110
|
-
|
111
|
-
|
112
|
-
[source]
|
113
|
-
----
|
114
|
-
<tag/>
|
115
|
-
----
|
106
|
+
#{ASCIIDOC_BLANK_HDR}
|
116
107
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
108
|
+
[source]
|
109
|
+
----
|
110
|
+
<tag/>
|
111
|
+
----
|
112
|
+
|
113
|
+
[[A]]
|
114
|
+
[source]
|
115
|
+
----
|
116
|
+
var {{{*x*}}} : {{{<<A,recursive>>}}} <tag/>
|
117
|
+
----
|
122
118
|
|
123
119
|
|
124
120
|
INPUT
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
</sections>
|
136
|
-
|
121
|
+
#{BLANK_HDR}
|
122
|
+
<sections>
|
123
|
+
<sourcecode id='_'><tag/></sourcecode>
|
124
|
+
<sourcecode id='A'>
|
125
|
+
var
|
126
|
+
<strong>x</strong>
|
127
|
+
:
|
128
|
+
<xref target='A'>recursive</xref>
|
129
|
+
<tag/>
|
130
|
+
</sourcecode>
|
131
|
+
</sections>
|
132
|
+
</standard-document>
|
137
133
|
OUTPUT
|
138
134
|
end
|
139
135
|
|
140
|
-
|
136
|
+
it "processes markup in sourcecode with custom delimiters" do
|
141
137
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
142
138
|
= Document title
|
143
139
|
Author
|
@@ -156,20 +152,19 @@ OUTPUT
|
|
156
152
|
|
157
153
|
|
158
154
|
INPUT
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
</sections>
|
168
|
-
|
155
|
+
#{BLANK_HDR}
|
156
|
+
<sections>
|
157
|
+
<sourcecode id='A'>
|
158
|
+
var
|
159
|
+
<strong>x</strong>
|
160
|
+
:
|
161
|
+
<xref target='A'>recursive</xref>
|
162
|
+
</sourcecode>
|
163
|
+
</sections>
|
164
|
+
</standard-document>
|
169
165
|
OUTPUT
|
170
166
|
end
|
171
167
|
|
172
|
-
|
173
168
|
it "applies smartquotes by default" do
|
174
169
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
175
170
|
#{ASCIIDOC_BLANK_HDR}
|
@@ -177,14 +172,14 @@ OUTPUT
|
|
177
172
|
|
178
173
|
'24:00:00'.
|
179
174
|
INPUT
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
</clause>
|
186
|
-
|
187
|
-
|
175
|
+
#{BLANK_HDR}
|
176
|
+
<sections>
|
177
|
+
<clause id="_" inline-header="false" obligation="normative">
|
178
|
+
<title>“Quotation” A’s</title>
|
179
|
+
<p id='_'>‘24:00:00’.</p>
|
180
|
+
</clause>
|
181
|
+
</sections>
|
182
|
+
</standard-document>
|
188
183
|
OUTPUT
|
189
184
|
end
|
190
185
|
|
@@ -200,17 +195,17 @@ OUTPUT
|
|
200
195
|
|
201
196
|
== "Quotation" A's
|
202
197
|
INPUT
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
</clause>
|
208
|
-
|
209
|
-
|
198
|
+
#{BLANK_HDR}
|
199
|
+
<sections>
|
200
|
+
<clause id="_" inline-header="false" obligation="normative">
|
201
|
+
<title>“Quotation” A’s</title>
|
202
|
+
</clause>
|
203
|
+
</sections>
|
204
|
+
</standard-document>
|
210
205
|
OUTPUT
|
211
206
|
end
|
212
207
|
|
213
|
-
|
208
|
+
it "does not apply smartquotes when requested not to" do
|
214
209
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
215
210
|
= Document title
|
216
211
|
Author
|
@@ -224,16 +219,16 @@ OUTPUT
|
|
224
219
|
|
225
220
|
`"quote" A's`
|
226
221
|
INPUT
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
<p id="_">
|
232
|
-
|
233
|
-
</p>
|
234
|
-
</clause>
|
235
|
-
|
236
|
-
|
222
|
+
#{BLANK_HDR}
|
223
|
+
<sections>
|
224
|
+
<clause id="_" inline-header="false" obligation="normative">
|
225
|
+
<title>"Quotation" A's</title>
|
226
|
+
<p id="_">
|
227
|
+
<tt>"quote" A's</tt>
|
228
|
+
</p>
|
229
|
+
</clause>
|
230
|
+
</sections>
|
231
|
+
</standard-document>
|
237
232
|
OUTPUT
|
238
233
|
end
|
239
234
|
|
@@ -264,19 +259,19 @@ OUTPUT
|
|
264
259
|
====
|
265
260
|
|
266
261
|
INPUT
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
<p id="_">
|
271
|
-
|
272
|
-
</p>
|
273
|
-
<sourcecode id="_">"quote" A's</sourcecode>
|
274
|
-
<figure id='_' class='pseudocode'>
|
275
|
-
|
276
|
-
</figure>
|
277
|
-
</clause>
|
278
|
-
|
279
|
-
|
262
|
+
#{BLANK_HDR}
|
263
|
+
<sections>
|
264
|
+
<clause id="_" inline-header="false" obligation="normative"><title>“Quotation” A’s</title><p id="_">“Quotation” A’s</p>
|
265
|
+
<p id="_">
|
266
|
+
<tt>"quote" A’s</tt>
|
267
|
+
</p>
|
268
|
+
<sourcecode id="_">"quote" A's</sourcecode>
|
269
|
+
<figure id='_' class='pseudocode'>
|
270
|
+
<p id='_'>"quote" A's</p>
|
271
|
+
</figure>
|
272
|
+
</clause>
|
273
|
+
</sections>
|
274
|
+
</standard-document>
|
280
275
|
OUTPUT
|
281
276
|
end
|
282
277
|
|
@@ -287,13 +282,13 @@ OUTPUT
|
|
287
282
|
|
288
283
|
<&>
|
289
284
|
INPUT
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
<p id="_"><&></p>
|
294
|
-
|
295
|
-
|
296
|
-
|
285
|
+
#{BLANK_HDR}
|
286
|
+
<sections>
|
287
|
+
<clause id="_" inline-header="false" obligation="normative">
|
288
|
+
<p id="_"><&></p>
|
289
|
+
</clause>
|
290
|
+
</sections>
|
291
|
+
</standard-document>
|
297
292
|
OUTPUT
|
298
293
|
end
|
299
294
|
|
@@ -302,13 +297,13 @@ OUTPUT
|
|
302
297
|
#{ASCIIDOC_BLANK_HDR}
|
303
298
|
== {blank}
|
304
299
|
INPUT
|
305
|
-
|
306
|
-
|
307
|
-
|
300
|
+
#{BLANK_HDR}
|
301
|
+
<sections>
|
302
|
+
<clause id="_" inline-header="false" obligation="normative">
|
308
303
|
|
309
|
-
|
310
|
-
|
311
|
-
|
304
|
+
</clause>
|
305
|
+
</sections>
|
306
|
+
</standard-document>
|
312
307
|
OUTPUT
|
313
308
|
end
|
314
309
|
|
@@ -323,30 +318,30 @@ OUTPUT
|
|
323
318
|
|
324
319
|
Time
|
325
320
|
INPUT
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
</mrow>
|
335
|
-
<mrow>
|
336
|
-
|
337
|
-
</mrow>
|
338
|
-
</msub></math></stem></preferred><admitted><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
|
339
|
-
<mrow>
|
340
|
-
|
341
|
-
</mrow>
|
342
|
-
<mrow>
|
343
|
-
|
344
|
-
</mrow>
|
345
|
-
</msub></math></stem></admitted>
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
321
|
+
#{BLANK_HDR}
|
322
|
+
<sections>
|
323
|
+
<terms id="_" obligation="normative">
|
324
|
+
<title>Terms and definitions</title>
|
325
|
+
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
326
|
+
<term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
|
327
|
+
<mrow>
|
328
|
+
<mi>t</mi>
|
329
|
+
</mrow>
|
330
|
+
<mrow>
|
331
|
+
<mn>90</mn>
|
332
|
+
</mrow>
|
333
|
+
</msub></math></stem></preferred><admitted><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
|
334
|
+
<mrow>
|
335
|
+
<mi>t</mi>
|
336
|
+
</mrow>
|
337
|
+
<mrow>
|
338
|
+
<mn>91</mn>
|
339
|
+
</mrow>
|
340
|
+
</msub></math></stem></admitted>
|
341
|
+
<definition><p id="_">Time</p></definition></term>
|
342
|
+
</terms>
|
343
|
+
</sections>
|
344
|
+
</standard-document>
|
350
345
|
OUTPUT
|
351
346
|
end
|
352
347
|
|
@@ -365,26 +360,26 @@ OUTPUT
|
|
365
360
|
|
366
361
|
domain:[relativity2]
|
367
362
|
INPUT
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
</term>
|
385
|
-
|
386
|
-
|
387
|
-
|
363
|
+
#{BLANK_HDR}
|
364
|
+
<sections>
|
365
|
+
<terms id="_" obligation="normative">
|
366
|
+
<title>Terms and definitions</title>
|
367
|
+
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
368
|
+
<term id="term-tempus">
|
369
|
+
<preferred>Tempus</preferred>
|
370
|
+
<domain>relativity</domain><definition><p id="_"> Time</p></definition>
|
371
|
+
</term>
|
372
|
+
<term id='term-tempus1'>
|
373
|
+
<preferred>Tempus1</preferred>
|
374
|
+
<domain>relativity2</domain>
|
375
|
+
<definition>
|
376
|
+
<p id='_'>Time2</p>
|
377
|
+
<p id='_'> </p>
|
378
|
+
</definition>
|
379
|
+
</term>
|
380
|
+
</terms>
|
381
|
+
</sections>
|
382
|
+
</standard-document>
|
388
383
|
OUTPUT
|
389
384
|
end
|
390
385
|
|
@@ -408,63 +403,62 @@ OUTPUT
|
|
408
403
|
|
409
404
|
This paragraph is extraneous
|
410
405
|
INPUT
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
</msub></math></stem></preferred><definition><formula id="_">
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
</mrow>
|
428
|
-
<mrow>
|
429
|
-
|
430
|
-
</mrow>
|
431
|
-
</msub></math></stem>
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
406
|
+
#{BLANK_HDR}
|
407
|
+
<sections>
|
408
|
+
<terms id="_" obligation="normative">
|
409
|
+
<title>Terms and definitions</title>
|
410
|
+
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
411
|
+
<term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
|
412
|
+
<mrow>
|
413
|
+
<mi>t</mi>
|
414
|
+
</mrow>
|
415
|
+
<mrow>
|
416
|
+
<mn>90</mn>
|
417
|
+
</mrow>
|
418
|
+
</msub></math></stem></preferred><definition><formula id="_">
|
419
|
+
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
|
420
|
+
<mrow>
|
421
|
+
<mi>t</mi>
|
422
|
+
</mrow>
|
423
|
+
<mrow>
|
424
|
+
<mi>A</mi>
|
425
|
+
</mrow>
|
426
|
+
</msub></math></stem>
|
427
|
+
</formula>
|
428
|
+
<p id="_">This paragraph is extraneous</p></definition>
|
429
|
+
</term>
|
430
|
+
</terms>
|
431
|
+
</sections>
|
432
|
+
</standard-document>
|
438
433
|
OUTPUT
|
439
434
|
end
|
440
435
|
|
441
436
|
it "moves notes inside preceding blocks, if they are not at clause end, and the blocks are not delimited" do
|
442
437
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
443
|
-
|
444
|
-
|
445
|
-
[stem]
|
446
|
-
++++
|
447
|
-
r = 1 %
|
448
|
-
r = 1 %
|
449
|
-
++++
|
438
|
+
#{ASCIIDOC_BLANK_HDR}
|
450
439
|
|
451
|
-
|
440
|
+
[stem]
|
441
|
+
++++
|
442
|
+
r = 1 %
|
443
|
+
r = 1 %
|
444
|
+
++++
|
452
445
|
|
453
|
-
|
446
|
+
NOTE: That formula does not do much
|
447
|
+
|
448
|
+
Indeed.
|
454
449
|
INPUT
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
<note id="_">
|
459
|
-
|
460
|
-
</note></formula>
|
461
|
-
|
462
|
-
|
463
|
-
</standard-document>
|
450
|
+
#{BLANK_HDR}
|
451
|
+
<sections><formula id="_">
|
452
|
+
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>r</mi><mo>=</mo><mn>1</mn><mi>%</mi><mi>r</mi><mo>=</mo><mn>1</mn><mi>%</mi></math></stem>
|
453
|
+
<note id="_">
|
454
|
+
<p id="_">That formula does not do much</p>
|
455
|
+
</note></formula>
|
456
|
+
<p id="_">Indeed.</p></sections>
|
457
|
+
</standard-document>
|
464
458
|
OUTPUT
|
465
459
|
end
|
466
460
|
|
467
|
-
|
461
|
+
it "does not move notes inside preceding blocks, if they are marked as keep-separate" do
|
468
462
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
469
463
|
#{ASCIIDOC_BLANK_HDR}
|
470
464
|
|
@@ -481,15 +475,14 @@ OUTPUT
|
|
481
475
|
|
482
476
|
Indeed.
|
483
477
|
INPUT
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
<note id="_">
|
488
|
-
|
489
|
-
</note>
|
490
|
-
|
491
|
-
|
492
|
-
</standard-document>
|
478
|
+
#{BLANK_HDR}
|
479
|
+
<sections><formula id="_">
|
480
|
+
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>r</mi><mo>=</mo><mn>1</mn><mi>%</mi><mi>r</mi><mo>=</mo><mn>1</mn><mi>%</mi></math></stem></formula>
|
481
|
+
<note id="_">
|
482
|
+
<p id="_">That formula does not do much</p>
|
483
|
+
</note>
|
484
|
+
<p id="_">Indeed.</p></sections>
|
485
|
+
</standard-document>
|
493
486
|
OUTPUT
|
494
487
|
end
|
495
488
|
|
@@ -503,14 +496,14 @@ OUTPUT
|
|
503
496
|
|
504
497
|
NOTE: That loop does not do much
|
505
498
|
INPUT
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
499
|
+
#{BLANK_HDR}
|
500
|
+
<sections><sourcecode id="_" lang="ruby">[1...x].each do |y|
|
501
|
+
puts y
|
502
|
+
end</sourcecode>
|
503
|
+
<note id="_">
|
504
|
+
<p id="_">That loop does not do much</p>
|
505
|
+
</note></sections>
|
506
|
+
</standard-document>
|
514
507
|
OUTPUT
|
515
508
|
end
|
516
509
|
|
@@ -518,6 +511,7 @@ OUTPUT
|
|
518
511
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
519
512
|
#{ASCIIDOC_BLANK_HDR}
|
520
513
|
<<iso216>>
|
514
|
+
<<iso216,droploc%capital%>>
|
521
515
|
|
522
516
|
[bibliography]
|
523
517
|
== Normative References
|
@@ -528,6 +522,7 @@ OUTPUT
|
|
528
522
|
<title>Foreword</title>
|
529
523
|
<p id="_">
|
530
524
|
<eref type="inline" bibitemid="iso216" citeas="ISO 216:2001"/>
|
525
|
+
<eref type='inline' case='capital' droploc='true' bibitemid='iso216' citeas='ISO 216:2001'/>
|
531
526
|
</p>
|
532
527
|
</foreword></preface><sections>
|
533
528
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
@@ -561,95 +556,106 @@ OUTPUT
|
|
561
556
|
<<iso216,_whole_>>
|
562
557
|
<<iso216,a _whole_ flagon>>
|
563
558
|
<<iso216,whole,clause=3,a _whole_ flagon>>
|
559
|
+
<<iso216,droploc%capital%whole,clause=3,a _whole_ flagon>>
|
564
560
|
|
565
561
|
[bibliography]
|
566
562
|
== Normative References
|
567
563
|
* [[[iso216,ISO 216]]], _Reference_
|
568
564
|
INPUT
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
565
|
+
#{BLANK_HDR}
|
566
|
+
<preface><foreword id="_" obligation="informative">
|
567
|
+
<title>Foreword</title>
|
568
|
+
<p id="_">
|
569
|
+
<eref type="inline" bibitemid="iso216" citeas="ISO 216">
|
570
|
+
<localityStack>
|
571
|
+
<locality type="whole"/><locality type="clause"><referenceFrom>3</referenceFrom></locality><locality type="example"><referenceFrom>9</referenceFrom><referenceTo>11</referenceTo></locality><locality type="locality:prelude"><referenceFrom>33 a</referenceFrom></locality><locality type="locality:entirety"/>
|
572
|
+
</localityStack>
|
573
|
+
the reference,xyz</eref>
|
574
|
+
<eref type='inline' bibitemid='iso216' citeas='ISO 216'>
|
575
|
+
<localityStack>
|
576
|
+
<locality type='whole'/>
|
577
|
+
<locality type='clause'>
|
578
|
+
<referenceFrom>3</referenceFrom>
|
579
|
+
</locality>
|
580
|
+
<locality type='example'>
|
581
|
+
<referenceFrom>9</referenceFrom>
|
582
|
+
<referenceTo>11</referenceTo>
|
583
|
+
</locality>
|
584
|
+
<locality type='locality:prelude'>
|
585
|
+
<referenceFrom>33</referenceFrom>
|
586
|
+
</locality>
|
587
|
+
<locality type='locality:entirety'>
|
588
|
+
<referenceFrom>the reference</referenceFrom>
|
589
|
+
</locality>
|
590
|
+
</localityStack>
|
591
|
+
<localityStack>
|
592
|
+
<locality type='whole'/>
|
593
|
+
<locality type='clause'>
|
594
|
+
<referenceFrom>3</referenceFrom>
|
595
|
+
</locality>
|
596
|
+
<locality type='example'>
|
597
|
+
<referenceFrom>9</referenceFrom>
|
598
|
+
<referenceTo>11</referenceTo>
|
599
|
+
</locality>
|
600
|
+
<locality type='locality:prelude'>
|
601
|
+
<referenceFrom>33</referenceFrom>
|
602
|
+
</locality>
|
603
|
+
<locality type='locality:entirety'/>
|
604
|
+
</localityStack>
|
605
|
+
the reference,xyz
|
606
|
+
</eref>
|
607
|
+
<eref type='inline' bibitemid='iso216' citeas='ISO 216'>
|
608
|
+
<em>whole</em>
|
609
|
+
</eref>
|
610
|
+
<eref type='inline' bibitemid='iso216' citeas='ISO 216'>
|
611
|
+
a
|
612
|
+
<em>whole</em>
|
613
|
+
flagon
|
614
|
+
</eref>
|
615
|
+
<eref type='inline' bibitemid='iso216' citeas='ISO 216'>
|
574
616
|
<localityStack>
|
575
|
-
|
617
|
+
<locality type='whole'/>
|
618
|
+
<locality type='clause'>
|
619
|
+
<referenceFrom>3</referenceFrom>
|
620
|
+
</locality>
|
576
621
|
</localityStack>
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
<eref type='inline' bibitemid='iso216' citeas='ISO 216'>
|
612
|
-
<em>whole</em>
|
613
|
-
</eref>
|
614
|
-
<eref type='inline' bibitemid='iso216' citeas='ISO 216'>
|
615
|
-
a
|
616
|
-
<em>whole</em>
|
617
|
-
flagon
|
618
|
-
</eref>
|
619
|
-
<eref type='inline' bibitemid='iso216' citeas='ISO 216'>
|
620
|
-
<localityStack>
|
621
|
-
<locality type='whole'/>
|
622
|
-
<locality type='clause'>
|
623
|
-
<referenceFrom>3</referenceFrom>
|
624
|
-
</locality>
|
625
|
-
</localityStack>
|
626
|
-
a
|
627
|
-
<em>whole</em>
|
628
|
-
flagon
|
629
|
-
</eref>
|
630
|
-
</p>
|
631
|
-
</foreword></preface><sections>
|
632
|
-
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
633
|
-
<title>Normative references</title>
|
634
|
-
#{NORM_REF_BOILERPLATE}
|
635
|
-
<bibitem id="iso216" type="standard">
|
636
|
-
<title format="text/plain">Reference</title>
|
637
|
-
<docidentifier>ISO 216</docidentifier>
|
638
|
-
<docnumber>216</docnumber>
|
639
|
-
<contributor>
|
640
|
-
<role type="publisher"/>
|
641
|
-
<organization>
|
642
|
-
<name>ISO</name>
|
643
|
-
</organization>
|
644
|
-
</contributor>
|
645
|
-
</bibitem>
|
646
|
-
</references>
|
647
|
-
</bibliography>
|
648
|
-
</standard-document>
|
622
|
+
a
|
623
|
+
<em>whole</em>
|
624
|
+
flagon
|
625
|
+
</eref>
|
626
|
+
<eref type='inline' case='capital' droploc='true' bibitemid='iso216' citeas='ISO 216'>
|
627
|
+
<localityStack>
|
628
|
+
<locality type='whole'/>
|
629
|
+
<locality type='clause'>
|
630
|
+
<referenceFrom>3</referenceFrom>
|
631
|
+
</locality>
|
632
|
+
</localityStack>
|
633
|
+
a
|
634
|
+
<em>whole</em>
|
635
|
+
flagon
|
636
|
+
</eref>
|
637
|
+
</p>
|
638
|
+
</foreword></preface><sections>
|
639
|
+
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
640
|
+
<title>Normative references</title>
|
641
|
+
#{NORM_REF_BOILERPLATE}
|
642
|
+
<bibitem id="iso216" type="standard">
|
643
|
+
<title format="text/plain">Reference</title>
|
644
|
+
<docidentifier>ISO 216</docidentifier>
|
645
|
+
<docnumber>216</docnumber>
|
646
|
+
<contributor>
|
647
|
+
<role type="publisher"/>
|
648
|
+
<organization>
|
649
|
+
<name>ISO</name>
|
650
|
+
</organization>
|
651
|
+
</contributor>
|
652
|
+
</bibitem>
|
653
|
+
</references>
|
654
|
+
</bibliography>
|
655
|
+
</standard-document>
|
649
656
|
OUTPUT
|
650
657
|
end
|
651
658
|
|
652
|
-
|
653
659
|
it "strips type from xrefs" do
|
654
660
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
655
661
|
#{ASCIIDOC_BLANK_HDR}
|
@@ -659,29 +665,29 @@ OUTPUT
|
|
659
665
|
== Clause
|
660
666
|
* [[[iso216,ISO 216]]], _Reference_
|
661
667
|
INPUT
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
</bibitem>
|
683
|
-
</references></bibliography>
|
684
|
-
|
668
|
+
#{BLANK_HDR}
|
669
|
+
<preface>
|
670
|
+
<foreword id="_" obligation="informative">
|
671
|
+
<title>Foreword</title>
|
672
|
+
<p id="_">
|
673
|
+
<eref type="inline" bibitemid="iso216" citeas="ISO 216"/>
|
674
|
+
</p>
|
675
|
+
</foreword></preface><sections>
|
676
|
+
</sections><bibliography><references id="_" obligation="informative" normative="false">
|
677
|
+
<title>Bibliography</title>
|
678
|
+
<bibitem id="iso216" type="standard">
|
679
|
+
<title format="text/plain">Reference</title>
|
680
|
+
<docidentifier>ISO 216</docidentifier>
|
681
|
+
<docnumber>216</docnumber>
|
682
|
+
<contributor>
|
683
|
+
<role type="publisher"/>
|
684
|
+
<organization>
|
685
|
+
<name>ISO</name>
|
686
|
+
</organization>
|
687
|
+
</contributor>
|
688
|
+
</bibitem>
|
689
|
+
</references></bibliography>
|
690
|
+
</standard-document>
|
685
691
|
OUTPUT
|
686
692
|
end
|
687
693
|
|
@@ -694,26 +700,26 @@ OUTPUT
|
|
694
700
|
|
695
701
|
[.source]
|
696
702
|
<<ISO2191,section=1>>
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
703
|
+
INPUT
|
704
|
+
#{BLANK_HDR}
|
705
|
+
<sections>
|
706
|
+
<terms id="_" obligation="normative">
|
707
|
+
<title>Terms and definitions</title>
|
708
|
+
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
709
|
+
<term id="term-term1">
|
710
|
+
<preferred>Term1</preferred>
|
711
|
+
<termsource status="identical">
|
712
|
+
<origin bibitemid="ISO2191" type="inline" citeas="">
|
713
|
+
<localityStack>
|
714
|
+
<locality type="section"><referenceFrom>1</referenceFrom></locality>
|
715
|
+
</localityStack>
|
716
|
+
</origin>
|
717
|
+
</termsource>
|
718
|
+
</term>
|
719
|
+
</terms>
|
720
|
+
</sections>
|
721
|
+
</standard-document>
|
722
|
+
OUTPUT
|
717
723
|
end
|
718
724
|
|
719
725
|
it "inserts IDs into paragraphs" do
|
@@ -721,11 +727,11 @@ OUTPUT
|
|
721
727
|
#{ASCIIDOC_BLANK_HDR}
|
722
728
|
Paragraph
|
723
729
|
INPUT
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
730
|
+
#{BLANK_HDR}
|
731
|
+
<sections>
|
732
|
+
<p id="_">Paragraph</p>
|
733
|
+
</sections>
|
734
|
+
</standard-document>
|
729
735
|
OUTPUT
|
730
736
|
end
|
731
737
|
|
@@ -737,15 +743,15 @@ OUTPUT
|
|
737
743
|
NOTE: This note has no ID
|
738
744
|
====
|
739
745
|
INPUT
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
746
|
+
#{BLANK_HDR}
|
747
|
+
<sections>
|
748
|
+
<example id="_">
|
749
|
+
<note id="_">
|
750
|
+
<p id="_">This note has no ID</p>
|
751
|
+
</note>
|
752
|
+
</example>
|
753
|
+
</sections>
|
754
|
+
</standard-document>
|
749
755
|
OUTPUT
|
750
756
|
end
|
751
757
|
|
@@ -773,55 +779,55 @@ OUTPUT
|
|
773
779
|
|
774
780
|
a:: b
|
775
781
|
INPUT
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
782
|
+
#{BLANK_HDR}
|
783
|
+
<sections>
|
784
|
+
<table id='_'>
|
785
|
+
<tbody>
|
786
|
+
<tr>
|
787
|
+
<td valign='top' align='left'>a</td>
|
788
|
+
<td valign='top' align='left'>b</td>
|
789
|
+
<td valign='top' align='left'>c</td>
|
790
|
+
</tr>
|
791
|
+
</tbody>
|
792
|
+
<dl id='_' key='true'>
|
793
|
+
<dt>a</dt>
|
794
|
+
<dd>
|
795
|
+
<p id='_'>b</p>
|
796
|
+
</dd>
|
797
|
+
</dl>
|
798
|
+
</table>
|
799
|
+
<table id='_'>
|
800
|
+
<tbody>
|
801
|
+
<tr>
|
802
|
+
<td valign='top' align='left'>a</td>
|
803
|
+
<td valign='top' align='left'>b</td>
|
804
|
+
<td valign='top' align='left'>c</td>
|
805
|
+
</tr>
|
806
|
+
</tbody>
|
807
|
+
<dl id='_' key='true'>
|
808
|
+
<dt>a</dt>
|
809
|
+
<dd>
|
810
|
+
<p id='_'>b</p>
|
811
|
+
</dd>
|
812
|
+
</dl>
|
813
|
+
</table>
|
814
|
+
<table id='_'>
|
815
|
+
<tbody>
|
816
|
+
<tr>
|
817
|
+
<td valign='top' align='left'>a</td>
|
818
|
+
<td valign='top' align='left'>b</td>
|
819
|
+
<td valign='top' align='left'>c</td>
|
820
|
+
</tr>
|
821
|
+
</tbody>
|
822
|
+
</table>
|
823
|
+
<dl id='_'>
|
824
|
+
<dt>a</dt>
|
825
|
+
<dd>
|
826
|
+
<p id='_'>b</p>
|
827
|
+
</dd>
|
828
|
+
</dl>
|
829
|
+
</sections>
|
830
|
+
</standard-document>
|
825
831
|
OUTPUT
|
826
832
|
end
|
827
833
|
|
@@ -836,31 +842,31 @@ OUTPUT
|
|
836
842
|
|a |b |c
|
837
843
|
|===
|
838
844
|
INPUT
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
845
|
+
#{BLANK_HDR}
|
846
|
+
<sections>
|
847
|
+
<table id="_"><thead><tr>
|
848
|
+
<th valign="top" align="left">a</th>
|
849
|
+
<th valign="top" align="left">b</th>
|
850
|
+
<th valign="top" align="left">c</th>
|
851
|
+
</tr><tr>
|
852
|
+
<th valign="top" align="left">a</th>
|
853
|
+
<th valign="top" align="left">b</th>
|
854
|
+
<th valign="top" align="left">c</th>
|
855
|
+
</tr><tr>
|
856
|
+
<th valign="top" align="left">a</th>
|
857
|
+
<th valign="top" align="left">b</th>
|
858
|
+
<th valign="top" align="left">c</th>
|
859
|
+
</tr></thead>
|
860
|
+
<tbody>
|
861
|
+
<tr>
|
862
|
+
<td valign="top" align="left">a</td>
|
863
|
+
<td valign="top" align="left">b</td>
|
864
|
+
<td valign="top" align="left">c</td>
|
865
|
+
</tr>
|
866
|
+
</tbody>
|
867
|
+
</table>
|
868
|
+
</sections>
|
869
|
+
</standard-document>
|
864
870
|
OUTPUT
|
865
871
|
end
|
866
872
|
|
@@ -876,36 +882,36 @@ OUTPUT
|
|
876
882
|
|a |b |c
|
877
883
|
|===
|
878
884
|
INPUT
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
885
|
+
#{BLANK_HDR}
|
886
|
+
<sections>
|
887
|
+
<table id="_">
|
888
|
+
<thead>
|
889
|
+
<tr>
|
890
|
+
<th valign="top" align="left">a</th>
|
891
|
+
<th valign="top" align="left">b</th>
|
892
|
+
<th valign="top" align="left">c</th>
|
893
|
+
</tr>
|
894
|
+
<tr>
|
895
|
+
<th valign="top" align="left">a</th>
|
896
|
+
<th valign="top" align="left">b</th>
|
897
|
+
<th valign="top" align="left">c</th>
|
898
|
+
</tr><tr>
|
899
|
+
<th valign="top" align="left">a</th>
|
900
|
+
<th valign="top" align="left">b</th>
|
901
|
+
<th valign="top" align="left">c</th>
|
902
|
+
</tr></thead>
|
903
|
+
<tbody>
|
904
|
+
|
905
|
+
|
906
|
+
<tr>
|
907
|
+
<td valign="top" align="left">a</td>
|
908
|
+
<td valign="top" align="left">b</td>
|
909
|
+
<td valign="top" align="left">c</td>
|
910
|
+
</tr>
|
911
|
+
</tbody>
|
912
|
+
</table>
|
913
|
+
</sections>
|
914
|
+
</standard-document>
|
909
915
|
OUTPUT
|
910
916
|
end
|
911
917
|
|
@@ -920,23 +926,23 @@ OUTPUT
|
|
920
926
|
|
921
927
|
NOTE: Note 2
|
922
928
|
INPUT
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
929
|
+
#{BLANK_HDR}
|
930
|
+
<sections><table id="_">
|
931
|
+
<tbody>
|
932
|
+
<tr>
|
933
|
+
<td valign="top" align="left">a</td>
|
934
|
+
<td valign="top" align="left">b</td>
|
935
|
+
<td valign="top" align="left">c</td>
|
936
|
+
</tr>
|
937
|
+
</tbody>
|
938
|
+
<note id="_">
|
939
|
+
<p id="_">Note 1</p>
|
940
|
+
</note><note id="_">
|
941
|
+
<p id="_">Note 2</p>
|
942
|
+
</note></table>
|
943
|
+
|
944
|
+
</sections>
|
945
|
+
</standard-document>
|
940
946
|
OUTPUT
|
941
947
|
end
|
942
948
|
|
@@ -967,61 +973,61 @@ OUTPUT
|
|
967
973
|
|
968
974
|
a:: b
|
969
975
|
INPUT
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
976
|
+
#{BLANK_HDR}
|
977
|
+
<sections>
|
978
|
+
<formula id='_'>
|
979
|
+
<stem type='MathML'>
|
980
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
981
|
+
<mi>F</mi>
|
982
|
+
<mi>or</mi>
|
983
|
+
<mi>μ</mi>
|
984
|
+
<mi>l</mi>
|
985
|
+
<mi>a</mi>
|
986
|
+
</math>
|
987
|
+
</stem>
|
988
|
+
<dl id='_' key='true'>
|
989
|
+
<dt>a</dt>
|
990
|
+
<dd>
|
991
|
+
<p id='_'>b</p>
|
992
|
+
</dd>
|
993
|
+
</dl>
|
994
|
+
</formula>
|
995
|
+
<formula id='_'>
|
996
|
+
<stem type='MathML'>
|
997
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
998
|
+
<mi>F</mi>
|
999
|
+
<mi>or</mi>
|
1000
|
+
<mi>μ</mi>
|
1001
|
+
<mi>l</mi>
|
1002
|
+
<mi>a</mi>
|
1003
|
+
</math>
|
1004
|
+
</stem>
|
1005
|
+
<dl id='_' key='true'>
|
1006
|
+
<dt>a</dt>
|
1007
|
+
<dd>
|
1008
|
+
<p id='_'>b</p>
|
1009
|
+
</dd>
|
1010
|
+
</dl>
|
1011
|
+
</formula>
|
1012
|
+
<formula id='_'>
|
1013
|
+
<stem type='MathML'>
|
1014
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
1015
|
+
<mi>F</mi>
|
1016
|
+
<mi>or</mi>
|
1017
|
+
<mi>μ</mi>
|
1018
|
+
<mi>l</mi>
|
1019
|
+
<mi>a</mi>
|
1020
|
+
</math>
|
1021
|
+
</stem>
|
1022
|
+
</formula>
|
1023
|
+
<dl id='_'>
|
1024
|
+
<dt>a</dt>
|
1025
|
+
<dd>
|
1026
|
+
<p id='_'>b</p>
|
1027
|
+
</dd>
|
1028
|
+
</dl>
|
1029
|
+
</sections>
|
1030
|
+
</standard-document>
|
1025
1031
|
OUTPUT
|
1026
1032
|
end
|
1027
1033
|
|
@@ -1037,30 +1043,28 @@ OUTPUT
|
|
1037
1043
|
|
1038
1044
|
A footnote:[This is a third footnote]
|
1039
1045
|
INPUT
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
</name>
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
</p>
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
</standard-document>
|
1046
|
+
#{BLANK_HDR}
|
1047
|
+
<sections><figure id="_">
|
1048
|
+
<name>
|
1049
|
+
Figuretitle.
|
1050
|
+
<fn reference='1'>
|
1051
|
+
<p id='_'>xyz</p>
|
1052
|
+
</fn>
|
1053
|
+
</name>
|
1054
|
+
<image src="spec/examples/rice_images/rice_image1.png" id="_" mimetype="image/png" height="auto" width="auto"/>
|
1055
|
+
<fn reference="a">
|
1056
|
+
<p id="_">This is a footnote to a figure</p>
|
1057
|
+
</fn><fn reference="b">
|
1058
|
+
<p id="_">This is another footnote to a figure</p>
|
1059
|
+
</fn></figure>
|
1060
|
+
<p id='_'>
|
1061
|
+
A
|
1062
|
+
<fn reference='2'>
|
1063
|
+
<p id='_'>This is a third footnote</p>
|
1064
|
+
</fn>
|
1065
|
+
</p>
|
1066
|
+
</sections>
|
1067
|
+
</standard-document>
|
1064
1068
|
OUTPUT
|
1065
1069
|
end
|
1066
1070
|
|
@@ -1082,37 +1086,37 @@ OUTPUT
|
|
1082
1086
|
|
1083
1087
|
a:: b
|
1084
1088
|
INPUT
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1089
|
+
#{BLANK_HDR}
|
1090
|
+
<sections>
|
1091
|
+
<figure id='_'>
|
1092
|
+
<image src='spec/examples/rice_images/rice_image1.png' id='_' mimetype='image/png' height='auto' width='auto'/>
|
1093
|
+
<dl id='_' key='true'>
|
1094
|
+
<dt>a</dt>
|
1095
|
+
<dd>
|
1096
|
+
<p id='_'>b</p>
|
1097
|
+
</dd>
|
1098
|
+
</dl>
|
1099
|
+
</figure>
|
1100
|
+
<figure id='_'>
|
1101
|
+
<image src='spec/examples/rice_images/rice_image1.png' id='_' mimetype='image/png' height='auto' width='auto'/>
|
1102
|
+
<dl id='_' key='true'>
|
1103
|
+
<dt>a</dt>
|
1104
|
+
<dd>
|
1105
|
+
<p id='_'>b</p>
|
1106
|
+
</dd>
|
1107
|
+
</dl>
|
1108
|
+
</figure>
|
1109
|
+
<figure id='_'>
|
1110
|
+
<image src='spec/examples/rice_images/rice_image1.png' id='_' mimetype='image/png' height='auto' width='auto'/>
|
1111
|
+
</figure>
|
1112
|
+
<dl id='_'>
|
1113
|
+
<dt>a</dt>
|
1114
|
+
<dd>
|
1115
|
+
<p id='_'>b</p>
|
1116
|
+
</dd>
|
1117
|
+
</dl>
|
1118
|
+
</sections>
|
1119
|
+
</standard-document>
|
1116
1120
|
OUTPUT
|
1117
1121
|
end
|
1118
1122
|
|
@@ -1132,22 +1136,22 @@ OUTPUT
|
|
1132
1136
|
image::spec/examples/rice_images/rice_image3_3.png[]
|
1133
1137
|
====
|
1134
1138
|
INPUT
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1139
|
+
#{BLANK_HDR}
|
1140
|
+
<sections>
|
1141
|
+
<figure id="figureC-2"><name>Stages of gelatinization</name><figure id="_">
|
1142
|
+
<name>Initial stages: No grains are fully gelatinized (ungelatinized starch granules are visible inside the kernels)</name>
|
1143
|
+
<image src="spec/examples/rice_images/rice_image3_1.png" id="_" mimetype="image/png" height="auto" width="auto"/>
|
1144
|
+
</figure>
|
1145
|
+
<figure id="_">
|
1146
|
+
<name>Intermediate stages: Some fully gelatinized kernels are visible</name>
|
1147
|
+
<image src="spec/examples/rice_images/rice_image3_2.png" id="_" mimetype="image/png" height="auto" width="auto"/>
|
1148
|
+
</figure>
|
1149
|
+
<figure id="_">
|
1150
|
+
<name>Final stages: All kernels are fully gelatinized</name>
|
1151
|
+
<image src="spec/examples/rice_images/rice_image3_3.png" id="_" mimetype="image/png" height="auto" width="auto"/>
|
1152
|
+
</figure></figure>
|
1153
|
+
</sections>
|
1154
|
+
</standard-document>
|
1151
1155
|
OUTPUT
|
1152
1156
|
end
|
1153
1157
|
|
@@ -1203,7 +1207,7 @@ OUTPUT
|
|
1203
1207
|
OUTPUT
|
1204
1208
|
end
|
1205
1209
|
|
1206
|
-
|
1210
|
+
it "rearranges term note, term example, term source" do
|
1207
1211
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1208
1212
|
#{ASCIIDOC_BLANK_HDR}
|
1209
1213
|
|
@@ -1224,33 +1228,33 @@ OUTPUT
|
|
1224
1228
|
[example]
|
1225
1229
|
Example 2
|
1226
1230
|
INPUT
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1231
|
+
#{BLANK_HDR}
|
1232
|
+
<sections>
|
1233
|
+
<terms id="_" obligation="normative">
|
1234
|
+
<title>Terms and definitions</title>
|
1235
|
+
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
1236
|
+
<term id="term-term"><preferred>Term</preferred>
|
1237
|
+
|
1238
|
+
|
1239
|
+
|
1240
|
+
<termnote id="_">
|
1241
|
+
<p id="_">Note</p>
|
1242
|
+
</termnote><termnote id="_">
|
1243
|
+
<p id="_">Note 2</p>
|
1244
|
+
</termnote><termexample id="_">
|
1245
|
+
<p id="_">Example 1</p>
|
1246
|
+
</termexample><termexample id="_">
|
1247
|
+
<p id="_">Example 2</p>
|
1248
|
+
</termexample><termsource status="identical">
|
1249
|
+
<origin bibitemid="ISO2191" type="inline" citeas="">
|
1250
|
+
<localityStack>
|
1251
|
+
<locality type="section"><referenceFrom>1</referenceFrom></locality>
|
1252
|
+
</localityStack>
|
1253
|
+
</origin>
|
1254
|
+
</termsource></term>
|
1255
|
+
</terms>
|
1256
|
+
</sections>
|
1257
|
+
</standard-document>
|
1254
1258
|
OUTPUT
|
1255
1259
|
end
|
1256
1260
|
|
@@ -1265,148 +1269,147 @@ OUTPUT
|
|
1265
1269
|
# mock_iecbib_get_iec60050_103_01
|
1266
1270
|
# mock_iev
|
1267
1271
|
VCR.use_cassette "separates_iev_citations_by_top_level_clause" do
|
1268
|
-
|
1269
|
-
|
1272
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1273
|
+
#{CACHED_ISOBIB_BLANK_HDR}
|
1270
1274
|
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1275
|
+
[bibliography]
|
1276
|
+
== Normative References
|
1277
|
+
* [[[iev,IEV]]], _iev_
|
1274
1278
|
|
1275
|
-
|
1276
|
-
|
1279
|
+
== Terms and definitions
|
1280
|
+
=== Automation1
|
1277
1281
|
|
1278
|
-
|
1279
|
-
|
1282
|
+
[.source]
|
1283
|
+
<<iev,clause="103-01-02">>
|
1280
1284
|
|
1281
|
-
|
1285
|
+
=== Automation2
|
1282
1286
|
|
1283
|
-
|
1284
|
-
|
1287
|
+
[.source]
|
1288
|
+
<<iev,clause="102-01-02">>
|
1285
1289
|
|
1286
|
-
|
1290
|
+
=== Automation3
|
1287
1291
|
|
1288
|
-
|
1289
|
-
|
1292
|
+
[.source]
|
1293
|
+
<<iev,clause="103-01-02">>
|
1290
1294
|
INPUT
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
<
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1400
|
-
<
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
OUTPUT
|
1295
|
+
#{BLANK_HDR}
|
1296
|
+
<sections>
|
1297
|
+
<terms id="_" obligation="normative"><title>Terms and definitions</title>
|
1298
|
+
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
1299
|
+
<term id="term-automation1">
|
1300
|
+
<preferred>Automation1</preferred>
|
1301
|
+
<termsource status="identical">
|
1302
|
+
<origin bibitemid="IEC60050-103" type="inline" citeas="IEC 60050-103:2009">
|
1303
|
+
<localityStack>
|
1304
|
+
<locality type="clause"><referenceFrom>103-01-02</referenceFrom></locality>
|
1305
|
+
</localityStack>
|
1306
|
+
</origin>
|
1307
|
+
</termsource>
|
1308
|
+
</term>
|
1309
|
+
<term id="term-automation2">
|
1310
|
+
<preferred>Automation2</preferred>
|
1311
|
+
<termsource status="identical">
|
1312
|
+
<origin bibitemid="IEC60050-102" type="inline" citeas="IEC 60050-102:2007">
|
1313
|
+
<localityStack>
|
1314
|
+
<locality type="clause"><referenceFrom>102-01-02</referenceFrom></locality>
|
1315
|
+
</localityStack>
|
1316
|
+
</origin>
|
1317
|
+
</termsource>
|
1318
|
+
</term>
|
1319
|
+
<term id="term-automation3">
|
1320
|
+
<preferred>Automation3</preferred>
|
1321
|
+
<termsource status="identical">
|
1322
|
+
<origin bibitemid="IEC60050-103" type="inline" citeas="IEC 60050-103:2009">
|
1323
|
+
<localityStack>
|
1324
|
+
<locality type="clause"><referenceFrom>103-01-02</referenceFrom></locality>
|
1325
|
+
</localityStack>
|
1326
|
+
</origin>
|
1327
|
+
</termsource>
|
1328
|
+
</term></terms></sections><bibliography><references id="_" obligation="informative" normative="true">
|
1329
|
+
<title>Normative references</title>
|
1330
|
+
#{NORM_REF_BOILERPLATE}
|
1331
|
+
<bibitem type="standard" id="IEC60050-102">
|
1332
|
+
<fetched>#{Date.today}</fetched>
|
1333
|
+
<title type="title-main" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary (IEV)</title>
|
1334
|
+
<title type="title-part" format="text/plain" language="en" script="Latn">Part 102: Mathematics — General concepts and linear algebra</title>
|
1335
|
+
<title type='main' format='text/plain' language='en' script='Latn'>International Electrotechnical Vocabulary (IEV) — Part 102: Mathematics — General concepts and linear algebra</title>
|
1336
|
+
<uri type="src">https://webstore.iec.ch/publication/160</uri>
|
1337
|
+
<uri type="obp">/preview/info_iec60050-102%7Bed1.0%7Db.pdf</uri>
|
1338
|
+
<docidentifier type="IEC">IEC 60050-102:2007</docidentifier>
|
1339
|
+
<docidentifier type='URN'>urn:iec:std:iec:60050-102:2007:::en</docidentifier>
|
1340
|
+
<date type="published">
|
1341
|
+
<on>2007-08-27</on>
|
1342
|
+
</date>
|
1343
|
+
<contributor>
|
1344
|
+
<role type="publisher"/>
|
1345
|
+
<organization>
|
1346
|
+
<name>International Electrotechnical Commission</name>
|
1347
|
+
<abbreviation>IEC</abbreviation>
|
1348
|
+
<uri>www.iec.ch</uri>
|
1349
|
+
</organization>
|
1350
|
+
</contributor>
|
1351
|
+
<edition>1.0</edition>
|
1352
|
+
<language>en</language>
|
1353
|
+
<script>Latn</script>
|
1354
|
+
<abstract format="text/plain" language="en" script="Latn">This part of IEC 60050 gives the general mathematical terminology used in the fields of electricity, electronics and telecommunications, together with basic concepts in linear algebra. It maintains a clear distinction between mathematical concepts and physical concepts, even if some terms are used in both cases. Another part will deal with functions. It has the status of a horizontal standard in accordance with IEC Guide 108.</abstract>
|
1355
|
+
<status>
|
1356
|
+
<stage>60</stage>
|
1357
|
+
<substage>60</substage>
|
1358
|
+
</status>
|
1359
|
+
<copyright>
|
1360
|
+
<from>2007</from>
|
1361
|
+
<owner>
|
1362
|
+
<organization>
|
1363
|
+
<name>International Electrotechnical Commission</name>
|
1364
|
+
<abbreviation>IEC</abbreviation>
|
1365
|
+
<uri>www.iec.ch</uri>
|
1366
|
+
</organization>
|
1367
|
+
</owner>
|
1368
|
+
</copyright>
|
1369
|
+
<place>Geneva</place>
|
1370
|
+
</bibitem><bibitem type="standard" id="IEC60050-103">
|
1371
|
+
<fetched>#{Date.today}</fetched>
|
1372
|
+
<title type="title-main" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary (IEV)</title>
|
1373
|
+
<title type="title-part" format="text/plain" language="en" script="Latn">Part 103: Mathematics — Functions</title>
|
1374
|
+
<title type="main" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary (IEV) — Part 103: Mathematics — Functions</title>
|
1375
|
+
<uri type="src">https://webstore.iec.ch/publication/161</uri>
|
1376
|
+
<uri type="obp">/preview/info_iec60050-103%7Bed1.0%7Db.pdf</uri>
|
1377
|
+
<docidentifier type="IEC">IEC 60050-103:2009</docidentifier>
|
1378
|
+
<docidentifier type='URN'>urn:iec:std:iec:60050-103:2009:::en</docidentifier>
|
1379
|
+
<date type="published">
|
1380
|
+
<on>2009-12-14</on>
|
1381
|
+
</date>
|
1382
|
+
<contributor>
|
1383
|
+
<role type="publisher"/>
|
1384
|
+
<organization>
|
1385
|
+
<name>International Electrotechnical Commission</name>
|
1386
|
+
<abbreviation>IEC</abbreviation>
|
1387
|
+
<uri>www.iec.ch</uri>
|
1388
|
+
</organization>
|
1389
|
+
</contributor>
|
1390
|
+
<edition>1.0</edition>
|
1391
|
+
<language>en</language>
|
1392
|
+
<script>Latn</script>
|
1393
|
+
<abstract format="text/plain" language="en" script="Latn">IEC 60050-103:2009 gives the terminology relative to functions of one or more variables. Together with IEC 60050-102, it covers the mathematical terminology used in the fields of electricity, electronics and telecommunications. It maintains a clear distinction between mathematical concepts and physical concepts, even if some terms are used in both cases. Mathematical symbols are generally in accordance with IEC 60027-1 and ISO 80000-2. This standard cancels and replaces Sections 101-13, 101-14 and 101-15 of International Standard IEC 60050-101:1998. It has the status of a horizontal standard in accordance with IEC Guide 108.</abstract>
|
1394
|
+
<status>
|
1395
|
+
<stage>60</stage>
|
1396
|
+
<substage>60</substage>
|
1397
|
+
</status>
|
1398
|
+
<copyright>
|
1399
|
+
<from>2009</from>
|
1400
|
+
<owner>
|
1401
|
+
<organization>
|
1402
|
+
<name>International Electrotechnical Commission</name>
|
1403
|
+
<abbreviation>IEC</abbreviation>
|
1404
|
+
<uri>www.iec.ch</uri>
|
1405
|
+
</organization>
|
1406
|
+
</owner>
|
1407
|
+
</copyright>
|
1408
|
+
<place>Geneva</place>
|
1409
|
+
</bibitem>
|
1410
|
+
</references></bibliography>
|
1411
|
+
</standard-document>
|
1412
|
+
OUTPUT
|
1410
1413
|
end
|
1411
1414
|
FileUtils.rm_rf File.expand_path("~/.iev.pstore")
|
1412
1415
|
FileUtils.mv File.expand_path("~/.iev.pstore1"), File.expand_path("~/.iev.pstore"), force: true
|
@@ -1414,42 +1417,40 @@ OUTPUT
|
|
1414
1417
|
FileUtils.mv File.expand_path("~/.relaton-bib.pstore1"), File.expand_path("~/.relaton/cache"), force: true
|
1415
1418
|
end
|
1416
1419
|
|
1417
|
-
|
1420
|
+
it "counts footnotes with link-only content as separate footnotes" do
|
1418
1421
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
+
#{ASCIIDOC_BLANK_HDR}
|
1423
|
+
|
1424
|
+
footnote:[http://www.example.com]
|
1422
1425
|
|
1423
|
-
|
1426
|
+
footnote:[http://www.example.com]
|
1424
1427
|
|
1425
|
-
|
1428
|
+
footnote:[http://www.example1.com]
|
1426
1429
|
INPUT
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
</fn>
|
1433
|
-
</p>
|
1434
|
-
<p id="_"><fn reference="1">
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
</fn>
|
1439
|
-
</p>
|
1440
|
-
<p id="_"><fn reference="2">
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
</fn>
|
1445
|
-
</p></sections>
|
1446
|
-
|
1447
|
-
|
1448
|
-
</standard-document>
|
1430
|
+
#{BLANK_HDR}
|
1431
|
+
<sections><p id="_"><fn reference="1">
|
1432
|
+
<p id="_">
|
1433
|
+
<link target="http://www.example.com"/>
|
1434
|
+
</p>
|
1435
|
+
</fn>
|
1436
|
+
</p>
|
1437
|
+
<p id="_"><fn reference="1">
|
1438
|
+
<p id="_">
|
1439
|
+
<link target="http://www.example.com"/>
|
1440
|
+
</p>
|
1441
|
+
</fn>
|
1442
|
+
</p>
|
1443
|
+
<p id="_"><fn reference="2">
|
1444
|
+
<p id="_">
|
1445
|
+
<link target="http://www.example1.com"/>
|
1446
|
+
</p>
|
1447
|
+
</fn>
|
1448
|
+
</p></sections>
|
1449
|
+
</standard-document>
|
1449
1450
|
OUTPUT
|
1450
1451
|
end
|
1451
1452
|
|
1452
|
-
|
1453
|
+
it "retains AsciiMath on request" do
|
1453
1454
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1454
1455
|
= Document title
|
1455
1456
|
Author
|
@@ -1461,14 +1462,13 @@ OUTPUT
|
|
1461
1462
|
|
1462
1463
|
stem:[1/r]
|
1463
1464
|
INPUT
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
</p>
|
1469
|
-
</sections>
|
1470
|
-
</standard-document>
|
1471
|
-
|
1465
|
+
#{BLANK_HDR}
|
1466
|
+
<sections>
|
1467
|
+
<p id="_">
|
1468
|
+
<stem type="AsciiMath">1/r</stem>
|
1469
|
+
</p>
|
1470
|
+
</sections>
|
1471
|
+
</standard-document>
|
1472
1472
|
OUTPUT
|
1473
1473
|
end
|
1474
1474
|
|
@@ -1483,42 +1483,40 @@ OUTPUT
|
|
1483
1483
|
|
1484
1484
|
stem:[1/r]
|
1485
1485
|
INPUT
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
1489
|
-
|
1490
|
-
<mrow>
|
1491
|
-
|
1492
|
-
</mrow>
|
1493
|
-
<mrow>
|
1494
|
-
|
1495
|
-
</mrow>
|
1496
|
-
</mfrac></math></stem>
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1486
|
+
#{BLANK_HDR}
|
1487
|
+
<sections>
|
1488
|
+
<p id="_">
|
1489
|
+
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac>
|
1490
|
+
<mrow>
|
1491
|
+
<mn>1</mn>
|
1492
|
+
</mrow>
|
1493
|
+
<mrow>
|
1494
|
+
<mi>r</mi>
|
1495
|
+
</mrow>
|
1496
|
+
</mfrac></math></stem>
|
1497
|
+
</p>
|
1498
|
+
</sections>
|
1499
|
+
</standard-document>
|
1500
1500
|
OUTPUT
|
1501
1501
|
end
|
1502
1502
|
|
1503
|
-
|
1504
|
-
|
1503
|
+
it "cleans up text MathML" do
|
1504
|
+
expect(Asciidoctor::Standoc::Converter.new(nil, backend: :standoc, header_footer: true).cleanup(Nokogiri::XML(<<~"INPUT")).to_xml).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1505
1505
|
#{BLANK_HDR}
|
1506
1506
|
<sections>
|
1507
1507
|
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac><mn>1</mn><mi>r</mi></mfrac></math></stem>
|
1508
1508
|
</sections>
|
1509
1509
|
</standard-document>
|
1510
1510
|
INPUT
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
</sections>
|
1515
|
-
|
1516
|
-
|
1517
|
-
</standard-document>
|
1511
|
+
#{BLANK_HDR}
|
1512
|
+
<sections>
|
1513
|
+
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac><mn>1</mn><mi>r</mi></mfrac></math></stem>
|
1514
|
+
</sections>
|
1515
|
+
</standard-document>
|
1518
1516
|
OUTPUT
|
1519
1517
|
end
|
1520
1518
|
|
1521
|
-
|
1519
|
+
it "renumbers numeric references in Bibliography sequentially" do
|
1522
1520
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1523
1521
|
#{ASCIIDOC_BLANK_HDR}
|
1524
1522
|
|
@@ -1532,37 +1530,37 @@ OUTPUT
|
|
1532
1530
|
* [[[iso124,ISO 124]]] _Standard 124_
|
1533
1531
|
* [[[iso123,1]]] _Standard 123_
|
1534
1532
|
INPUT
|
1535
|
-
|
1536
|
-
<sections><clause id="_" inline-header="false" obligation="normative">
|
1537
|
-
|
1538
|
-
|
1539
|
-
<eref type="inline" bibitemid="iso124" citeas="ISO 124"/></p>
|
1540
|
-
</clause>
|
1541
|
-
</sections><bibliography><references id="_" obligation="informative" normative="false">
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1551
|
-
|
1552
|
-
|
1553
|
-
</bibitem>
|
1554
|
-
|
1555
|
-
|
1556
|
-
|
1557
|
-
|
1558
|
-
|
1559
|
-
</bibitem>
|
1560
|
-
</references></bibliography>
|
1561
|
-
|
1562
|
-
OUTPUT
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
1533
|
+
#{BLANK_HDR}
|
1534
|
+
<sections><clause id="_" inline-header="false" obligation="normative">
|
1535
|
+
<title>Clause</title>
|
1536
|
+
<p id="_"><eref type="inline" bibitemid="iso123" citeas="[2]"/>
|
1537
|
+
<eref type="inline" bibitemid="iso124" citeas="ISO 124"/></p>
|
1538
|
+
</clause>
|
1539
|
+
</sections><bibliography><references id="_" obligation="informative" normative="false">
|
1540
|
+
<title>Bibliography</title>
|
1541
|
+
<bibitem id="iso124" type="standard">
|
1542
|
+
<title format="text/plain">Standard 124</title>
|
1543
|
+
<docidentifier>ISO 124</docidentifier>
|
1544
|
+
<docnumber>124</docnumber>
|
1545
|
+
<contributor>
|
1546
|
+
<role type="publisher"/>
|
1547
|
+
<organization>
|
1548
|
+
<name>ISO</name>
|
1549
|
+
</organization>
|
1550
|
+
</contributor>
|
1551
|
+
</bibitem>
|
1552
|
+
<bibitem id="iso123">
|
1553
|
+
<formattedref format="application/x-isodoc+xml">
|
1554
|
+
<em>Standard 123</em>
|
1555
|
+
</formattedref>
|
1556
|
+
<docidentifier type="metanorma">[2]</docidentifier>
|
1557
|
+
</bibitem>
|
1558
|
+
</references></bibliography>
|
1559
|
+
</standard-document>
|
1560
|
+
OUTPUT
|
1561
|
+
end
|
1562
|
+
|
1563
|
+
it "renumbers numeric references in Bibliography subclauses sequentially" do
|
1566
1564
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1567
1565
|
#{ASCIIDOC_BLANK_HDR}
|
1568
1566
|
|
@@ -1594,815 +1592,808 @@ OUTPUT
|
|
1594
1592
|
* [[[iso128,1]]] _Standard 123_
|
1595
1593
|
|
1596
1594
|
INPUT
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
1609
|
-
|
1610
|
-
|
1611
|
-
|
1612
|
-
|
1613
|
-
|
1614
|
-
|
1615
|
-
|
1616
|
-
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1627
|
-
|
1628
|
-
|
1629
|
-
|
1630
|
-
|
1631
|
-
|
1632
|
-
|
1633
|
-
|
1634
|
-
|
1635
|
-
|
1636
|
-
|
1637
|
-
|
1638
|
-
|
1639
|
-
|
1640
|
-
|
1641
|
-
|
1642
|
-
|
1643
|
-
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1647
|
-
|
1648
|
-
|
1649
|
-
|
1650
|
-
|
1651
|
-
|
1652
|
-
|
1653
|
-
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1668
|
-
OUTPUT
|
1669
|
-
|
1595
|
+
#{BLANK_HDR}
|
1596
|
+
<sections><clause id="_" inline-header="false" obligation="normative">
|
1597
|
+
<title>Clause</title>
|
1598
|
+
<p id="_"><eref type="inline" bibitemid="iso123" citeas="[2]"/>
|
1599
|
+
<eref type="inline" bibitemid="iso124" citeas="ISO 124"/>
|
1600
|
+
<eref type="inline" bibitemid="iso125" citeas="ISO 125"/>
|
1601
|
+
<eref type="inline" bibitemid="iso126" citeas="[4]"/></p>
|
1602
|
+
</clause>
|
1603
|
+
</sections><bibliography><clause id="_" obligation="informative"><title>Bibliography</title><references id="_" obligation="informative" normative="false">
|
1604
|
+
<title>Clause 1</title>
|
1605
|
+
<bibitem id="iso124" type="standard">
|
1606
|
+
<title format="text/plain">Standard 124</title>
|
1607
|
+
<docidentifier>ISO 124</docidentifier>
|
1608
|
+
<docnumber>124</docnumber>
|
1609
|
+
<contributor>
|
1610
|
+
<role type="publisher"/>
|
1611
|
+
<organization>
|
1612
|
+
<name>ISO</name>
|
1613
|
+
</organization>
|
1614
|
+
</contributor>
|
1615
|
+
</bibitem>
|
1616
|
+
<bibitem id="iso123">
|
1617
|
+
<formattedref format="application/x-isodoc+xml">
|
1618
|
+
<em>Standard 123</em>
|
1619
|
+
</formattedref>
|
1620
|
+
<docidentifier type="metanorma">[2]</docidentifier>
|
1621
|
+
</bibitem>
|
1622
|
+
</references>
|
1623
|
+
<references id="_" obligation="informative" normative="false">
|
1624
|
+
<bibitem id="iso125" type="standard">
|
1625
|
+
<title format="text/plain">Standard 124</title>
|
1626
|
+
<docidentifier>ISO 125</docidentifier>
|
1627
|
+
<docnumber>125</docnumber>
|
1628
|
+
<contributor>
|
1629
|
+
<role type="publisher"/>
|
1630
|
+
<organization>
|
1631
|
+
<name>ISO</name>
|
1632
|
+
</organization>
|
1633
|
+
</contributor>
|
1634
|
+
</bibitem>
|
1635
|
+
<bibitem id="iso126">
|
1636
|
+
<formattedref format="application/x-isodoc+xml">
|
1637
|
+
<em>Standard 123</em>
|
1638
|
+
</formattedref>
|
1639
|
+
<docidentifier type="metanorma">[4]</docidentifier>
|
1640
|
+
</bibitem>
|
1641
|
+
</references>
|
1642
|
+
</clause>
|
1643
|
+
<clause id='_' obligation='informative'>
|
1644
|
+
<title>Bibliography Redux</title>
|
1645
|
+
<references id='_' normative='false' obligation='informative'>
|
1646
|
+
<title>Clause 1</title>
|
1647
|
+
<bibitem id='iso127' type='standard'>
|
1648
|
+
<title format='text/plain'>Standard 124</title>
|
1649
|
+
<docidentifier>ISO 124</docidentifier>
|
1650
|
+
<docnumber>124</docnumber>
|
1651
|
+
<contributor>
|
1652
|
+
<role type='publisher'/>
|
1653
|
+
<organization>
|
1654
|
+
<name>ISO</name>
|
1655
|
+
</organization>
|
1656
|
+
</contributor>
|
1657
|
+
</bibitem>
|
1658
|
+
<bibitem id='iso128'>
|
1659
|
+
<formattedref format='application/x-isodoc+xml'>
|
1660
|
+
<em>Standard 123</em>
|
1661
|
+
</formattedref>
|
1662
|
+
<docidentifier type='metanorma'>[6]</docidentifier>
|
1663
|
+
</bibitem>
|
1664
|
+
</references></clause></bibliography>
|
1665
|
+
</standard-document>
|
1666
|
+
OUTPUT
|
1667
|
+
end
|
1670
1668
|
|
1671
|
-
it "removes bibdata bibitem IDs" do
|
1669
|
+
it "removes bibdata bibitem IDs" do
|
1672
1670
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1673
|
-
|
1674
|
-
|
1675
|
-
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1671
|
+
= Document title
|
1672
|
+
Author
|
1673
|
+
:docfile: test.adoc
|
1674
|
+
:nodoc:
|
1675
|
+
:novalid:
|
1676
|
+
:no-isobib:
|
1677
|
+
:translated-from: IEC 60050-102
|
1680
1678
|
|
1681
|
-
|
1682
|
-
|
1679
|
+
[bibliography]
|
1680
|
+
== Normative References
|
1683
1681
|
|
1684
1682
|
INPUT
|
1685
|
-
|
1686
|
-
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1690
|
-
|
1691
|
-
|
1692
|
-
|
1693
|
-
|
1694
|
-
|
1695
|
-
|
1696
|
-
|
1697
|
-
|
1698
|
-
|
1699
|
-
|
1700
|
-
|
1701
|
-
|
1702
|
-
|
1703
|
-
|
1704
|
-
|
1705
|
-
|
1706
|
-
|
1707
|
-
|
1708
|
-
|
1709
|
-
|
1710
|
-
|
1711
|
-
|
1712
|
-
|
1713
|
-
|
1714
|
-
</standard-document>
|
1715
|
-
OUTPUT
|
1716
|
-
end
|
1683
|
+
<?xml version='1.0' encoding='UTF-8'?>
|
1684
|
+
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
1685
|
+
<bibdata type='standard'>
|
1686
|
+
<title language='en' format='text/plain'>Document title</title>
|
1687
|
+
<language>en</language>
|
1688
|
+
<script>Latn</script>
|
1689
|
+
<status>
|
1690
|
+
<stage>published</stage>
|
1691
|
+
</status>
|
1692
|
+
<copyright>
|
1693
|
+
<from>#{Date.today.year}</from>
|
1694
|
+
</copyright>
|
1695
|
+
<relation type='translatedFrom'>
|
1696
|
+
<bibitem>
|
1697
|
+
<title>--</title>
|
1698
|
+
<docidentifier>IEC 60050-102</docidentifier>
|
1699
|
+
</bibitem>
|
1700
|
+
</relation>
|
1701
|
+
<ext>
|
1702
|
+
<doctype>article</doctype>
|
1703
|
+
</ext>
|
1704
|
+
</bibdata>
|
1705
|
+
<sections> </sections>
|
1706
|
+
<bibliography>
|
1707
|
+
<references id='_' obligation='informative' normative="true">
|
1708
|
+
<title>Normative references</title>
|
1709
|
+
<p id="_">There are no normative references in this document.</p>
|
1710
|
+
</references>
|
1711
|
+
</bibliography>
|
1712
|
+
</standard-document>
|
1713
|
+
OUTPUT
|
1714
|
+
end
|
1717
1715
|
|
1718
|
-
it "imports boilerplate file" do
|
1719
|
-
|
1720
|
-
|
1721
|
-
|
1722
|
-
|
1723
|
-
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
1727
|
-
|
1716
|
+
it "imports boilerplate file" do
|
1717
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1718
|
+
= Document title
|
1719
|
+
Author
|
1720
|
+
:docfile: test.adoc
|
1721
|
+
:nodoc:
|
1722
|
+
:novalid:
|
1723
|
+
:no-isobib:
|
1724
|
+
:docstage: 10
|
1725
|
+
:boilerplate-authority: spec/assets/boilerplate.xml
|
1728
1726
|
|
1729
|
-
|
1727
|
+
== Clause 1
|
1730
1728
|
|
1731
1729
|
INPUT
|
1732
|
-
|
1733
|
-
|
1734
|
-
|
1735
|
-
|
1736
|
-
|
1737
|
-
|
1738
|
-
|
1739
|
-
|
1740
|
-
|
1741
|
-
|
1742
|
-
|
1743
|
-
|
1744
|
-
|
1745
|
-
|
1746
|
-
|
1747
|
-
|
1748
|
-
|
1749
|
-
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1753
|
-
|
1754
|
-
|
1755
|
-
</standard-document>
|
1730
|
+
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
1731
|
+
<bibdata type='standard'>
|
1732
|
+
<title language='en' format='text/plain'>Document title</title>
|
1733
|
+
<language>en</language>
|
1734
|
+
<script>Latn</script>
|
1735
|
+
<status>
|
1736
|
+
<stage>10</stage>
|
1737
|
+
</status>
|
1738
|
+
<copyright>
|
1739
|
+
<from>#{Date.today.year}</from>
|
1740
|
+
</copyright>
|
1741
|
+
<ext>
|
1742
|
+
<doctype>article</doctype>
|
1743
|
+
</ext>
|
1744
|
+
</bibdata>
|
1745
|
+
<boilerplate>
|
1746
|
+
<text>10</text>
|
1747
|
+
</boilerplate>
|
1748
|
+
<sections>
|
1749
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1750
|
+
<title>Clause 1</title>
|
1751
|
+
</clause>
|
1752
|
+
</sections>
|
1753
|
+
</standard-document>
|
1756
1754
|
OUTPUT
|
1757
|
-
end
|
1755
|
+
end
|
1758
1756
|
|
1759
|
-
it "sorts symbols lists" do
|
1760
|
-
|
1761
|
-
|
1762
|
-
|
1763
|
-
|
1764
|
-
|
1765
|
-
|
1766
|
-
|
1767
|
-
|
1768
|
-
|
1769
|
-
|
1770
|
-
|
1771
|
-
|
1772
|
-
|
1773
|
-
|
1774
|
-
|
1775
|
-
|
1776
|
-
|
1777
|
-
|
1778
|
-
|
1779
|
-
|
1780
|
-
<dd>
|
1781
|
-
|
1782
|
-
</dd>
|
1783
|
-
<dt>
|
1784
|
-
|
1785
|
-
|
1786
|
-
|
1787
|
-
|
1788
|
-
|
1789
|
-
</dt>
|
1790
|
-
<dd>
|
1791
|
-
|
1792
|
-
</dd>
|
1793
|
-
|
1794
|
-
|
1795
|
-
|
1796
|
-
|
1797
|
-
|
1798
|
-
|
1799
|
-
|
1800
|
-
|
1801
|
-
|
1802
|
-
|
1803
|
-
|
1804
|
-
|
1805
|
-
|
1806
|
-
|
1807
|
-
|
1808
|
-
|
1809
|
-
|
1810
|
-
|
1811
|
-
|
1812
|
-
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1816
|
-
</standard-document>
|
1817
|
-
|
1818
|
-
end
|
1757
|
+
it "sorts symbols lists" do
|
1758
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1759
|
+
#{ASCIIDOC_BLANK_HDR}
|
1760
|
+
|
1761
|
+
[[L]]
|
1762
|
+
== Symbols and abbreviated terms
|
1763
|
+
|
1764
|
+
α:: Definition 1
|
1765
|
+
Xa:: Definition 2
|
1766
|
+
x_1_:: Definition 3
|
1767
|
+
x_m_:: Definition 4
|
1768
|
+
x:: Definition 5
|
1769
|
+
stem:[n]:: Definition 6
|
1770
|
+
m:: Definition 7
|
1771
|
+
INPUT
|
1772
|
+
#{BLANK_HDR}
|
1773
|
+
<sections>
|
1774
|
+
<definitions id='L' obligation="normative">
|
1775
|
+
<title>Symbols and abbreviated terms</title>
|
1776
|
+
<dl id='_'>
|
1777
|
+
<dt>m</dt>
|
1778
|
+
<dd>
|
1779
|
+
<p id='_'>Definition 7</p>
|
1780
|
+
</dd>
|
1781
|
+
<dt>
|
1782
|
+
<stem type='MathML'>
|
1783
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
1784
|
+
<mi>n</mi>
|
1785
|
+
</math>
|
1786
|
+
</stem>
|
1787
|
+
</dt>
|
1788
|
+
<dd>
|
1789
|
+
<p id='_'>Definition 6</p>
|
1790
|
+
</dd>
|
1791
|
+
<dt>x</dt>
|
1792
|
+
<dd>
|
1793
|
+
<p id='_'>Definition 5</p>
|
1794
|
+
</dd>
|
1795
|
+
<dt>x_m_</dt>
|
1796
|
+
<dd>
|
1797
|
+
<p id='_'>Definition 4</p>
|
1798
|
+
</dd>
|
1799
|
+
<dt>x_1_</dt>
|
1800
|
+
<dd>
|
1801
|
+
<p id='_'>Definition 3</p>
|
1802
|
+
</dd>
|
1803
|
+
<dt>Xa</dt>
|
1804
|
+
<dd>
|
1805
|
+
<p id='_'>Definition 2</p>
|
1806
|
+
</dd>
|
1807
|
+
<dt>α</dt>
|
1808
|
+
<dd>
|
1809
|
+
<p id='_'>Definition 1</p>
|
1810
|
+
</dd>
|
1811
|
+
</dl>
|
1812
|
+
</definitions>
|
1813
|
+
</sections>
|
1814
|
+
</standard-document>
|
1815
|
+
OUTPUT
|
1816
|
+
end
|
1817
|
+
|
1818
|
+
it "sorts symbols lists" do
|
1819
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1820
|
+
#{ASCIIDOC_BLANK_HDR}
|
1821
|
+
|
1822
|
+
[[L]]
|
1823
|
+
== Symbols and abbreviated terms
|
1819
1824
|
|
1820
|
-
|
1821
|
-
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1839
|
-
<
|
1840
|
-
|
1841
|
-
|
1842
|
-
<
|
1825
|
+
stem:[alpha]:: Definition 1
|
1826
|
+
xa:: Definition 2
|
1827
|
+
stem:[x_1]:: Definition 3
|
1828
|
+
stem:[x_m]:: Definition 4
|
1829
|
+
x:: Definition 5
|
1830
|
+
INPUT
|
1831
|
+
#{BLANK_HDR}
|
1832
|
+
<sections>
|
1833
|
+
<definitions id='L' obligation="normative">
|
1834
|
+
<title>Symbols and abbreviated terms</title>
|
1835
|
+
<dl id='_'>
|
1836
|
+
<dt>x</dt>
|
1837
|
+
<dd>
|
1838
|
+
<p id='_'>Definition 5</p>
|
1839
|
+
</dd>
|
1840
|
+
<dt><stem type='MathML'>
|
1841
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
1842
|
+
<msub>
|
1843
|
+
<mrow>
|
1844
|
+
<mi>x</mi>
|
1845
|
+
</mrow>
|
1846
|
+
<mrow>
|
1847
|
+
<mi>m</mi>
|
1848
|
+
</mrow>
|
1849
|
+
</msub>
|
1850
|
+
</math>
|
1851
|
+
</stem></dt>
|
1852
|
+
<dd>
|
1853
|
+
<p id='_'>Definition 4</p>
|
1854
|
+
</dd>
|
1855
|
+
<dt><stem type='MathML'>
|
1856
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
1857
|
+
<msub>
|
1858
|
+
<mrow>
|
1859
|
+
<mi>x</mi>
|
1860
|
+
</mrow>
|
1861
|
+
<mrow>
|
1862
|
+
<mn>1</mn>
|
1863
|
+
</mrow>
|
1864
|
+
</msub>
|
1865
|
+
</math>
|
1866
|
+
</stem></dt>
|
1867
|
+
<dd>
|
1868
|
+
<p id='_'>Definition 3</p>
|
1869
|
+
</dd>
|
1870
|
+
<dt>xa</dt>
|
1871
|
+
<dd>
|
1872
|
+
<p id='_'>Definition 2</p>
|
1873
|
+
</dd>
|
1874
|
+
<dt>
|
1875
|
+
<stem type='MathML'>
|
1843
1876
|
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
1844
|
-
|
1845
|
-
|
1846
|
-
|
1847
|
-
</
|
1848
|
-
<
|
1849
|
-
|
1850
|
-
</
|
1851
|
-
|
1852
|
-
</
|
1853
|
-
</
|
1854
|
-
|
1855
|
-
|
1856
|
-
|
1857
|
-
<dt><stem type='MathML'>
|
1858
|
-
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
1859
|
-
<msub>
|
1860
|
-
<mrow>
|
1861
|
-
<mi>x</mi>
|
1862
|
-
</mrow>
|
1863
|
-
<mrow>
|
1864
|
-
<mn>1</mn>
|
1865
|
-
</mrow>
|
1866
|
-
</msub>
|
1867
|
-
</math>
|
1868
|
-
</stem></dt>
|
1869
|
-
<dd>
|
1870
|
-
<p id='_'>Definition 3</p>
|
1871
|
-
</dd>
|
1872
|
-
<dt>xa</dt>
|
1873
|
-
<dd>
|
1874
|
-
<p id='_'>Definition 2</p>
|
1875
|
-
</dd>
|
1876
|
-
<dt>
|
1877
|
-
<stem type='MathML'>
|
1878
|
-
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
1879
|
-
<mi>α</mi>
|
1880
|
-
</math>
|
1881
|
-
</stem>
|
1882
|
-
</dt>
|
1883
|
-
<dd>
|
1884
|
-
<p id='_'>Definition 1</p>
|
1885
|
-
</dd>
|
1886
|
-
</dl>
|
1887
|
-
</definitions>
|
1888
|
-
</sections>
|
1889
|
-
</standard-document>
|
1890
|
-
OUTPUT
|
1891
|
-
end
|
1877
|
+
<mi>α</mi>
|
1878
|
+
</math>
|
1879
|
+
</stem>
|
1880
|
+
</dt>
|
1881
|
+
<dd>
|
1882
|
+
<p id='_'>Definition 1</p>
|
1883
|
+
</dd>
|
1884
|
+
</dl>
|
1885
|
+
</definitions>
|
1886
|
+
</sections>
|
1887
|
+
</standard-document>
|
1888
|
+
OUTPUT
|
1889
|
+
end
|
1892
1890
|
|
1893
|
-
it "moves inherit macros to correct location" do
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
1897
|
-
== Clause
|
1898
|
-
|
1899
|
-
[.requirement,subsequence="A",inherit="/ss/584/2015/level/1 & /ss/584/2015/level/2"]
|
1900
|
-
.Title
|
1901
|
-
====
|
1902
|
-
inherit:[A]
|
1903
|
-
inherit:[B]
|
1904
|
-
I recommend this
|
1905
|
-
====
|
1906
|
-
|
1907
|
-
[.requirement,subsequence="A",classification="X:Y"]
|
1908
|
-
.Title
|
1909
|
-
====
|
1910
|
-
inherit:[A]
|
1911
|
-
I recommend this
|
1912
|
-
====
|
1913
|
-
|
1914
|
-
[.requirement,subsequence="A"]
|
1915
|
-
.Title
|
1916
|
-
====
|
1917
|
-
inherit:[A]
|
1918
|
-
I recommend this
|
1919
|
-
====
|
1920
|
-
|
1921
|
-
[.requirement,subsequence="A"]
|
1922
|
-
.Title
|
1923
|
-
====
|
1924
|
-
inherit:[A]
|
1925
|
-
====
|
1926
|
-
|
1927
|
-
|
1928
|
-
INPUT
|
1929
|
-
#{BLANK_HDR}
|
1930
|
-
<sections>
|
1931
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1932
|
-
<title>Clause</title>
|
1933
|
-
<requirement id='_' subsequence='A'>
|
1934
|
-
<title>Title</title>
|
1935
|
-
<inherit>/ss/584/2015/level/1 & /ss/584/2015/level/2</inherit>
|
1936
|
-
<inherit>A</inherit>
|
1937
|
-
<inherit>B</inherit>
|
1938
|
-
<description>
|
1939
|
-
<p id='_'> I recommend this</p>
|
1940
|
-
</description>
|
1941
|
-
</requirement>
|
1942
|
-
<requirement id='_' subsequence='A'>
|
1943
|
-
<title>Title</title>
|
1944
|
-
<inherit>A</inherit>
|
1945
|
-
<classification>
|
1946
|
-
<tag>X</tag>
|
1947
|
-
<value>Y</value>
|
1948
|
-
</classification>
|
1949
|
-
<description>
|
1950
|
-
<p id='_'> I recommend this</p>
|
1951
|
-
</description>
|
1952
|
-
</requirement>
|
1953
|
-
<requirement id='_' subsequence='A'>
|
1954
|
-
<title>Title</title>
|
1955
|
-
<inherit>A</inherit>
|
1956
|
-
<description>
|
1957
|
-
<p id='_'> I recommend this</p>
|
1958
|
-
</description>
|
1959
|
-
</requirement>
|
1960
|
-
<requirement id='_' subsequence='A'>
|
1961
|
-
<title>Title</title>
|
1962
|
-
<inherit>A</inherit>
|
1963
|
-
<description>
|
1964
|
-
<p id='_'> </p>
|
1965
|
-
</description>
|
1966
|
-
</requirement>
|
1967
|
-
</clause>
|
1968
|
-
</sections>
|
1969
|
-
</standard-document>
|
1970
|
-
OUTPUT
|
1971
|
-
end
|
1891
|
+
it "moves inherit macros to correct location" do
|
1892
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1893
|
+
#{ASCIIDOC_BLANK_HDR}
|
1972
1894
|
|
1973
|
-
|
1974
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1975
|
-
#{ASCIIDOC_BLANK_HDR}
|
1976
|
-
|
1977
|
-
.Foreword
|
1978
|
-
Foreword
|
1979
|
-
|
1980
|
-
[NOTE,beforeclauses=true]
|
1981
|
-
====
|
1982
|
-
Note which is very important
|
1983
|
-
====
|
1984
|
-
|
1985
|
-
== Introduction
|
1986
|
-
Introduction
|
1987
|
-
|
1988
|
-
== Scope
|
1989
|
-
Scope statement
|
1990
|
-
|
1991
|
-
[IMPORTANT,beforeclauses=true]
|
1992
|
-
====
|
1993
|
-
Notice which is very important
|
1994
|
-
====
|
1995
|
-
INPUT
|
1996
|
-
#{BLANK_HDR}
|
1997
|
-
<preface>
|
1998
|
-
<note id='_'>
|
1999
|
-
<p id='_'>Note which is very important</p>
|
2000
|
-
</note>
|
2001
|
-
<foreword id='_' obligation='informative'>
|
2002
|
-
<title>Foreword</title>
|
2003
|
-
<p id='_'>Foreword</p>
|
2004
|
-
</foreword>
|
2005
|
-
<introduction id='_' obligation='informative'>
|
2006
|
-
<title>Introduction</title>
|
2007
|
-
<p id='_'>Introduction</p>
|
2008
|
-
</introduction>
|
2009
|
-
</preface>
|
2010
|
-
<sections>
|
2011
|
-
<admonition id='_' type='important'>
|
2012
|
-
<p id='_'>Notice which is very important</p>
|
2013
|
-
</admonition>
|
2014
|
-
<clause id='_' inline-header='false' obligation='normative' type="scope">
|
2015
|
-
<title>Scope</title>
|
2016
|
-
<p id='_'>Scope statement</p>
|
2017
|
-
</clause>
|
2018
|
-
</sections>
|
2019
|
-
</standard-document>
|
2020
|
-
|
2021
|
-
OUTPUT
|
2022
|
-
end
|
1895
|
+
== Clause
|
2023
1896
|
|
1897
|
+
[.requirement,subsequence="A",inherit="/ss/584/2015/level/1 & /ss/584/2015/level/2"]
|
1898
|
+
.Title
|
1899
|
+
====
|
1900
|
+
inherit:[A]
|
1901
|
+
inherit:[B]
|
1902
|
+
I recommend this
|
1903
|
+
====
|
2024
1904
|
|
2025
|
-
|
2026
|
-
|
2027
|
-
|
2028
|
-
|
2029
|
-
|
2030
|
-
|
2031
|
-
<</:ab>>
|
2032
|
-
<<:>>
|
2033
|
-
<<1>>
|
2034
|
-
<<1:>>
|
2035
|
-
<<1#b>>
|
2036
|
-
<<:a#b:>>
|
2037
|
-
<</%ab>>
|
2038
|
-
<<1!>>
|
2039
|
-
|
2040
|
-
INPUT
|
2041
|
-
expect(xmlpp(Asciidoctor.convert(input, backend: :standoc, header_footer: true).gsub(/<p id="_[^"]+">/, "").gsub('</p>', ""))).to be_equivalent_to (<<~"OUTPUT")
|
2042
|
-
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
2043
|
-
<bibdata type='standard'>
|
2044
|
-
<title language='en' format='text/plain'>Document title</title>
|
2045
|
-
<language>en</language>
|
2046
|
-
<script>Latn</script>
|
2047
|
-
<status>
|
2048
|
-
<stage>published</stage>
|
2049
|
-
</status>
|
2050
|
-
<copyright>
|
2051
|
-
<from>#{Time.now.year}</from>
|
2052
|
-
</copyright>
|
2053
|
-
<ext>
|
2054
|
-
<doctype>article</doctype>
|
2055
|
-
</ext>
|
2056
|
-
</bibdata>
|
2057
|
-
<sections>
|
2058
|
-
<clause id='a_b' inline-header='false' obligation='normative'>
|
2059
|
-
<title>A</title>
|
2060
|
-
<eref bibitemid='__ab' citeas=''/>
|
2061
|
-
<xref target='_'/>
|
2062
|
-
<xref target='_1'/>
|
2063
|
-
<xref target='_1_'/>
|
2064
|
-
<xref target='1#b'/>
|
2065
|
-
<xref target='_a#b_'/>
|
2066
|
-
<xref target='_%ab'/>
|
2067
|
-
<xref target='_1_'/>
|
2068
|
-
</clause>
|
2069
|
-
</sections>
|
2070
|
-
<bibliography>
|
2071
|
-
<references hidden='true' normative='false'>
|
2072
|
-
<bibitem id='__ab' type='internal'>
|
2073
|
-
<docidentifier type='repository'>//ab</docidentifier>
|
2074
|
-
</bibitem>
|
2075
|
-
</references>
|
2076
|
-
</bibliography>
|
2077
|
-
</standard-document>
|
2078
|
-
OUTPUT
|
2079
|
-
expect{Asciidoctor.convert(input, backend: :standoc, header_footer: true)}.to output(%r{normalised identifier in <clause id="a_b" inline-header="false" obligation="normative"/> from a:b}).to_stderr
|
2080
|
-
expect{Asciidoctor.convert(input, backend: :standoc, header_footer: true)}.to output(%r{normalised identifier in <eref bibitemid="__ab" citeas=""/> from /_ab}).to_stderr
|
2081
|
-
expect{Asciidoctor.convert(input, backend: :standoc, header_footer: true)}.to output(%r{normalised identifier in <xref target="_"/> from :}).to_stderr
|
2082
|
-
expect{Asciidoctor.convert(input, backend: :standoc, header_footer: true)}.to output(%r{normalised identifier in <xref target="_1"/> from 1}).to_stderr
|
2083
|
-
expect{Asciidoctor.convert(input, backend: :standoc, header_footer: true)}.to output(%r{normalised identifier in <xref target="_1_"/> from 1:}).to_stderr
|
2084
|
-
expect{Asciidoctor.convert(input, backend: :standoc, header_footer: true)}.to output(%r{normalised identifier in <xref target="_a#b_"/> from :a#b:}).to_stderr
|
2085
|
-
end
|
1905
|
+
[.requirement,subsequence="A",classification="X:Y"]
|
1906
|
+
.Title
|
1907
|
+
====
|
1908
|
+
inherit:[A]
|
1909
|
+
I recommend this
|
1910
|
+
====
|
2086
1911
|
|
2087
|
-
|
2088
|
-
|
2089
|
-
|
2090
|
-
|
2091
|
-
|
2092
|
-
|
2093
|
-
|
2094
|
-
|
2095
|
-
|
2096
|
-
|
2097
|
-
|
2098
|
-
|
2099
|
-
<bibdata type='standard'>
|
2100
|
-
<title language='en' format='text/plain'>Document title</title>
|
2101
|
-
<note type='title-footnote'>
|
2102
|
-
<p>ABC</p>
|
2103
|
-
</note>
|
2104
|
-
<note type='title-footnote'>
|
2105
|
-
<p>DEF</p>
|
2106
|
-
</note>
|
2107
|
-
<language>en</language>
|
2108
|
-
<script>Latn</script>
|
2109
|
-
<status>
|
2110
|
-
<stage>published</stage>
|
2111
|
-
</status>
|
2112
|
-
<copyright>
|
2113
|
-
<from>#{Time.now.year}</from>
|
2114
|
-
</copyright>
|
2115
|
-
<ext>
|
2116
|
-
<doctype>article</doctype>
|
2117
|
-
</ext>
|
2118
|
-
</bibdata>
|
2119
|
-
<sections> </sections>
|
2120
|
-
</standard-document>
|
2121
|
-
OUTPUT
|
1912
|
+
[.requirement,subsequence="A"]
|
1913
|
+
.Title
|
1914
|
+
====
|
1915
|
+
inherit:[A]
|
1916
|
+
I recommend this
|
1917
|
+
====
|
1918
|
+
|
1919
|
+
[.requirement,subsequence="A"]
|
1920
|
+
.Title
|
1921
|
+
====
|
1922
|
+
inherit:[A]
|
1923
|
+
====
|
2122
1924
|
|
2123
|
-
end
|
2124
1925
|
|
2125
|
-
|
2126
|
-
|
2127
|
-
|
2128
|
-
|
2129
|
-
|
2130
|
-
|
2131
|
-
|
2132
|
-
|
2133
|
-
<
|
2134
|
-
|
2135
|
-
|
2136
|
-
|
2137
|
-
|
2138
|
-
|
2139
|
-
|
2140
|
-
|
2141
|
-
</
|
2142
|
-
|
2143
|
-
|
2144
|
-
|
2145
|
-
|
2146
|
-
|
2147
|
-
|
2148
|
-
|
2149
|
-
|
2150
|
-
|
2151
|
-
|
2152
|
-
|
2153
|
-
|
2154
|
-
|
2155
|
-
|
2156
|
-
|
2157
|
-
|
2158
|
-
|
2159
|
-
|
2160
|
-
|
2161
|
-
|
2162
|
-
|
1926
|
+
INPUT
|
1927
|
+
#{BLANK_HDR}
|
1928
|
+
<sections>
|
1929
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1930
|
+
<title>Clause</title>
|
1931
|
+
<requirement id='_' subsequence='A'>
|
1932
|
+
<title>Title</title>
|
1933
|
+
<inherit>/ss/584/2015/level/1 & /ss/584/2015/level/2</inherit>
|
1934
|
+
<inherit>A</inherit>
|
1935
|
+
<inherit>B</inherit>
|
1936
|
+
<description>
|
1937
|
+
<p id='_'> I recommend this</p>
|
1938
|
+
</description>
|
1939
|
+
</requirement>
|
1940
|
+
<requirement id='_' subsequence='A'>
|
1941
|
+
<title>Title</title>
|
1942
|
+
<inherit>A</inherit>
|
1943
|
+
<classification>
|
1944
|
+
<tag>X</tag>
|
1945
|
+
<value>Y</value>
|
1946
|
+
</classification>
|
1947
|
+
<description>
|
1948
|
+
<p id='_'> I recommend this</p>
|
1949
|
+
</description>
|
1950
|
+
</requirement>
|
1951
|
+
<requirement id='_' subsequence='A'>
|
1952
|
+
<title>Title</title>
|
1953
|
+
<inherit>A</inherit>
|
1954
|
+
<description>
|
1955
|
+
<p id='_'> I recommend this</p>
|
1956
|
+
</description>
|
1957
|
+
</requirement>
|
1958
|
+
<requirement id='_' subsequence='A'>
|
1959
|
+
<title>Title</title>
|
1960
|
+
<inherit>A</inherit>
|
1961
|
+
<description>
|
1962
|
+
<p id='_'> </p>
|
1963
|
+
</description>
|
1964
|
+
</requirement>
|
1965
|
+
</clause>
|
1966
|
+
</sections>
|
1967
|
+
</standard-document>
|
1968
|
+
OUTPUT
|
1969
|
+
end
|
1970
|
+
|
1971
|
+
it "moves %beforeclause admonitions to right position" do
|
1972
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1973
|
+
#{ASCIIDOC_BLANK_HDR}
|
1974
|
+
|
1975
|
+
.Foreword
|
1976
|
+
Foreword
|
1977
|
+
|
1978
|
+
[NOTE,beforeclauses=true]
|
1979
|
+
====
|
1980
|
+
Note which is very important
|
1981
|
+
====
|
1982
|
+
|
1983
|
+
== Introduction
|
1984
|
+
Introduction
|
1985
|
+
|
1986
|
+
== Scope
|
1987
|
+
Scope statement
|
1988
|
+
|
1989
|
+
[IMPORTANT,beforeclauses=true]
|
1990
|
+
====
|
1991
|
+
Notice which is very important
|
1992
|
+
====
|
1993
|
+
INPUT
|
1994
|
+
#{BLANK_HDR}
|
1995
|
+
<preface>
|
1996
|
+
<note id='_'>
|
1997
|
+
<p id='_'>Note which is very important</p>
|
1998
|
+
</note>
|
1999
|
+
<foreword id='_' obligation='informative'>
|
2000
|
+
<title>Foreword</title>
|
2001
|
+
<p id='_'>Foreword</p>
|
2002
|
+
</foreword>
|
2003
|
+
<introduction id='_' obligation='informative'>
|
2004
|
+
<title>Introduction</title>
|
2005
|
+
<p id='_'>Introduction</p>
|
2006
|
+
</introduction>
|
2007
|
+
</preface>
|
2008
|
+
<sections>
|
2009
|
+
<admonition id='_' type='important'>
|
2010
|
+
<p id='_'>Notice which is very important</p>
|
2011
|
+
</admonition>
|
2012
|
+
<clause id='_' inline-header='false' obligation='normative' type="scope">
|
2013
|
+
<title>Scope</title>
|
2014
|
+
<p id='_'>Scope statement</p>
|
2015
|
+
</clause>
|
2016
|
+
</sections>
|
2017
|
+
</standard-document>
|
2018
|
+
OUTPUT
|
2019
|
+
end
|
2020
|
+
|
2021
|
+
it "fixes illegal anchors" do
|
2022
|
+
input = <<~INPUT
|
2023
|
+
#{ASCIIDOC_BLANK_HDR}
|
2024
|
+
|
2025
|
+
[[a:b]]
|
2026
|
+
== A
|
2027
|
+
<</:ab>>
|
2028
|
+
<<:>>
|
2029
|
+
<<1>>
|
2030
|
+
<<1:>>
|
2031
|
+
<<1#b>>
|
2032
|
+
<<:a#b:>>
|
2033
|
+
<</%ab>>
|
2034
|
+
<<1!>>
|
2035
|
+
INPUT
|
2036
|
+
expect(xmlpp(Asciidoctor.convert(input, backend: :standoc, header_footer: true).gsub(/<p id="_[^"]+">/, "").gsub("</p>", ""))).to be_equivalent_to (<<~"OUTPUT")
|
2037
|
+
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
2038
|
+
<bibdata type='standard'>
|
2039
|
+
<title language='en' format='text/plain'>Document title</title>
|
2040
|
+
<language>en</language>
|
2041
|
+
<script>Latn</script>
|
2042
|
+
<status>
|
2043
|
+
<stage>published</stage>
|
2044
|
+
</status>
|
2045
|
+
<copyright>
|
2046
|
+
<from>#{Time.now.year}</from>
|
2047
|
+
</copyright>
|
2048
|
+
<ext>
|
2049
|
+
<doctype>article</doctype>
|
2050
|
+
</ext>
|
2051
|
+
</bibdata>
|
2052
|
+
<sections>
|
2053
|
+
<clause id='a_b' inline-header='false' obligation='normative'>
|
2054
|
+
<title>A</title>
|
2055
|
+
<eref bibitemid='__ab' citeas=''/>
|
2056
|
+
<xref target='_'/>
|
2057
|
+
<xref target='_1'/>
|
2058
|
+
<xref target='_1_'/>
|
2059
|
+
<xref target='1#b'/>
|
2060
|
+
<xref target='_a#b_'/>
|
2061
|
+
<xref target='_%ab'/>
|
2062
|
+
<xref target='_1_'/>
|
2063
|
+
</clause>
|
2064
|
+
</sections>
|
2065
|
+
<bibliography>
|
2066
|
+
<references hidden='true' normative='false'>
|
2067
|
+
<bibitem id='__ab' type='internal'>
|
2068
|
+
<docidentifier type='repository'>//ab</docidentifier>
|
2069
|
+
</bibitem>
|
2070
|
+
</references>
|
2071
|
+
</bibliography>
|
2072
|
+
</standard-document>
|
2073
|
+
OUTPUT
|
2074
|
+
expect { Asciidoctor.convert(input, backend: :standoc, header_footer: true) }.to output(%r{normalised identifier in <clause id="a_b" inline-header="false" obligation="normative"/> from a:b}).to_stderr
|
2075
|
+
expect { Asciidoctor.convert(input, backend: :standoc, header_footer: true) }.to output(%r{normalised identifier in <eref bibitemid="__ab" citeas=""/> from /_ab}).to_stderr
|
2076
|
+
expect { Asciidoctor.convert(input, backend: :standoc, header_footer: true) }.to output(%r{normalised identifier in <xref target="_"/> from :}).to_stderr
|
2077
|
+
expect { Asciidoctor.convert(input, backend: :standoc, header_footer: true) }.to output(%r{normalised identifier in <xref target="_1"/> from 1}).to_stderr
|
2078
|
+
expect { Asciidoctor.convert(input, backend: :standoc, header_footer: true) }.to output(%r{normalised identifier in <xref target="_1_"/> from 1:}).to_stderr
|
2079
|
+
expect { Asciidoctor.convert(input, backend: :standoc, header_footer: true) }.to output(%r{normalised identifier in <xref target="_a#b_"/> from :a#b:}).to_stderr
|
2080
|
+
end
|
2081
|
+
|
2082
|
+
it "moves title footnotes to bibdata" do
|
2083
|
+
input = <<~INPUT
|
2084
|
+
= Document title footnote:[ABC] footnote:[DEF]
|
2085
|
+
Author
|
2086
|
+
:docfile: test.adoc
|
2087
|
+
:nodoc:
|
2088
|
+
:novalid:
|
2089
|
+
:no-isobib:
|
2090
|
+
|
2091
|
+
INPUT
|
2092
|
+
expect(xmlpp(Asciidoctor.convert(input, backend: :standoc, header_footer: true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2093
|
+
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
2094
|
+
<bibdata type='standard'>
|
2095
|
+
<title language='en' format='text/plain'>Document title</title>
|
2096
|
+
<note type='title-footnote'>
|
2097
|
+
<p>ABC</p>
|
2098
|
+
</note>
|
2099
|
+
<note type='title-footnote'>
|
2100
|
+
<p>DEF</p>
|
2101
|
+
</note>
|
2102
|
+
<language>en</language>
|
2103
|
+
<script>Latn</script>
|
2104
|
+
<status>
|
2105
|
+
<stage>published</stage>
|
2106
|
+
</status>
|
2107
|
+
<copyright>
|
2108
|
+
<from>#{Time.now.year}</from>
|
2109
|
+
</copyright>
|
2110
|
+
<ext>
|
2111
|
+
<doctype>article</doctype>
|
2112
|
+
</ext>
|
2113
|
+
</bibdata>
|
2114
|
+
<sections> </sections>
|
2115
|
+
</standard-document>
|
2116
|
+
OUTPUT
|
2117
|
+
end
|
2118
|
+
|
2119
|
+
it "converts UnitsML to MathML" do
|
2120
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~INPUT, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2121
|
+
= Document title
|
2122
|
+
Author
|
2123
|
+
:stem:
|
2124
|
+
|
2125
|
+
[stem]
|
2126
|
+
++++
|
2127
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2128
|
+
<mrow>
|
2129
|
+
<mn>7</mn>
|
2130
|
+
<mtext>unitsml(m*kg^-2)</mtext>
|
2131
|
+
<mo>+</mo>
|
2132
|
+
<mn>8</mn>
|
2133
|
+
<mtext>unitsml(m*kg^-2)</mtext>
|
2134
|
+
</mrow>
|
2135
|
+
</math>
|
2136
|
+
++++
|
2137
|
+
INPUT
|
2138
|
+
#{BLANK_HDR}
|
2139
|
+
<misc-container>
|
2140
|
+
<UnitsML xmlns='https://schema.unitsml.org/unitsml/1.0'>
|
2141
|
+
<UnitSet>
|
2142
|
+
<Unit xml:id='U_m.kg-2' dimensionURL='#D_LM-2'>
|
2143
|
+
<UnitSystem name='SI' type='SI_derived' xml:lang='en-US'/>
|
2144
|
+
<UnitName xml:lang='en'>m*kg^-2</UnitName>
|
2145
|
+
<UnitSymbol type='HTML'>
|
2146
|
+
m kg
|
2147
|
+
<sup>−2</sup>
|
2148
|
+
</UnitSymbol>
|
2149
|
+
<UnitSymbol type='MathML'>
|
2150
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2151
|
+
<mrow>
|
2152
|
+
<mi mathvariant='normal'>m</mi>
|
2153
|
+
<mo rspace='thickmathspace'>⁢</mo>
|
2154
|
+
<msup>
|
2155
|
+
<mrow>
|
2156
|
+
<mi mathvariant='normal'>kg</mi>
|
2157
|
+
</mrow>
|
2158
|
+
<mrow>
|
2159
|
+
<mo>−</mo>
|
2160
|
+
<mn>2</mn>
|
2161
|
+
</mrow>
|
2162
|
+
</msup>
|
2163
|
+
</mrow>
|
2164
|
+
</math>
|
2165
|
+
</UnitSymbol>
|
2166
|
+
<RootUnits>
|
2167
|
+
<EnumeratedRootUnit unit='meter'/>
|
2168
|
+
<EnumeratedRootUnit unit='gram' prefix='k' powerNumerator='-2'/>
|
2169
|
+
</RootUnits>
|
2170
|
+
</Unit>
|
2171
|
+
</UnitSet>
|
2172
|
+
<DimensionSet>
|
2173
|
+
<Dimension xml:id='D_LM-2'>
|
2174
|
+
<Length symbol='L' powerNumerator='1'/>
|
2175
|
+
<Mass symbol='M' powerNumerator='-2'/>
|
2176
|
+
</Dimension>
|
2177
|
+
</DimensionSet>
|
2178
|
+
<PrefixSet>
|
2179
|
+
<Prefix prefixBase='10' prefixPower='3' xml:id='NISTp10_3'>
|
2180
|
+
<PrefixName xml:lang='en'>kilo</PrefixName>
|
2181
|
+
<PrefixSymbol type='ASCII'>k</PrefixSymbol>
|
2182
|
+
<PrefixSymbol type='unicode'>k</PrefixSymbol>
|
2183
|
+
<PrefixSymbol type='LaTeX'>k</PrefixSymbol>
|
2184
|
+
<PrefixSymbol type='HTML'>k</PrefixSymbol>
|
2185
|
+
</Prefix>
|
2186
|
+
</PrefixSet>
|
2187
|
+
</UnitsML>
|
2188
|
+
</misc-container>
|
2189
|
+
<sections>
|
2190
|
+
<formula id='_'>
|
2191
|
+
<stem type='MathML'>
|
2192
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2193
|
+
<mrow>
|
2194
|
+
<mn>7</mn>
|
2195
|
+
<mo rspace='thickmathspace'>⁢</mo>
|
2196
|
+
<mrow xref='U_m.kg-2'>
|
2197
|
+
<mi mathvariant='normal'>m</mi>
|
2198
|
+
<mo rspace='thickmathspace'>⁢</mo>
|
2199
|
+
<msup>
|
2200
|
+
<mrow>
|
2201
|
+
<mi mathvariant='normal'>kg</mi>
|
2202
|
+
</mrow>
|
2203
|
+
<mrow>
|
2204
|
+
<mo>−</mo>
|
2205
|
+
<mn>2</mn>
|
2206
|
+
</mrow>
|
2207
|
+
</msup>
|
2163
2208
|
</mrow>
|
2164
|
-
<
|
2165
|
-
|
2166
|
-
|
2209
|
+
<mo>+</mo>
|
2210
|
+
<mn>8</mn>
|
2211
|
+
<mo rspace='thickmathspace'>⁢</mo>
|
2212
|
+
<mrow xref='U_m.kg-2'>
|
2213
|
+
<mi mathvariant='normal'>m</mi>
|
2214
|
+
<mo rspace='thickmathspace'>⁢</mo>
|
2215
|
+
<msup>
|
2216
|
+
<mrow>
|
2217
|
+
<mi mathvariant='normal'>kg</mi>
|
2218
|
+
</mrow>
|
2219
|
+
<mrow>
|
2220
|
+
<mo>−</mo>
|
2221
|
+
<mn>2</mn>
|
2222
|
+
</mrow>
|
2223
|
+
</msup>
|
2167
2224
|
</mrow>
|
2168
|
-
</msup>
|
2169
|
-
</mrow>
|
2170
|
-
</math>
|
2171
|
-
</UnitSymbol>
|
2172
|
-
<RootUnits>
|
2173
|
-
<EnumeratedRootUnit unit='meter'/>
|
2174
|
-
<EnumeratedRootUnit unit='gram' prefix='k' powerNumerator='-2'/>
|
2175
|
-
</RootUnits>
|
2176
|
-
</Unit>
|
2177
|
-
</UnitSet>
|
2178
|
-
<DimensionSet>
|
2179
|
-
<Dimension xml:id='D_LM-2'>
|
2180
|
-
<Length symbol='L' powerNumerator='1'/>
|
2181
|
-
<Mass symbol='M' powerNumerator='-2'/>
|
2182
|
-
</Dimension>
|
2183
|
-
</DimensionSet>
|
2184
|
-
<PrefixSet>
|
2185
|
-
<Prefix prefixBase='10' prefixPower='3' xml:id='NISTp10_3'>
|
2186
|
-
<PrefixName xml:lang='en'>kilo</PrefixName>
|
2187
|
-
<PrefixSymbol type='ASCII'>k</PrefixSymbol>
|
2188
|
-
<PrefixSymbol type='unicode'>k</PrefixSymbol>
|
2189
|
-
<PrefixSymbol type='LaTeX'>k</PrefixSymbol>
|
2190
|
-
<PrefixSymbol type='HTML'>k</PrefixSymbol>
|
2191
|
-
</Prefix>
|
2192
|
-
</PrefixSet>
|
2193
|
-
</UnitsML>
|
2194
|
-
</misc-container>
|
2195
|
-
<sections>
|
2196
|
-
<formula id='_'>
|
2197
|
-
<stem type='MathML'>
|
2198
|
-
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2199
|
-
<mrow>
|
2200
|
-
<mn>7</mn>
|
2201
|
-
<mo rspace='thickmathspace'>⁢</mo>
|
2202
|
-
<mrow xref='U_m.kg-2'>
|
2203
|
-
<mi mathvariant='normal'>m</mi>
|
2204
|
-
<mo rspace='thickmathspace'>⁢</mo>
|
2205
|
-
<msup>
|
2206
|
-
<mrow>
|
2207
|
-
<mi mathvariant='normal'>kg</mi>
|
2208
|
-
</mrow>
|
2209
|
-
<mrow>
|
2210
|
-
<mo>−</mo>
|
2211
|
-
<mn>2</mn>
|
2212
|
-
</mrow>
|
2213
|
-
</msup>
|
2214
|
-
</mrow>
|
2215
|
-
<mo>+</mo>
|
2216
|
-
<mn>8</mn>
|
2217
|
-
<mo rspace='thickmathspace'>⁢</mo>
|
2218
|
-
<mrow xref='U_m.kg-2'>
|
2219
|
-
<mi mathvariant='normal'>m</mi>
|
2220
|
-
<mo rspace='thickmathspace'>⁢</mo>
|
2221
|
-
<msup>
|
2222
|
-
<mrow>
|
2223
|
-
<mi mathvariant='normal'>kg</mi>
|
2224
2225
|
</mrow>
|
2225
|
-
|
2226
|
-
|
2227
|
-
|
2228
|
-
|
2229
|
-
|
2230
|
-
|
2231
|
-
|
2232
|
-
</math>
|
2233
|
-
</stem>
|
2234
|
-
</formula>
|
2235
|
-
</sections>
|
2236
|
-
</standard-document>
|
2237
|
-
OUTPUT
|
2226
|
+
</math>
|
2227
|
+
</stem>
|
2228
|
+
</formula>
|
2229
|
+
</sections>
|
2230
|
+
</standard-document>
|
2231
|
+
OUTPUT
|
2232
|
+
end
|
2238
2233
|
|
2239
|
-
|
2234
|
+
it "customises italicisation of MathML" do
|
2235
|
+
input = <<~INPUT
|
2236
|
+
= Document title
|
2237
|
+
Author
|
2238
|
+
:stem:
|
2239
|
+
|
2240
|
+
[stem]
|
2241
|
+
++++
|
2242
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2243
|
+
<mi>A</mi>
|
2244
|
+
<mo>+</mo>
|
2245
|
+
<mi>a</mi>
|
2246
|
+
<mo>+</mo>
|
2247
|
+
<mi>Α</mi>
|
2248
|
+
<mo>+</mo>
|
2249
|
+
<mi>α</mi>
|
2250
|
+
<mo>+</mo>
|
2251
|
+
<mi>AB</mi>
|
2252
|
+
<mstyle mathvariant="italic">
|
2253
|
+
<mrow>
|
2254
|
+
<mi>Α</mi>
|
2255
|
+
</mrow>
|
2256
|
+
</mstyle>
|
2257
|
+
</math>
|
2258
|
+
++++
|
2259
|
+
INPUT
|
2240
2260
|
|
2241
|
-
|
2242
|
-
|
2243
|
-
|
2244
|
-
|
2245
|
-
|
2246
|
-
|
2247
|
-
|
2248
|
-
|
2249
|
-
<
|
2250
|
-
|
2251
|
-
|
2252
|
-
|
2253
|
-
|
2254
|
-
|
2255
|
-
|
2256
|
-
|
2257
|
-
|
2258
|
-
<mi>AB</mi>
|
2259
|
-
<mstyle mathvariant="italic">
|
2260
|
-
<mrow>
|
2261
|
-
<mi>Α</mi>
|
2262
|
-
</mrow>
|
2263
|
-
</mstyle>
|
2264
|
-
</math>
|
2265
|
-
++++
|
2266
|
-
INPUT
|
2267
|
-
|
2268
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2269
|
-
#{BLANK_HDR}
|
2270
|
-
<sections>
|
2271
|
-
<formula id='_'>
|
2272
|
-
<stem type='MathML'>
|
2273
|
-
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2274
|
-
<mi>A</mi>
|
2275
|
-
<mo>+</mo>
|
2276
|
-
<mi>a</mi>
|
2277
|
-
<mo>+</mo>
|
2261
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2262
|
+
#{BLANK_HDR}
|
2263
|
+
<sections>
|
2264
|
+
<formula id='_'>
|
2265
|
+
<stem type='MathML'>
|
2266
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2267
|
+
<mi>A</mi>
|
2268
|
+
<mo>+</mo>
|
2269
|
+
<mi>a</mi>
|
2270
|
+
<mo>+</mo>
|
2271
|
+
<mi>Α</mi>
|
2272
|
+
<mo>+</mo>
|
2273
|
+
<mi>α</mi>
|
2274
|
+
<mo>+</mo>
|
2275
|
+
<mi>AB</mi>
|
2276
|
+
<mstyle mathvariant='italic'>
|
2277
|
+
<mrow>
|
2278
2278
|
<mi>Α</mi>
|
2279
|
-
|
2280
|
-
|
2281
|
-
|
2282
|
-
|
2283
|
-
|
2284
|
-
|
2285
|
-
|
2286
|
-
|
2287
|
-
|
2288
|
-
|
2289
|
-
|
2290
|
-
|
2291
|
-
|
2292
|
-
|
2293
|
-
|
2294
|
-
|
2295
|
-
|
2296
|
-
|
2297
|
-
|
2298
|
-
|
2299
|
-
|
2300
|
-
|
2301
|
-
|
2302
|
-
|
2303
|
-
|
2304
|
-
|
2305
|
-
<mi mathvariant="normal">Α</mi>
|
2306
|
-
<mo>+</mo>
|
2307
|
-
<mi>α</mi>
|
2308
|
-
<mo>+</mo>
|
2309
|
-
<mi>AB</mi>
|
2310
|
-
<mstyle mathvariant='italic'>
|
2311
|
-
<mrow>
|
2312
|
-
<mi>Α</mi>
|
2313
|
-
</mrow>
|
2314
|
-
</mstyle>
|
2315
|
-
</math>
|
2316
|
-
</stem>
|
2317
|
-
</formula>
|
2318
|
-
</sections>
|
2319
|
-
</standard-document>
|
2320
|
-
OUTPUT
|
2321
|
-
mock_mathml_italicise({ uppergreek: true, upperroman: false, lowergreek: true, lowerroman: true })
|
2322
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2323
|
-
#{BLANK_HDR}
|
2324
|
-
<sections>
|
2325
|
-
<formula id='_'>
|
2326
|
-
<stem type='MathML'>
|
2327
|
-
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2328
|
-
<mi mathvariant="normal">A</mi>
|
2329
|
-
<mo>+</mo>
|
2330
|
-
<mi>a</mi>
|
2331
|
-
<mo>+</mo>
|
2279
|
+
</mrow>
|
2280
|
+
</mstyle>
|
2281
|
+
</math>
|
2282
|
+
</stem>
|
2283
|
+
</formula>
|
2284
|
+
</sections>
|
2285
|
+
</standard-document>
|
2286
|
+
OUTPUT
|
2287
|
+
mock_mathml_italicise({ uppergreek: false, upperroman: true, lowergreek: true, lowerroman: true })
|
2288
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2289
|
+
#{BLANK_HDR}
|
2290
|
+
<sections>
|
2291
|
+
<formula id='_'>
|
2292
|
+
<stem type='MathML'>
|
2293
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2294
|
+
<mi>A</mi>
|
2295
|
+
<mo>+</mo>
|
2296
|
+
<mi>a</mi>
|
2297
|
+
<mo>+</mo>
|
2298
|
+
<mi mathvariant="normal">Α</mi>
|
2299
|
+
<mo>+</mo>
|
2300
|
+
<mi>α</mi>
|
2301
|
+
<mo>+</mo>
|
2302
|
+
<mi>AB</mi>
|
2303
|
+
<mstyle mathvariant='italic'>
|
2304
|
+
<mrow>
|
2332
2305
|
<mi>Α</mi>
|
2333
|
-
|
2334
|
-
|
2335
|
-
|
2336
|
-
|
2337
|
-
|
2338
|
-
|
2339
|
-
|
2340
|
-
|
2341
|
-
|
2342
|
-
|
2343
|
-
|
2344
|
-
|
2345
|
-
|
2346
|
-
|
2347
|
-
|
2348
|
-
|
2349
|
-
|
2350
|
-
|
2351
|
-
|
2352
|
-
|
2353
|
-
|
2354
|
-
|
2355
|
-
|
2356
|
-
|
2357
|
-
|
2358
|
-
|
2306
|
+
</mrow>
|
2307
|
+
</mstyle>
|
2308
|
+
</math>
|
2309
|
+
</stem>
|
2310
|
+
</formula>
|
2311
|
+
</sections>
|
2312
|
+
</standard-document>
|
2313
|
+
OUTPUT
|
2314
|
+
mock_mathml_italicise({ uppergreek: true, upperroman: false, lowergreek: true, lowerroman: true })
|
2315
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2316
|
+
#{BLANK_HDR}
|
2317
|
+
<sections>
|
2318
|
+
<formula id='_'>
|
2319
|
+
<stem type='MathML'>
|
2320
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2321
|
+
<mi mathvariant="normal">A</mi>
|
2322
|
+
<mo>+</mo>
|
2323
|
+
<mi>a</mi>
|
2324
|
+
<mo>+</mo>
|
2325
|
+
<mi>Α</mi>
|
2326
|
+
<mo>+</mo>
|
2327
|
+
<mi>α</mi>
|
2328
|
+
<mo>+</mo>
|
2329
|
+
<mi>AB</mi>
|
2330
|
+
<mstyle mathvariant='italic'>
|
2331
|
+
<mrow>
|
2359
2332
|
<mi>Α</mi>
|
2360
|
-
|
2361
|
-
|
2362
|
-
|
2363
|
-
|
2364
|
-
|
2365
|
-
|
2366
|
-
|
2367
|
-
|
2368
|
-
|
2369
|
-
|
2370
|
-
|
2371
|
-
|
2372
|
-
|
2373
|
-
|
2374
|
-
|
2375
|
-
|
2376
|
-
|
2377
|
-
|
2378
|
-
|
2379
|
-
|
2380
|
-
|
2381
|
-
|
2382
|
-
|
2383
|
-
|
2384
|
-
|
2385
|
-
|
2333
|
+
</mrow>
|
2334
|
+
</mstyle>
|
2335
|
+
</math>
|
2336
|
+
</stem>
|
2337
|
+
</formula>
|
2338
|
+
</sections>
|
2339
|
+
</standard-document>
|
2340
|
+
OUTPUT
|
2341
|
+
mock_mathml_italicise({ uppergreek: true, upperroman: true, lowergreek: false, lowerroman: true })
|
2342
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2343
|
+
#{BLANK_HDR}
|
2344
|
+
<sections>
|
2345
|
+
<formula id='_'>
|
2346
|
+
<stem type='MathML'>
|
2347
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2348
|
+
<mi>A</mi>
|
2349
|
+
<mo>+</mo>
|
2350
|
+
<mi>a</mi>
|
2351
|
+
<mo>+</mo>
|
2352
|
+
<mi>Α</mi>
|
2353
|
+
<mo>+</mo>
|
2354
|
+
<mi mathvariant="normal">α</mi>
|
2355
|
+
<mo>+</mo>
|
2356
|
+
<mi>AB</mi>
|
2357
|
+
<mstyle mathvariant='italic'>
|
2358
|
+
<mrow>
|
2386
2359
|
<mi>Α</mi>
|
2387
|
-
|
2388
|
-
|
2389
|
-
|
2390
|
-
|
2391
|
-
|
2392
|
-
|
2393
|
-
|
2394
|
-
|
2395
|
-
|
2396
|
-
|
2397
|
-
|
2398
|
-
|
2399
|
-
|
2400
|
-
|
2401
|
-
|
2402
|
-
|
2403
|
-
|
2404
|
-
|
2405
|
-
|
2360
|
+
</mrow>
|
2361
|
+
</mstyle>
|
2362
|
+
</math>
|
2363
|
+
</stem>
|
2364
|
+
</formula>
|
2365
|
+
</sections>
|
2366
|
+
</standard-document>
|
2367
|
+
OUTPUT
|
2368
|
+
mock_mathml_italicise({ uppergreek: true, upperroman: true, lowergreek: true, lowerroman: false })
|
2369
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2370
|
+
#{BLANK_HDR}
|
2371
|
+
<sections>
|
2372
|
+
<formula id='_'>
|
2373
|
+
<stem type='MathML'>
|
2374
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2375
|
+
<mi>A</mi>
|
2376
|
+
<mo>+</mo>
|
2377
|
+
<mi mathvariant="normal">a</mi>
|
2378
|
+
<mo>+</mo>
|
2379
|
+
<mi>Α</mi>
|
2380
|
+
<mo>+</mo>
|
2381
|
+
<mi>α</mi>
|
2382
|
+
<mo>+</mo>
|
2383
|
+
<mi>AB</mi>
|
2384
|
+
<mstyle mathvariant='italic'>
|
2385
|
+
<mrow>
|
2386
|
+
<mi>Α</mi>
|
2387
|
+
</mrow>
|
2388
|
+
</mstyle>
|
2389
|
+
</math>
|
2390
|
+
</stem>
|
2391
|
+
</formula>
|
2392
|
+
</sections>
|
2393
|
+
</standard-document>
|
2394
|
+
OUTPUT
|
2395
|
+
mock_mathml_italicise({ uppergreek: true, upperroman: true, lowergreek: true, lowerroman: true })
|
2396
|
+
end
|
2406
2397
|
|
2407
2398
|
it "process express_ref macro with existing bibliography" do
|
2408
2399
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
@@ -2425,48 +2416,47 @@ end
|
|
2425
2416
|
== Bibliography
|
2426
2417
|
* [[[D,E]]] F
|
2427
2418
|
INPUT
|
2428
|
-
|
2429
|
-
|
2430
|
-
|
2431
|
-
|
2432
|
-
|
2433
|
-
|
2434
|
-
|
2435
|
-
|
2436
|
-
|
2437
|
-
|
2438
|
-
|
2439
|
-
|
2440
|
-
|
2441
|
-
<xref target='action'>** Missing target action.AB</xref>
|
2442
|
-
|
2443
|
-
|
2444
|
-
|
2445
|
-
|
2446
|
-
|
2447
|
-
|
2448
|
-
|
2449
|
-
</clause>
|
2450
|
-
|
2451
|
-
|
2452
|
-
|
2453
|
-
|
2454
|
-
|
2455
|
-
|
2456
|
-
|
2457
|
-
|
2458
|
-
|
2459
|
-
|
2460
|
-
|
2461
|
-
|
2462
|
-
|
2463
|
-
|
2464
|
-
|
2465
|
-
</standard-document>
|
2419
|
+
#{BLANK_HDR}
|
2420
|
+
<sections>
|
2421
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
2422
|
+
<title>Clause</title>
|
2423
|
+
<p id='_'>
|
2424
|
+
<eref bibitemid='uml_A' citeas="">
|
2425
|
+
<localityStack>
|
2426
|
+
<locality type='anchor'><referenceFrom>A.B.C</referenceFrom></locality>
|
2427
|
+
</localityStack>
|
2428
|
+
C
|
2429
|
+
</eref>
|
2430
|
+
<eref bibitemid='uml_A' citeas=""/>
|
2431
|
+
<xref target='action.AA'>AA</xref>
|
2432
|
+
<xref target='action'>** Missing target action.AB</xref>
|
2433
|
+
</p>
|
2434
|
+
</clause>
|
2435
|
+
<clause id='action' type='express-schema' inline-header='false' obligation='normative'>
|
2436
|
+
<title>Action</title>
|
2437
|
+
<clause id='action.AA' inline-header='false' obligation='normative'>
|
2438
|
+
<title>AA</title>
|
2439
|
+
</clause>
|
2440
|
+
</clause>
|
2441
|
+
</sections>
|
2442
|
+
<bibliography>
|
2443
|
+
<references id='_' normative='false' obligation='informative'>
|
2444
|
+
<title>Bibliography</title>
|
2445
|
+
<bibitem id='D'>
|
2446
|
+
<formattedref format='application/x-isodoc+xml'>F</formattedref>
|
2447
|
+
<docidentifier>E</docidentifier>
|
2448
|
+
</bibitem>
|
2449
|
+
</references>
|
2450
|
+
<references hidden='true' normative='false'>
|
2451
|
+
<bibitem id='uml_A' type='internal'>
|
2452
|
+
<docidentifier type='repository'>uml/A</docidentifier>
|
2453
|
+
</bibitem>
|
2454
|
+
</references>
|
2455
|
+
</bibliography>
|
2456
|
+
</standard-document>
|
2466
2457
|
OUTPUT
|
2467
2458
|
end
|
2468
2459
|
|
2469
|
-
|
2470
2460
|
it "process express_ref macro with no existing bibliography" do
|
2471
2461
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2472
2462
|
#{ASCIIDOC_BLANK_HDR}
|
@@ -2482,159 +2472,156 @@ end
|
|
2482
2472
|
<<express-schema:B>>
|
2483
2473
|
<<express-schema:B1>>
|
2484
2474
|
INPUT
|
2485
|
-
|
2486
|
-
|
2487
|
-
|
2488
|
-
|
2489
|
-
|
2490
|
-
|
2491
|
-
|
2492
|
-
|
2493
|
-
|
2494
|
-
|
2495
|
-
|
2496
|
-
|
2497
|
-
|
2498
|
-
|
2499
|
-
|
2500
|
-
|
2501
|
-
|
2502
|
-
|
2503
|
-
|
2504
|
-
|
2505
|
-
|
2506
|
-
|
2507
|
-
|
2508
|
-
|
2509
|
-
|
2510
|
-
|
2511
|
-
|
2512
|
-
|
2513
|
-
|
2514
|
-
</standard-document>
|
2475
|
+
#{BLANK_HDR}
|
2476
|
+
<sections>
|
2477
|
+
<clause id='B' type='express-schema' inline-header='false' obligation='normative'>
|
2478
|
+
<title>Clause</title>
|
2479
|
+
<note id='B1'>
|
2480
|
+
<p id='_'>X</p>
|
2481
|
+
</note>
|
2482
|
+
<p id='_'>
|
2483
|
+
<eref bibitemid='express-schema_A' citeas=''>
|
2484
|
+
<localityStack>
|
2485
|
+
<locality type='anchor'>
|
2486
|
+
<referenceFrom>A.B.C</referenceFrom>
|
2487
|
+
</locality>
|
2488
|
+
</localityStack>
|
2489
|
+
C
|
2490
|
+
</eref>
|
2491
|
+
<eref bibitemid='express-schema_A' citeas=''/>
|
2492
|
+
<xref target='B'/>
|
2493
|
+
<xref target='B1'/>
|
2494
|
+
</p>
|
2495
|
+
</clause>
|
2496
|
+
</sections>
|
2497
|
+
<bibliography>
|
2498
|
+
<references hidden='true' normative='false'>
|
2499
|
+
<bibitem id='express-schema_A' type='internal'>
|
2500
|
+
<docidentifier type='repository'>express-schema/A</docidentifier>
|
2501
|
+
</bibitem>
|
2502
|
+
</references>
|
2503
|
+
</bibliography>
|
2504
|
+
</standard-document>
|
2515
2505
|
OUTPUT
|
2516
2506
|
end
|
2517
2507
|
|
2518
|
-
|
2519
2508
|
private
|
2520
2509
|
|
2521
2510
|
def mock_mathml_italicise(x)
|
2522
|
-
|
2511
|
+
allow_any_instance_of(::Asciidoctor::Standoc::Cleanup).to receive(:mathml_mi_italics).and_return(x)
|
2523
2512
|
end
|
2524
2513
|
|
2525
|
-
|
2526
|
-
|
2527
|
-
expect(Iecbib::IecBibliography).to receive(:get).with("IEC 60050-103", nil, {keep_year: true}) do
|
2514
|
+
def mock_iecbib_get_iec60050_103_01
|
2515
|
+
expect(Iecbib::IecBibliography).to receive(:get).with("IEC 60050-103", nil, { keep_year: true }) do
|
2528
2516
|
IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
|
2529
|
-
|
2530
|
-
|
2531
|
-
|
2532
|
-
|
2533
|
-
|
2534
|
-
|
2535
|
-
|
2536
|
-
|
2537
|
-
<organization>
|
2538
|
-
<name>International Electrotechnical Commission</name>
|
2539
|
-
<abbreviation>IEC</abbreviation>
|
2540
|
-
<uri>www.iec.ch</uri>
|
2541
|
-
</organization>
|
2542
|
-
</contributor>
|
2543
|
-
<language>en</language>
|
2544
|
-
<language>fr</language>
|
2545
|
-
<script>Latn</script>
|
2546
|
-
<status>
|
2547
|
-
<stage>60</stage>
|
2548
|
-
</status>
|
2549
|
-
<copyright>
|
2550
|
-
<from>2018</from>
|
2551
|
-
<owner>
|
2517
|
+
<bibitem type="standard" id="IEC60050-103">
|
2518
|
+
<title format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary</title>
|
2519
|
+
<docidentifier>IEC 60050-103:2009</docidentifier>
|
2520
|
+
<date type="published">
|
2521
|
+
<on>2009</on>
|
2522
|
+
</date>
|
2523
|
+
<contributor>
|
2524
|
+
<role type="publisher"/>
|
2552
2525
|
<organization>
|
2553
2526
|
<name>International Electrotechnical Commission</name>
|
2554
2527
|
<abbreviation>IEC</abbreviation>
|
2555
2528
|
<uri>www.iec.ch</uri>
|
2556
2529
|
</organization>
|
2557
|
-
</
|
2558
|
-
|
2559
|
-
|
2560
|
-
|
2530
|
+
</contributor>
|
2531
|
+
<language>en</language>
|
2532
|
+
<language>fr</language>
|
2533
|
+
<script>Latn</script>
|
2534
|
+
<status>
|
2535
|
+
<stage>60</stage>
|
2536
|
+
</status>
|
2537
|
+
<copyright>
|
2538
|
+
<from>2018</from>
|
2539
|
+
<owner>
|
2540
|
+
<organization>
|
2541
|
+
<name>International Electrotechnical Commission</name>
|
2542
|
+
<abbreviation>IEC</abbreviation>
|
2543
|
+
<uri>www.iec.ch</uri>
|
2544
|
+
</organization>
|
2545
|
+
</owner>
|
2546
|
+
</copyright>
|
2547
|
+
</bibitem>
|
2548
|
+
OUTPUT
|
2561
2549
|
end
|
2562
|
-
end
|
2550
|
+
end
|
2563
2551
|
|
2564
|
-
|
2565
|
-
|
2552
|
+
def mock_iecbib_get_iec60050_102_01
|
2553
|
+
expect(Iecbib::IecBibliography).to receive(:get).with("IEC 60050-102", nil, { keep_year: true }) do
|
2566
2554
|
IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
|
2567
|
-
|
2568
|
-
|
2569
|
-
|
2570
|
-
|
2571
|
-
|
2572
|
-
|
2573
|
-
|
2574
|
-
|
2575
|
-
<organization>
|
2576
|
-
<name>International Electrotechnical Commission</name>
|
2577
|
-
<abbreviation>IEC</abbreviation>
|
2578
|
-
<uri>www.iec.ch</uri>
|
2579
|
-
</organization>
|
2580
|
-
</contributor>
|
2581
|
-
<language>en</language>
|
2582
|
-
<language>fr</language>
|
2583
|
-
<script>Latn</script>
|
2584
|
-
<status>
|
2585
|
-
<stage>60</stage>
|
2586
|
-
</status>
|
2587
|
-
<copyright>
|
2588
|
-
<from>2018</from>
|
2589
|
-
<owner>
|
2555
|
+
<bibitem type="standard" id="IEC60050-102">
|
2556
|
+
<title format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary</title>
|
2557
|
+
<docidentifier>IEC 60050-102:2007</docidentifier>
|
2558
|
+
<date type="published">
|
2559
|
+
<on>2007</on>
|
2560
|
+
</date>
|
2561
|
+
<contributor>
|
2562
|
+
<role type="publisher"/>
|
2590
2563
|
<organization>
|
2591
2564
|
<name>International Electrotechnical Commission</name>
|
2592
2565
|
<abbreviation>IEC</abbreviation>
|
2593
2566
|
<uri>www.iec.ch</uri>
|
2594
2567
|
</organization>
|
2595
|
-
</
|
2596
|
-
|
2597
|
-
|
2598
|
-
|
2568
|
+
</contributor>
|
2569
|
+
<language>en</language>
|
2570
|
+
<language>fr</language>
|
2571
|
+
<script>Latn</script>
|
2572
|
+
<status>
|
2573
|
+
<stage>60</stage>
|
2574
|
+
</status>
|
2575
|
+
<copyright>
|
2576
|
+
<from>2018</from>
|
2577
|
+
<owner>
|
2578
|
+
<organization>
|
2579
|
+
<name>International Electrotechnical Commission</name>
|
2580
|
+
<abbreviation>IEC</abbreviation>
|
2581
|
+
<uri>www.iec.ch</uri>
|
2582
|
+
</organization>
|
2583
|
+
</owner>
|
2584
|
+
</copyright>
|
2585
|
+
</bibitem>
|
2586
|
+
OUTPUT
|
2599
2587
|
end
|
2600
|
-
end
|
2588
|
+
end
|
2601
2589
|
|
2602
|
-
|
2603
|
-
|
2590
|
+
def mock_iev
|
2591
|
+
expect(Iecbib::IecBibliography).to receive(:get).with("IEV", nil, {}) do
|
2604
2592
|
IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
|
2605
|
-
|
2606
|
-
|
2607
|
-
|
2608
|
-
|
2609
|
-
|
2610
|
-
|
2611
|
-
|
2612
|
-
|
2613
|
-
<organization>
|
2614
|
-
<name>International Electrotechnical Commission</name>
|
2615
|
-
<abbreviation>IEC</abbreviation>
|
2616
|
-
<uri>www.iec.ch</uri>
|
2617
|
-
</organization>
|
2618
|
-
</contributor>
|
2619
|
-
<language>en</language>
|
2620
|
-
<language>fr</language>
|
2621
|
-
<script>Latn</script>
|
2622
|
-
<status>
|
2623
|
-
<stage>60</stage>
|
2624
|
-
</status>
|
2625
|
-
<copyright>
|
2626
|
-
<from>2018</from>
|
2627
|
-
<owner>
|
2593
|
+
<bibitem type="standard" id="IEC60050:2001">
|
2594
|
+
<title format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary</title>
|
2595
|
+
<docidentifier>IEC 60050:2011</docidentifier>
|
2596
|
+
<date type="published">
|
2597
|
+
<on>2007</on>
|
2598
|
+
</date>
|
2599
|
+
<contributor>
|
2600
|
+
<role type="publisher"/>
|
2628
2601
|
<organization>
|
2629
2602
|
<name>International Electrotechnical Commission</name>
|
2630
2603
|
<abbreviation>IEC</abbreviation>
|
2631
2604
|
<uri>www.iec.ch</uri>
|
2632
2605
|
</organization>
|
2633
|
-
</
|
2634
|
-
|
2635
|
-
|
2636
|
-
|
2606
|
+
</contributor>
|
2607
|
+
<language>en</language>
|
2608
|
+
<language>fr</language>
|
2609
|
+
<script>Latn</script>
|
2610
|
+
<status>
|
2611
|
+
<stage>60</stage>
|
2612
|
+
</status>
|
2613
|
+
<copyright>
|
2614
|
+
<from>2018</from>
|
2615
|
+
<owner>
|
2616
|
+
<organization>
|
2617
|
+
<name>International Electrotechnical Commission</name>
|
2618
|
+
<abbreviation>IEC</abbreviation>
|
2619
|
+
<uri>www.iec.ch</uri>
|
2620
|
+
</organization>
|
2621
|
+
</owner>
|
2622
|
+
</copyright>
|
2623
|
+
</bibitem>
|
2624
|
+
OUTPUT
|
2637
2625
|
end.at_least :once
|
2638
|
-
end
|
2639
|
-
|
2626
|
+
end
|
2640
2627
|
end
|