metanorma-standoc 2.6.2 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +6 -4
- data/lib/metanorma/standoc/anchor.rb +112 -0
- data/lib/metanorma/standoc/basicdoc.rng +38 -35
- data/lib/metanorma/standoc/biblio.rng +9 -0
- data/lib/metanorma/standoc/blocks.rb +2 -48
- data/lib/metanorma/standoc/blocks_image.rb +52 -0
- data/lib/metanorma/standoc/cleanup.rb +1 -2
- data/lib/metanorma/standoc/cleanup_text.rb +7 -7
- data/lib/metanorma/standoc/cleanup_toc.rb +1 -2
- data/lib/metanorma/standoc/converter.rb +2 -1
- data/lib/metanorma/standoc/front.rb +2 -1
- data/lib/metanorma/standoc/front_contributor.rb +124 -46
- data/lib/metanorma/standoc/inline.rb +19 -114
- data/lib/metanorma/standoc/isodoc.rng +27 -1
- data/lib/metanorma/standoc/macros.rb +2 -1
- data/lib/metanorma/standoc/section.rb +1 -0
- data/lib/metanorma/standoc/utils.rb +9 -5
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +2 -2
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf3149fa25a49d1321ac0d739d2bf4664f3470e1b5eb206c02495359dbc486c4
|
4
|
+
data.tar.gz: 6438c00017b8fb15e3f2b58eaf38853b0f912e92c47c89033054a37965af512c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb8a363500b7fedb8eba90780643a5d29d608403bde76237f346485ae3061026c541e69f7c217dd236fd87b0752eb6bee64881e026c22786eb387ccb39841b1b
|
7
|
+
data.tar.gz: f891e8cb87f09a829c88e567f0874f98ee1982771d8d0e8982d8d1972392bff65c33dfe18a1a2faa8166c1054d4e524b596a5e0f8fef9656b8a0dd245b76189b
|
data/Gemfile
CHANGED
@@ -4,10 +4,12 @@ Encoding.default_internal = Encoding::UTF_8
|
|
4
4
|
source "https://rubygems.org"
|
5
5
|
git_source(:github) { |repo| "https://github.com/#{repo}" }
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
if File.exist? 'Gemfile.devel'
|
10
|
-
eval File.read('Gemfile.devel'), nil, 'Gemfile.devel' # rubocop:disable Security/Eval
|
7
|
+
group :development, :test do
|
8
|
+
gem "rspec"
|
11
9
|
end
|
12
10
|
|
11
|
+
if File.exist? "Gemfile.devel"
|
12
|
+
eval File.read("Gemfile.devel"), nil, "Gemfile.devel" # rubocop:disable Security/Eval
|
13
|
+
end
|
13
14
|
|
15
|
+
gemspec
|
@@ -0,0 +1,112 @@
|
|
1
|
+
require "asciidoctor/extensions"
|
2
|
+
|
3
|
+
module Metanorma
|
4
|
+
module Standoc
|
5
|
+
module Inline
|
6
|
+
def inline_anchor(node)
|
7
|
+
case node.type
|
8
|
+
when :ref then inline_anchor_ref node
|
9
|
+
when :xref then inline_anchor_xref node
|
10
|
+
when :link then inline_anchor_link node
|
11
|
+
when :bibref then inline_anchor_bibref node
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def inline_anchor_ref(node)
|
16
|
+
noko do |xml|
|
17
|
+
xml.bookmark nil, **attr_code(id: node.id)
|
18
|
+
end.join
|
19
|
+
end
|
20
|
+
|
21
|
+
def inline_anchor_xref(node)
|
22
|
+
noko do |xml|
|
23
|
+
attrs = inline_anchor_xref_attrs(node)
|
24
|
+
c = attrs[:text]
|
25
|
+
attrs.delete(:text) unless c.nil?
|
26
|
+
xml.xref **attr_code(attrs) do |x|
|
27
|
+
x << c
|
28
|
+
end
|
29
|
+
end.join
|
30
|
+
end
|
31
|
+
|
32
|
+
def inline_anchor_xref_attrs(node)
|
33
|
+
text = concatenate_attributes_to_xref_text(node)
|
34
|
+
m = inline_anchor_xref_match(text)
|
35
|
+
t = node.target.gsub(/^#/, "").gsub(%r{(\.xml|\.adoc)(#.*$)}, "\\2")
|
36
|
+
m.nil? and return { target: t, type: "inline", text: text }
|
37
|
+
inline_anchor_xref_attrs1(m, t, text)
|
38
|
+
end
|
39
|
+
|
40
|
+
def concatenate_attributes_to_xref_text(node)
|
41
|
+
node.attributes.each_with_object([]) do |(k, v), m|
|
42
|
+
%w(path fragment refid).include?(k) and next
|
43
|
+
m << "#{k}=#{v}%"
|
44
|
+
end.map { |x| x.sub(/%+/, "%") }.join + (node.text || "")
|
45
|
+
end
|
46
|
+
|
47
|
+
def inline_anchor_xref_attrs1(match, target, text)
|
48
|
+
{ target: target, hidden: match[:hidden],
|
49
|
+
type: match[:fn].nil? ? "inline" : "footnote",
|
50
|
+
case: match[:case]&.sub(/%$/, ""),
|
51
|
+
style: match[:style]&.sub(/^style=/, "")&.sub(/%$/, "") || @xrefstyle,
|
52
|
+
droploc: match[:drop].nil? && match[:drop2].nil? ? nil : true,
|
53
|
+
text: inline_anchor_xref_text(match, text) }
|
54
|
+
end
|
55
|
+
|
56
|
+
def inline_anchor_xref_match(text)
|
57
|
+
/^(?:hidden%(?<hidden>[^,]+),?)?
|
58
|
+
(?<style>style=[^%]+%)?
|
59
|
+
(?<drop>droploc%)?(?<case>capital%|lowercase%)?(?<drop2>droploc%)?
|
60
|
+
(?<fn>fn:?\s*)?(?<text>.*)$/x.match text
|
61
|
+
end
|
62
|
+
|
63
|
+
def inline_anchor_xref_text(match, text)
|
64
|
+
if %i[case fn drop drop2 hidden style].any? { |x| !match[x].nil? }
|
65
|
+
match[:text]
|
66
|
+
else text
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def inline_anchor_link(node)
|
71
|
+
contents = node.text
|
72
|
+
contents = "" if node.target.gsub(%r{^mailto:}, "") == node.text
|
73
|
+
attributes = { target: node.target, alt: node.attr("title"),
|
74
|
+
"update-type": node.attr("updatetype") ||
|
75
|
+
node.attr("update-type") }
|
76
|
+
noko do |xml|
|
77
|
+
xml.link **attr_code(attributes) do |l|
|
78
|
+
l << contents
|
79
|
+
end
|
80
|
+
end.join
|
81
|
+
end
|
82
|
+
|
83
|
+
def inline_anchor_bibref(node)
|
84
|
+
eref_contents =
|
85
|
+
@c.decode(node.text || node.target || node.id)
|
86
|
+
&.sub(/^\[?([^\[\]]+?)\]?$/, "[\\1]")
|
87
|
+
@refids << (node.target || node.id)
|
88
|
+
noko do |xml|
|
89
|
+
xml.ref **attr_code(id: node.target || node.id) do |r|
|
90
|
+
r << eref_contents
|
91
|
+
end
|
92
|
+
end.join
|
93
|
+
end
|
94
|
+
|
95
|
+
def inline_callout(node)
|
96
|
+
noko do |xml|
|
97
|
+
xml.callout node.text
|
98
|
+
end.join
|
99
|
+
end
|
100
|
+
|
101
|
+
def inline_footnote(node)
|
102
|
+
@fn_number ||= 0
|
103
|
+
noko do |xml|
|
104
|
+
@fn_number += 1
|
105
|
+
xml.fn reference: @fn_number do |fn|
|
106
|
+
fn.p { |p| p << node.text }
|
107
|
+
end
|
108
|
+
end.join
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
@@ -914,44 +914,47 @@
|
|
914
914
|
-->
|
915
915
|
<define name="image">
|
916
916
|
<element name="image">
|
917
|
-
<
|
918
|
-
|
917
|
+
<ref name="Image"/>
|
918
|
+
</element>
|
919
|
+
</define>
|
920
|
+
<define name="Image">
|
921
|
+
<attribute name="id">
|
922
|
+
<data type="ID"/>
|
923
|
+
</attribute>
|
924
|
+
<attribute name="src">
|
925
|
+
<data type="anyURI"/>
|
926
|
+
</attribute>
|
927
|
+
<attribute name="mimetype"/>
|
928
|
+
<optional>
|
929
|
+
<attribute name="filename"/>
|
930
|
+
</optional>
|
931
|
+
<optional>
|
932
|
+
<attribute name="width">
|
933
|
+
<choice>
|
934
|
+
<data type="int"/>
|
935
|
+
<value>auto</value>
|
936
|
+
</choice>
|
919
937
|
</attribute>
|
920
|
-
|
938
|
+
</optional>
|
939
|
+
<optional>
|
940
|
+
<attribute name="height">
|
941
|
+
<choice>
|
942
|
+
<data type="int"/>
|
943
|
+
<value>auto</value>
|
944
|
+
</choice>
|
945
|
+
</attribute>
|
946
|
+
</optional>
|
947
|
+
<optional>
|
948
|
+
<attribute name="alt"/>
|
949
|
+
</optional>
|
950
|
+
<optional>
|
951
|
+
<attribute name="title"/>
|
952
|
+
</optional>
|
953
|
+
<optional>
|
954
|
+
<attribute name="longdesc">
|
921
955
|
<data type="anyURI"/>
|
922
956
|
</attribute>
|
923
|
-
|
924
|
-
<optional>
|
925
|
-
<attribute name="filename"/>
|
926
|
-
</optional>
|
927
|
-
<optional>
|
928
|
-
<attribute name="width">
|
929
|
-
<choice>
|
930
|
-
<data type="int"/>
|
931
|
-
<value>auto</value>
|
932
|
-
</choice>
|
933
|
-
</attribute>
|
934
|
-
</optional>
|
935
|
-
<optional>
|
936
|
-
<attribute name="height">
|
937
|
-
<choice>
|
938
|
-
<data type="int"/>
|
939
|
-
<value>auto</value>
|
940
|
-
</choice>
|
941
|
-
</attribute>
|
942
|
-
</optional>
|
943
|
-
<optional>
|
944
|
-
<attribute name="alt"/>
|
945
|
-
</optional>
|
946
|
-
<optional>
|
947
|
-
<attribute name="title"/>
|
948
|
-
</optional>
|
949
|
-
<optional>
|
950
|
-
<attribute name="longdesc">
|
951
|
-
<data type="anyURI"/>
|
952
|
-
</attribute>
|
953
|
-
</optional>
|
954
|
-
</element>
|
957
|
+
</optional>
|
955
958
|
</define>
|
956
959
|
<define name="video">
|
957
960
|
<element name="video">
|
@@ -348,6 +348,9 @@
|
|
348
348
|
<zeroOrMore>
|
349
349
|
<ref name="contact"/>
|
350
350
|
</zeroOrMore>
|
351
|
+
<optional>
|
352
|
+
<ref name="logo"/>
|
353
|
+
</optional>
|
351
354
|
</element>
|
352
355
|
</define>
|
353
356
|
<define name="orgname">
|
@@ -366,6 +369,11 @@
|
|
366
369
|
</choice>
|
367
370
|
</element>
|
368
371
|
</define>
|
372
|
+
<define name="logo">
|
373
|
+
<element name="logo">
|
374
|
+
<ref name="image"/>
|
375
|
+
</element>
|
376
|
+
</define>
|
369
377
|
<define name="NameWithVariants">
|
370
378
|
<element name="primary">
|
371
379
|
<ref name="LocalizedString"/>
|
@@ -942,6 +950,7 @@
|
|
942
950
|
<value>obsoleted</value>
|
943
951
|
<value>confirmed</value>
|
944
952
|
<value>updated</value>
|
953
|
+
<value>corrected</value>
|
945
954
|
<value>issued</value>
|
946
955
|
<value>transmitted</value>
|
947
956
|
<value>copied</value>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require "uri" if /^2\./.match?(RUBY_VERSION)
|
2
2
|
require_relative "./blocks_notes"
|
3
|
+
require_relative "./blocks_image"
|
3
4
|
|
4
5
|
module Metanorma
|
5
6
|
module Standoc
|
@@ -93,10 +94,10 @@ module Metanorma
|
|
93
94
|
end
|
94
95
|
|
95
96
|
def example(node)
|
96
|
-
(in_terms? || node.option?("termexample")) and return term_example(node)
|
97
97
|
role = node.role || node.attr("style")
|
98
98
|
ret = example_to_requirement(node, role) ||
|
99
99
|
example_by_role(node, role) and return ret
|
100
|
+
(in_terms? || node.option?("termexample")) and return term_example(node)
|
100
101
|
reqt_subpart?(role) and return requirement_subpart(node)
|
101
102
|
example_proper(node)
|
102
103
|
end
|
@@ -119,25 +120,6 @@ module Metanorma
|
|
119
120
|
@reqt_models.requirement_roles[role.to_sym], role)
|
120
121
|
end
|
121
122
|
|
122
|
-
def svgmap_attrs(node)
|
123
|
-
attr_code(id_attr(node)
|
124
|
-
.merge(id: node.id, number: node.attr("number"),
|
125
|
-
unnumbered: node.option?("unnumbered") ? "true" : nil,
|
126
|
-
subsequence: node.attr("subsequence"))
|
127
|
-
.merge(keep_attrs(node)))
|
128
|
-
end
|
129
|
-
|
130
|
-
def svgmap_example(node)
|
131
|
-
noko do |xml|
|
132
|
-
xml.svgmap **attr_code(svgmap_attrs(node).merge(
|
133
|
-
src: node.attr("src"), alt: node.attr("alt"),
|
134
|
-
)) do |ex|
|
135
|
-
figure_title(node, ex)
|
136
|
-
ex << node.content
|
137
|
-
end
|
138
|
-
end.join("\n")
|
139
|
-
end
|
140
|
-
|
141
123
|
# prevent A's and other subs inappropriate for pseudocode
|
142
124
|
def pseudocode_example(node)
|
143
125
|
node.blocks.each { |b| b.remove_sub(:replacements) }
|
@@ -162,34 +144,6 @@ module Metanorma
|
|
162
144
|
end.join("\n")
|
163
145
|
end
|
164
146
|
|
165
|
-
def figure_example(node)
|
166
|
-
noko do |xml|
|
167
|
-
xml.figure **figure_attrs(node) do |ex|
|
168
|
-
node.title.nil? or ex.name { |name| name << node.title }
|
169
|
-
wrap_in_para(node, ex)
|
170
|
-
end
|
171
|
-
end.join("\n")
|
172
|
-
end
|
173
|
-
|
174
|
-
def figure_title(node, out)
|
175
|
-
node.title.nil? and return
|
176
|
-
out.name { |name| name << node.title }
|
177
|
-
end
|
178
|
-
|
179
|
-
def figure_attrs(node)
|
180
|
-
attr_code(id_unnum_attrs(node).merge(keep_attrs(node))
|
181
|
-
.merge(class: node.attr("class")))
|
182
|
-
end
|
183
|
-
|
184
|
-
def image(node)
|
185
|
-
noko do |xml|
|
186
|
-
xml.figure **figure_attrs(node) do |f|
|
187
|
-
figure_title(node, f)
|
188
|
-
f.image **image_attributes(node)
|
189
|
-
end
|
190
|
-
end
|
191
|
-
end
|
192
|
-
|
193
147
|
def para_attrs(node)
|
194
148
|
attr_code(id_attr(node).merge(keep_attrs(node)
|
195
149
|
.merge(align: node.attr("align"),
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module Metanorma
|
2
|
+
module Standoc
|
3
|
+
module Blocks
|
4
|
+
def svgmap_attrs(node)
|
5
|
+
attr_code(id_attr(node)
|
6
|
+
.merge(id: node.id, number: node.attr("number"),
|
7
|
+
unnumbered: node.option?("unnumbered") ? "true" : nil,
|
8
|
+
subsequence: node.attr("subsequence"))
|
9
|
+
.merge(keep_attrs(node)))
|
10
|
+
end
|
11
|
+
|
12
|
+
def svgmap_example(node)
|
13
|
+
noko do |xml|
|
14
|
+
xml.svgmap **attr_code(svgmap_attrs(node).merge(
|
15
|
+
src: node.attr("src"), alt: node.attr("alt"),
|
16
|
+
)) do |ex|
|
17
|
+
figure_title(node, ex)
|
18
|
+
ex << node.content
|
19
|
+
end
|
20
|
+
end.join("\n")
|
21
|
+
end
|
22
|
+
|
23
|
+
def figure_example(node)
|
24
|
+
noko do |xml|
|
25
|
+
xml.figure **figure_attrs(node) do |ex|
|
26
|
+
node.title.nil? or ex.name { |name| name << node.title }
|
27
|
+
wrap_in_para(node, ex)
|
28
|
+
end
|
29
|
+
end.join("\n")
|
30
|
+
end
|
31
|
+
|
32
|
+
def figure_title(node, out)
|
33
|
+
node.title.nil? and return
|
34
|
+
out.name { |name| name << node.title }
|
35
|
+
end
|
36
|
+
|
37
|
+
def figure_attrs(node)
|
38
|
+
attr_code(id_unnum_attrs(node).merge(keep_attrs(node))
|
39
|
+
.merge(class: node.attr("class")))
|
40
|
+
end
|
41
|
+
|
42
|
+
def image(node)
|
43
|
+
noko do |xml|
|
44
|
+
xml.figure **figure_attrs(node) do |f|
|
45
|
+
figure_title(node, f)
|
46
|
+
f.image **image_attributes(node)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -158,8 +158,7 @@ module Metanorma
|
|
158
158
|
end
|
159
159
|
|
160
160
|
def metadata_cleanup(xmldoc)
|
161
|
-
|
162
|
-
|
161
|
+
(@metadata_attrs.nil? || @metadata_attrs.empty?) and return
|
163
162
|
ins = add_misc_container(xmldoc)
|
164
163
|
ins << @metadata_attrs
|
165
164
|
end
|
@@ -35,12 +35,12 @@ module Metanorma
|
|
35
35
|
|
36
36
|
IGNORE_QUOTES_ELEMENTS =
|
37
37
|
%w(pre tt sourcecode stem asciimath figure bibdata passthrough
|
38
|
-
identifier).freeze
|
38
|
+
identifier presentation-metadata semantic-metadata).freeze
|
39
39
|
|
40
40
|
def uninterrupt_quotes_around_xml_skip(elem)
|
41
41
|
!(/\A['"]/.match?(elem.text) &&
|
42
|
-
elem.previous.path.gsub(/\[\d+\]/, "").split(%r{/})[1..-2]
|
43
|
-
|
42
|
+
elem.previous.path.gsub(/\[\d+\]/, "").split(%r{/})[1..-2].
|
43
|
+
intersection(IGNORE_QUOTES_ELEMENTS).empty? &&
|
44
44
|
((elem.previous.text.strip.empty? &&
|
45
45
|
!empty_tag_with_text_content?(elem.previous)) ||
|
46
46
|
ignoretext?(elem.previous)))
|
@@ -50,8 +50,8 @@ module Metanorma
|
|
50
50
|
prev = elem.at(".//preceding::text()[1]") or return
|
51
51
|
/\S\Z/.match?(prev.text) or return
|
52
52
|
foll = elem.at(".//following::text()[1]")
|
53
|
-
m = /\A(["'][[:punct:]]*)(\s|\Z)
|
54
|
-
|
53
|
+
m = /\A(["'][[:punct:]]*)(\s|\Z)/.
|
54
|
+
match(@c.decode(foll&.text)) or return
|
55
55
|
foll.content = foll.text.sub(/\A(["'][[:punct:]]*)/, "")
|
56
56
|
prev.content = "#{prev.text}#{m[1]}"
|
57
57
|
end
|
@@ -103,8 +103,8 @@ module Metanorma
|
|
103
103
|
next unless n.text? && /\u2019/.match?(n.text)
|
104
104
|
|
105
105
|
n.replace(@c.encode(
|
106
|
-
@c.decode(n.text)
|
107
|
-
|
106
|
+
@c.decode(n.text).
|
107
|
+
gsub(/(?<=\p{Alnum})\u2019(?=\p{Alpha})/, "'"),
|
108
108
|
:basic, :hexadecimal
|
109
109
|
))
|
110
110
|
end
|
@@ -5,6 +5,7 @@ require_relative "front"
|
|
5
5
|
require_relative "lists"
|
6
6
|
require_relative "ref"
|
7
7
|
require_relative "inline"
|
8
|
+
require_relative "anchor"
|
8
9
|
require_relative "blocks"
|
9
10
|
require_relative "section"
|
10
11
|
require_relative "table"
|
@@ -21,13 +22,13 @@ module Metanorma
|
|
21
22
|
class Converter
|
22
23
|
Asciidoctor::Extensions.register do
|
23
24
|
preprocessor Metanorma::Standoc::EmbedIncludeProcessor
|
24
|
-
preprocessor Metanorma::Standoc::NamedEscapePreprocessor
|
25
25
|
preprocessor Metanorma::Standoc::LinkProtectPreprocessor
|
26
26
|
preprocessor Metanorma::Standoc::Datamodel::AttributesTablePreprocessor
|
27
27
|
preprocessor Metanorma::Standoc::Datamodel::DiagramPreprocessor
|
28
28
|
preprocessor Metanorma::Plugin::Datastruct::Json2TextPreprocessor
|
29
29
|
preprocessor Metanorma::Plugin::Datastruct::Yaml2TextPreprocessor
|
30
30
|
preprocessor Metanorma::Plugin::Glossarist::DatasetPreprocessor
|
31
|
+
preprocessor Metanorma::Standoc::NamedEscapePreprocessor
|
31
32
|
inline_macro Metanorma::Standoc::PreferredTermInlineMacro
|
32
33
|
inline_macro Metanorma::Standoc::DateInlineMacro
|
33
34
|
inline_macro Metanorma::Standoc::SpanInlineMacro
|
@@ -81,7 +81,7 @@ module Metanorma
|
|
81
81
|
|
82
82
|
def datetypes
|
83
83
|
%w{ published accessed created implemented obsoleted
|
84
|
-
confirmed updated issued circulated unchanged received
|
84
|
+
confirmed updated corrected issued circulated unchanged received
|
85
85
|
vote-started vote-ended announced }
|
86
86
|
end
|
87
87
|
|
@@ -172,6 +172,7 @@ module Metanorma
|
|
172
172
|
metadata_date(node, xml)
|
173
173
|
metadata_author(node, xml)
|
174
174
|
metadata_publisher(node, xml)
|
175
|
+
metadata_sponsor(node, xml)
|
175
176
|
metadata_version(node, xml)
|
176
177
|
metadata_note(node, xml)
|
177
178
|
metadata_language(node, xml)
|
@@ -1,26 +1,21 @@
|
|
1
1
|
require "date"
|
2
|
-
require "nokogiri"
|
3
|
-
require "htmlentities"
|
4
|
-
require "pathname"
|
5
|
-
require "csv"
|
6
2
|
|
7
3
|
module Metanorma
|
8
4
|
module Standoc
|
9
5
|
module Front
|
10
6
|
def committee_component(compname, node, out)
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
**attr_code(number: node.attr("#{compname}-number_#{i}"),
|
18
|
-
type: node.attr("#{compname}-type_#{i}"))
|
7
|
+
i = 1
|
8
|
+
suffix = ""
|
9
|
+
while node.attr(compname + suffix)
|
10
|
+
out.send compname.gsub(/-/, "_"), node.attr(compname + suffix),
|
11
|
+
**attr_code(number: node.attr("#{compname}-number#{suffix}"),
|
12
|
+
type: node.attr("#{compname}-type#{suffix}"))
|
19
13
|
i += 1
|
14
|
+
suffix = "_#{i}"
|
20
15
|
end
|
21
16
|
end
|
22
17
|
|
23
|
-
def organization(org, orgname,
|
18
|
+
def organization(org, orgname, node = nil, default_org = nil)
|
24
19
|
abbrevs = org_abbrev
|
25
20
|
n = abbrevs.invert[orgname] and orgname = n
|
26
21
|
org.name orgname
|
@@ -28,32 +23,24 @@ module Metanorma
|
|
28
23
|
abbr = org_abbrev[orgname]
|
29
24
|
default_org && b = node.attr("subdivision-abbr") and abbr = b
|
30
25
|
abbr and org.abbreviation abbr
|
31
|
-
is_pub && node and org_address(node, org)
|
32
26
|
end
|
33
27
|
|
34
|
-
def org_address(
|
35
|
-
|
28
|
+
def org_address(org, xml)
|
29
|
+
p = org[:address] and xml.address do |ad|
|
36
30
|
ad.formattedAddress do |f|
|
37
|
-
f <<
|
31
|
+
f << p.gsub(/ \+\n/, "<br/>")
|
38
32
|
end
|
39
33
|
end
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
node.attr("pub-uri") and person.uri node.attr("pub-uri")
|
34
|
+
p = org[:phone] and xml.phone p
|
35
|
+
p = org[:fax] and xml.phone p, type: "fax"
|
36
|
+
p = org[:email] and xml.email p
|
37
|
+
p = org[:uri] and xml.uri p
|
45
38
|
end
|
46
39
|
|
47
40
|
def metadata_author(node, xml)
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
c.role type: "author"
|
52
|
-
c.organization do |a|
|
53
|
-
organization(a, p, false, node, !node.attr("publisher"))
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
41
|
+
org_contributor(node, xml,
|
42
|
+
{ source: ["publisher", "pub"], role: "author",
|
43
|
+
default: default_publisher })
|
57
44
|
personal_author(node, xml)
|
58
45
|
end
|
59
46
|
|
@@ -129,6 +116,7 @@ module Metanorma
|
|
129
116
|
xml.subdivision s
|
130
117
|
end
|
131
118
|
person_address(node, suffix, xml)
|
119
|
+
person_org_logo(node, suffix, xml)
|
132
120
|
end
|
133
121
|
|
134
122
|
def person_address(node, suffix, xml)
|
@@ -145,11 +133,19 @@ module Metanorma
|
|
145
133
|
|
146
134
|
def person_address_components(node, suffix, xml)
|
147
135
|
xml.address do |ad|
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
136
|
+
%w(street city state country postcode).each do |k|
|
137
|
+
s = node.attr("#{k}#{suffix}") and ad.send k, s
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
def person_org_logo(node, suffix, xml)
|
143
|
+
p = node.attr("affiliation_logo#{suffix}") and org_logo(xml, p)
|
144
|
+
end
|
145
|
+
|
146
|
+
def org_logo(xml, logo)
|
147
|
+
logo and xml.logo do |l|
|
148
|
+
l.image src: logo
|
153
149
|
end
|
154
150
|
end
|
155
151
|
|
@@ -162,27 +158,109 @@ module Metanorma
|
|
162
158
|
end
|
163
159
|
|
164
160
|
def metadata_publisher(node, xml)
|
165
|
-
|
166
|
-
|
161
|
+
o = { source: ["publisher", "pub"], role: "publisher",
|
162
|
+
default: default_publisher }
|
163
|
+
org_contributor(node, xml, o)
|
164
|
+
end
|
165
|
+
|
166
|
+
def metadata_sponsor(node, xml)
|
167
|
+
o = { source: ["sponsor"], role: "enabler" }
|
168
|
+
org_contributor(node, xml, o)
|
169
|
+
end
|
170
|
+
|
171
|
+
def org_contributor(node, xml, opts)
|
172
|
+
org_attrs_parse(node, opts).each do |o|
|
167
173
|
xml.contributor do |c|
|
168
|
-
c
|
174
|
+
org_contributor_role(c, o)
|
169
175
|
c.organization do |a|
|
170
|
-
|
176
|
+
org_organization(node, a, o)
|
171
177
|
end
|
172
178
|
end
|
173
179
|
end
|
174
180
|
end
|
175
181
|
|
182
|
+
def org_contributor_role(xml, org)
|
183
|
+
xml.role type: org[:role] do |r|
|
184
|
+
org[:desc] and r.description do |d|
|
185
|
+
d << org[:desc]
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
def org_organization(node, xml, org)
|
191
|
+
organization(xml, org[:name], node, !node.attr("publisher"))
|
192
|
+
org_address(org, xml)
|
193
|
+
org_logo(xml, org[:logo])
|
194
|
+
end
|
195
|
+
|
196
|
+
def org_attrs_parse(node, opts)
|
197
|
+
source = opts[:source]&.detect { |s| node.attr(s) }
|
198
|
+
org_attrs_simple_parse(node, opts, source) ||
|
199
|
+
org_attrs_complex_parse(node, opts, source)
|
200
|
+
end
|
201
|
+
|
202
|
+
def org_attrs_simple_parse(node, opts, source)
|
203
|
+
!source and return org_attrs_simple_parse_no_source(node, opts)
|
204
|
+
orgs = csv_split(node.attr(source))
|
205
|
+
orgs.size > 1 and return orgs.map do |o|
|
206
|
+
{ name: o, role: opts[:role], desc: opts[:desc] }
|
207
|
+
end
|
208
|
+
nil
|
209
|
+
end
|
210
|
+
|
211
|
+
def org_attrs_simple_parse_no_source(node, opts)
|
212
|
+
!opts[:default] && !opts[:name] and return []
|
213
|
+
[{ name: opts[:name] || opts[:default],
|
214
|
+
role: opts[:role], desc: opts[:desc] }
|
215
|
+
.compact.merge(extract_org_attrs_address(node, opts, ""))]
|
216
|
+
end
|
217
|
+
|
218
|
+
def org_attrs_complex_parse(node, opts, source)
|
219
|
+
i = 1
|
220
|
+
suffix = ""
|
221
|
+
ret = []
|
222
|
+
while node.attr(source + suffix)
|
223
|
+
ret << extract_org_attrs_complex(node, opts, source, suffix)
|
224
|
+
i += 1
|
225
|
+
suffix = "_#{i}"
|
226
|
+
end
|
227
|
+
ret
|
228
|
+
end
|
229
|
+
|
230
|
+
def extract_org_attrs_complex(node, opts, source, suffix)
|
231
|
+
{ name: node.attr(source + suffix),
|
232
|
+
role: opts[:role], desc: opts[:desc],
|
233
|
+
logo: node.attr("#{source}_logo#{suffix}") }.compact
|
234
|
+
.merge(extract_org_attrs_address(node, opts, suffix))
|
235
|
+
end
|
236
|
+
|
237
|
+
def extract_org_attrs_address(node, opts, suffix)
|
238
|
+
%w(address phone fax email uri).each_with_object({}) do |a, m|
|
239
|
+
opts[:source]&.each do |s|
|
240
|
+
p = node.attr("#{s}-#{a}#{suffix}") and
|
241
|
+
m[a.to_sym] = p
|
242
|
+
end
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
def copyright_parse(node)
|
247
|
+
opt = { source: ["copyright-holder", "publisher", "pub"],
|
248
|
+
role: "publisher", default: default_publisher }
|
249
|
+
ret = org_attrs_parse(node, opt)
|
250
|
+
ret.empty? and ret = [{ name: "-" }]
|
251
|
+
ret
|
252
|
+
end
|
253
|
+
|
176
254
|
def metadata_copyright(node, xml)
|
177
|
-
|
178
|
-
csv_split(pub || default_publisher || "-")&.each do |p|
|
255
|
+
copyright_parse(node).each do |p|
|
179
256
|
xml.copyright do |c|
|
180
257
|
c.from (node.attr("copyright-year") || Date.today.year)
|
181
|
-
p.
|
182
|
-
owner
|
183
|
-
organization
|
258
|
+
(p[:name].is_a?(String) && p[:name].match(/\p{L}/).nil?) or
|
259
|
+
c.owner do |owner|
|
260
|
+
owner.organization do |a|
|
261
|
+
org_organization(node, a, p)
|
262
|
+
end
|
184
263
|
end
|
185
|
-
end
|
186
264
|
end
|
187
265
|
end
|
188
266
|
end
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require "asciidoctor/extensions"
|
2
1
|
require "unicode2latex"
|
3
2
|
require "mime/types"
|
4
3
|
require "base64"
|
@@ -8,115 +7,6 @@ require "plurimath"
|
|
8
7
|
module Metanorma
|
9
8
|
module Standoc
|
10
9
|
module Inline
|
11
|
-
def refid?(ref)
|
12
|
-
@refids.include? ref
|
13
|
-
end
|
14
|
-
|
15
|
-
def inline_anchor(node)
|
16
|
-
case node.type
|
17
|
-
when :ref then inline_anchor_ref node
|
18
|
-
when :xref then inline_anchor_xref node
|
19
|
-
when :link then inline_anchor_link node
|
20
|
-
when :bibref then inline_anchor_bibref node
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def inline_anchor_ref(node)
|
25
|
-
noko do |xml|
|
26
|
-
xml.bookmark nil, **attr_code(id: node.id)
|
27
|
-
end.join
|
28
|
-
end
|
29
|
-
|
30
|
-
def inline_anchor_xref(node)
|
31
|
-
noko do |xml|
|
32
|
-
attrs = inline_anchor_xref_attrs(node)
|
33
|
-
c = attrs[:text]
|
34
|
-
attrs.delete(:text) unless c.nil?
|
35
|
-
xml.xref **attr_code(attrs) do |x|
|
36
|
-
x << c
|
37
|
-
end
|
38
|
-
end.join
|
39
|
-
end
|
40
|
-
|
41
|
-
def inline_anchor_xref_attrs(node)
|
42
|
-
text = concatenate_attributes_to_xref_text(node)
|
43
|
-
m = inline_anchor_xref_match(text)
|
44
|
-
t = node.target.gsub(/^#/, "").gsub(%r{(\.xml|\.adoc)(#.*$)}, "\\2")
|
45
|
-
m.nil? and return { target: t, type: "inline", text: text }
|
46
|
-
inline_anchor_xref_attrs1(m, t, text)
|
47
|
-
end
|
48
|
-
|
49
|
-
def concatenate_attributes_to_xref_text(node)
|
50
|
-
node.attributes.each_with_object([]) do |(k, v), m|
|
51
|
-
%w(path fragment refid).include?(k) and next
|
52
|
-
m << "#{k}=#{v}%"
|
53
|
-
end.map { |x| x.sub(/%+/, "%") }.join + (node.text || "")
|
54
|
-
end
|
55
|
-
|
56
|
-
def inline_anchor_xref_attrs1(match, target, text)
|
57
|
-
{ target: target, hidden: match[:hidden],
|
58
|
-
type: match[:fn].nil? ? "inline" : "footnote",
|
59
|
-
case: match[:case]&.sub(/%$/, ""),
|
60
|
-
style: match[:style]&.sub(/^style=/, "")&.sub(/%$/, "") || @xrefstyle,
|
61
|
-
droploc: match[:drop].nil? && match[:drop2].nil? ? nil : true,
|
62
|
-
text: inline_anchor_xref_text(match, text) }
|
63
|
-
end
|
64
|
-
|
65
|
-
def inline_anchor_xref_match(text)
|
66
|
-
/^(?:hidden%(?<hidden>[^,]+),?)?
|
67
|
-
(?<style>style=[^%]+%)?
|
68
|
-
(?<drop>droploc%)?(?<case>capital%|lowercase%)?(?<drop2>droploc%)?
|
69
|
-
(?<fn>fn:?\s*)?(?<text>.*)$/x.match text
|
70
|
-
end
|
71
|
-
|
72
|
-
def inline_anchor_xref_text(match, text)
|
73
|
-
if %i[case fn drop drop2 hidden style].any? { |x| !match[x].nil? }
|
74
|
-
match[:text]
|
75
|
-
else text
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
def inline_anchor_link(node)
|
80
|
-
contents = node.text
|
81
|
-
contents = "" if node.target.gsub(%r{^mailto:}, "") == node.text
|
82
|
-
attributes = { target: node.target, alt: node.attr("title"),
|
83
|
-
"update-type": node.attr("updatetype") ||
|
84
|
-
node.attr("update-type") }
|
85
|
-
noko do |xml|
|
86
|
-
xml.link **attr_code(attributes) do |l|
|
87
|
-
l << contents
|
88
|
-
end
|
89
|
-
end.join
|
90
|
-
end
|
91
|
-
|
92
|
-
def inline_anchor_bibref(node)
|
93
|
-
eref_contents =
|
94
|
-
@c.decode(node.text || node.target || node.id)
|
95
|
-
&.sub(/^\[?([^\[\]]+?)\]?$/, "[\\1]")
|
96
|
-
@refids << (node.target || node.id)
|
97
|
-
noko do |xml|
|
98
|
-
xml.ref **attr_code(id: node.target || node.id) do |r|
|
99
|
-
r << eref_contents
|
100
|
-
end
|
101
|
-
end.join
|
102
|
-
end
|
103
|
-
|
104
|
-
def inline_callout(node)
|
105
|
-
noko do |xml|
|
106
|
-
xml.callout node.text
|
107
|
-
end.join
|
108
|
-
end
|
109
|
-
|
110
|
-
def inline_footnote(node)
|
111
|
-
@fn_number ||= 0
|
112
|
-
noko do |xml|
|
113
|
-
@fn_number += 1
|
114
|
-
xml.fn reference: @fn_number do |fn|
|
115
|
-
fn.p { |p| p << node.text }
|
116
|
-
end
|
117
|
-
end.join
|
118
|
-
end
|
119
|
-
|
120
10
|
def inline_break(node)
|
121
11
|
noko do |xml|
|
122
12
|
xml << node.text
|
@@ -137,8 +27,8 @@ module Metanorma
|
|
137
27
|
|
138
28
|
def latex_parse1(text, block)
|
139
29
|
lxm_input = Unicode2LaTeX.unicode2latex(@c.decode(text))
|
140
|
-
results = Plurimath::Math.parse(lxm_input, "latex")
|
141
|
-
|
30
|
+
results = Plurimath::Math.parse(lxm_input, "latex").
|
31
|
+
to_mathml(display_style: block)
|
142
32
|
if results.nil?
|
143
33
|
@log.add("Math", nil,
|
144
34
|
"latexmlmath failed to process equation:\n#{lxm_input}")
|
@@ -164,8 +54,8 @@ module Metanorma
|
|
164
54
|
latex = latex_parse1(text, block) or
|
165
55
|
return xml.stem type: "MathML", block: block
|
166
56
|
xml.stem type: "MathML", block: block do |s|
|
167
|
-
math = Nokogiri::XML.fragment(latex.sub(/<\?[^>]+>/, ""))
|
168
|
-
|
57
|
+
math = Nokogiri::XML.fragment(latex.sub(/<\?[^>]+>/, "")).
|
58
|
+
elements[0]
|
169
59
|
math.delete("alttext")
|
170
60
|
s.parent.children = math
|
171
61
|
s << "<latexmath>#{text}</latexmath>"
|
@@ -202,6 +92,10 @@ module Metanorma
|
|
202
92
|
xml.span style: node.role.sub(/^css /, "") do |s|
|
203
93
|
s << node.text
|
204
94
|
end
|
95
|
+
when /:/
|
96
|
+
xml.span **attr_code(hash2styles(node.role)) do |s|
|
97
|
+
s << node.text
|
98
|
+
end
|
205
99
|
else
|
206
100
|
xml << node.text
|
207
101
|
end
|
@@ -209,6 +103,17 @@ module Metanorma
|
|
209
103
|
end.join
|
210
104
|
end
|
211
105
|
|
106
|
+
def hash2styles(role)
|
107
|
+
CSV.parse_line(role, liberal_parsing: true).
|
108
|
+
each_with_object({}) do |r, m|
|
109
|
+
kv = r.split(":", 2).map(&:strip)
|
110
|
+
case kv[0]
|
111
|
+
when "custom-charset"
|
112
|
+
m[kv[0]] = kv[1]
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
212
117
|
def image_attributes(node)
|
213
118
|
nodetarget = node.attr("target") || node.target
|
214
119
|
if Gem.win_platform? && /^[a-zA-Z]:/.match?(nodetarget)
|
@@ -17,7 +17,7 @@
|
|
17
17
|
these elements; we just want one namespace for any child grammars
|
18
18
|
of this.
|
19
19
|
-->
|
20
|
-
<!-- VERSION v1.2.
|
20
|
+
<!-- VERSION v1.2.8 -->
|
21
21
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
22
22
|
<include href="reqt.rng"/>
|
23
23
|
<include href="basicdoc.rng">
|
@@ -1054,6 +1054,17 @@
|
|
1054
1054
|
<ref name="date_inline"/>
|
1055
1055
|
</choice>
|
1056
1056
|
</define>
|
1057
|
+
<define name="PureTextElement" combine="choice">
|
1058
|
+
<ref name="passthrough_inline"/>
|
1059
|
+
</define>
|
1060
|
+
<define name="passthrough_inline">
|
1061
|
+
<element name="passthrough">
|
1062
|
+
<optional>
|
1063
|
+
<attribute name="formats"/>
|
1064
|
+
</optional>
|
1065
|
+
<text/>
|
1066
|
+
</element>
|
1067
|
+
</define>
|
1057
1068
|
<define name="add">
|
1058
1069
|
<element name="add">
|
1059
1070
|
<choice>
|
@@ -1092,6 +1103,9 @@
|
|
1092
1103
|
<optional>
|
1093
1104
|
<attribute name="style"/>
|
1094
1105
|
</optional>
|
1106
|
+
<optional>
|
1107
|
+
<attribute name="custom-charset"/>
|
1108
|
+
</optional>
|
1095
1109
|
<oneOrMore>
|
1096
1110
|
<ref name="TextElement"/>
|
1097
1111
|
</oneOrMore>
|
@@ -1394,6 +1408,9 @@
|
|
1394
1408
|
<optional>
|
1395
1409
|
<attribute name="number"/>
|
1396
1410
|
</optional>
|
1411
|
+
<optional>
|
1412
|
+
<attribute name="branch-number"/>
|
1413
|
+
</optional>
|
1397
1414
|
<optional>
|
1398
1415
|
<attribute name="obligation">
|
1399
1416
|
<choice>
|
@@ -1617,6 +1634,9 @@
|
|
1617
1634
|
<optional>
|
1618
1635
|
<attribute name="number"/>
|
1619
1636
|
</optional>
|
1637
|
+
<optional>
|
1638
|
+
<attribute name="branch-number"/>
|
1639
|
+
</optional>
|
1620
1640
|
<optional>
|
1621
1641
|
<attribute name="type"/>
|
1622
1642
|
</optional>
|
@@ -1668,6 +1688,9 @@
|
|
1668
1688
|
<optional>
|
1669
1689
|
<attribute name="number"/>
|
1670
1690
|
</optional>
|
1691
|
+
<optional>
|
1692
|
+
<attribute name="branch-number"/>
|
1693
|
+
</optional>
|
1671
1694
|
<optional>
|
1672
1695
|
<ref name="section-title"/>
|
1673
1696
|
</optional>
|
@@ -1765,6 +1788,9 @@
|
|
1765
1788
|
<optional>
|
1766
1789
|
<attribute name="number"/>
|
1767
1790
|
</optional>
|
1791
|
+
<optional>
|
1792
|
+
<attribute name="branch-number"/>
|
1793
|
+
</optional>
|
1768
1794
|
<optional>
|
1769
1795
|
<attribute name="obligation">
|
1770
1796
|
<choice>
|
@@ -97,7 +97,8 @@ module Metanorma
|
|
97
97
|
|
98
98
|
def pass_status(status, text)
|
99
99
|
text == "++++" && !status[:delimln] and status[:pass] = !status[:pass]
|
100
|
-
if status[:is_delim] && /^(-+|\*+|=+|_+)$/.match?(text)
|
100
|
+
if (status[:is_delim] && /^(-+|\*+|=+|_+)$/.match?(text)) ||
|
101
|
+
(!status[:is_delim] && !status[:delimln] && text == "----")
|
101
102
|
status[:delimln] = text
|
102
103
|
status[:pass] = true
|
103
104
|
elsif status[:pass_delim]
|
@@ -84,6 +84,7 @@ module Metanorma
|
|
84
84
|
language: node.attributes["language"],
|
85
85
|
script: node.attributes["script"],
|
86
86
|
number: node.attributes["number"],
|
87
|
+
"branch-number": node.attributes["branch-number"],
|
87
88
|
type: node.attributes["type"],
|
88
89
|
annex: (if (node.attr("style") == "appendix" ||
|
89
90
|
node.role == "appendix") &&
|
@@ -69,11 +69,11 @@ module Metanorma
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def xml_encode(text)
|
72
|
-
@c.encode(text, :basic, :hexadecimal)
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
72
|
+
@c.encode(text, :basic, :hexadecimal).
|
73
|
+
gsub("&gt;", ">").gsub("&lt;", "<").gsub("&amp;", "&").
|
74
|
+
gsub(">", ">").gsub("<", "<").gsub("&", "&").
|
75
|
+
gsub(""", '"').gsub("
", "\n").gsub("&#", "&#").
|
76
|
+
gsub("'", "'")
|
77
77
|
end
|
78
78
|
|
79
79
|
# wrapped in <sections>
|
@@ -104,6 +104,10 @@ module Metanorma
|
|
104
104
|
psi|omega)\b/xi, "&\\1;")
|
105
105
|
end
|
106
106
|
|
107
|
+
def refid?(ref)
|
108
|
+
@refids.include? ref
|
109
|
+
end
|
110
|
+
|
107
111
|
module_function :adoc2xml
|
108
112
|
|
109
113
|
class EmptyAttr
|
data/metanorma-standoc.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_dependency "addressable", "~> 2.8.0"
|
32
32
|
spec.add_dependency "asciidoctor", "~> 2.0.0"
|
33
33
|
spec.add_dependency "iev", "~> 0.3.0"
|
34
|
-
spec.add_dependency "isodoc", "~> 2.
|
34
|
+
spec.add_dependency "isodoc", "~> 2.7.1"
|
35
35
|
spec.add_dependency "metanorma", ">= 1.6.0"
|
36
36
|
spec.add_dependency "metanorma-plugin-datastruct", "~> 0.2.0"
|
37
37
|
spec.add_dependency "metanorma-plugin-glossarist", "~> 0.1.1"
|
@@ -41,7 +41,7 @@ Gem::Specification.new do |spec|
|
|
41
41
|
spec.add_dependency "asciimath2unitsml", "~> 0.4.0"
|
42
42
|
spec.add_dependency "concurrent-ruby"
|
43
43
|
spec.add_dependency "pngcheck"
|
44
|
-
spec.add_dependency "relaton-cli", "~> 1.
|
44
|
+
spec.add_dependency "relaton-cli", "~> 1.17.0"
|
45
45
|
spec.add_dependency "relaton-iev", "~> 1.1.5"
|
46
46
|
spec.add_dependency "unicode2latex", "~> 0.0.1"
|
47
47
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-standoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.
|
61
|
+
version: 2.7.1
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 2.
|
68
|
+
version: 2.7.1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: metanorma
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,14 +184,14 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: 1.
|
187
|
+
version: 1.17.0
|
188
188
|
type: :runtime
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: 1.
|
194
|
+
version: 1.17.0
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: relaton-iev
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -466,11 +466,13 @@ files:
|
|
466
466
|
- lib/isodoc/pdf_convert.rb
|
467
467
|
- lib/metanorma-standoc.rb
|
468
468
|
- lib/metanorma/standoc.rb
|
469
|
+
- lib/metanorma/standoc/anchor.rb
|
469
470
|
- lib/metanorma/standoc/base.rb
|
470
471
|
- lib/metanorma/standoc/basicdoc.rng
|
471
472
|
- lib/metanorma/standoc/biblio-standoc.rng
|
472
473
|
- lib/metanorma/standoc/biblio.rng
|
473
474
|
- lib/metanorma/standoc/blocks.rb
|
475
|
+
- lib/metanorma/standoc/blocks_image.rb
|
474
476
|
- lib/metanorma/standoc/blocks_notes.rb
|
475
477
|
- lib/metanorma/standoc/cleanup.rb
|
476
478
|
- lib/metanorma/standoc/cleanup_amend.rb
|