metanorma-ieee 1.1.1 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/html2doc/ieee_wp/lists.rb +22 -0
- data/lib/html2doc/ieee_wp.rb +6 -0
- data/lib/isodoc/ieee/base_convert.rb +5 -0
- data/lib/isodoc/ieee/html/header_wp.html +348 -0
- data/lib/isodoc/ieee/html/ieee_wp.css +3316 -0
- data/lib/isodoc/ieee/html/ieee_wp.scss +3174 -0
- data/lib/isodoc/ieee/html/word_ieee_colophon_wp.html +129 -0
- data/lib/isodoc/ieee/html/word_ieee_intro_wp.html +142 -0
- data/lib/isodoc/ieee/html/word_ieee_titlepage_wp.html +333 -0
- data/lib/isodoc/ieee/html/wordstyle_wp.css +5795 -0
- data/lib/isodoc/ieee/html/wordstyle_wp.scss +5357 -0
- data/lib/isodoc/ieee/html/wp_image001.emz +0 -0
- data/lib/isodoc/ieee/html/wp_image003.emz +0 -0
- data/lib/isodoc/ieee/html/wp_image008.emz +0 -0
- data/lib/isodoc/ieee/i18n-en.yaml +1 -0
- data/lib/isodoc/ieee/metadata.rb +15 -5
- data/lib/isodoc/ieee/presentation_xml_convert.rb +44 -5
- data/lib/isodoc/ieee/word_authority.rb +14 -13
- data/lib/isodoc/ieee/word_cleanup.rb +43 -20
- data/lib/isodoc/ieee/word_cleanup_blocks.rb +23 -17
- data/lib/isodoc/ieee/word_convert.rb +27 -7
- data/lib/isodoc/ieee/word_wp_cleanup.rb +220 -0
- data/lib/isodoc/ieee/word_wp_convert.rb +115 -0
- data/lib/isodoc/ieee/xref.rb +24 -2
- data/lib/metanorma/ieee/basicdoc.rng +18 -2
- data/lib/metanorma/ieee/biblio.rng +1 -1
- data/lib/metanorma/ieee/boilerplate_wp.adoc +95 -0
- data/lib/metanorma/ieee/cleanup.rb +10 -6
- data/lib/metanorma/ieee/cleanup_ref.rb +8 -0
- data/lib/metanorma/ieee/converter.rb +5 -2
- data/lib/metanorma/ieee/front.rb +13 -12
- data/lib/metanorma/ieee/isodoc.rng +18 -1
- data/lib/metanorma/ieee/validate.rb +8 -9
- data/lib/metanorma/ieee/validate_section.rb +1 -2
- data/lib/metanorma/ieee/validate_style.rb +1 -2
- data/lib/metanorma/ieee/version.rb +1 -1
- data/lib/metanorma-ieee.rb +1 -0
- data/lib/relaton/render/config.yml +6 -6
- data/metanorma-ieee.gemspec +1 -1
- metadata +20 -4
@@ -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.5 -->
|
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">
|
@@ -485,6 +485,8 @@
|
|
485
485
|
<choice>
|
486
486
|
<text/>
|
487
487
|
<ref name="callout"/>
|
488
|
+
<ref name="xref"/>
|
489
|
+
<ref name="eref"/>
|
488
490
|
</choice>
|
489
491
|
</oneOrMore>
|
490
492
|
<zeroOrMore>
|
@@ -865,6 +867,7 @@
|
|
865
867
|
<ref name="PureTextElement"/>
|
866
868
|
<ref name="stem"/>
|
867
869
|
<ref name="index"/>
|
870
|
+
<ref name="index-xref"/>
|
868
871
|
<ref name="eref"/>
|
869
872
|
<ref name="erefstack"/>
|
870
873
|
<ref name="xref"/>
|
@@ -880,6 +883,7 @@
|
|
880
883
|
<ref name="PureTextElement"/>
|
881
884
|
<ref name="stem"/>
|
882
885
|
<ref name="index"/>
|
886
|
+
<ref name="index-xref"/>
|
883
887
|
<ref name="eref"/>
|
884
888
|
<ref name="erefstack"/>
|
885
889
|
<ref name="xref"/>
|
@@ -894,6 +898,7 @@
|
|
894
898
|
<choice>
|
895
899
|
<ref name="PureTextElement"/>
|
896
900
|
<ref name="index"/>
|
901
|
+
<ref name="index-xref"/>
|
897
902
|
<ref name="eref"/>
|
898
903
|
<ref name="erefstack"/>
|
899
904
|
<ref name="xref"/>
|
@@ -908,6 +913,7 @@
|
|
908
913
|
<choice>
|
909
914
|
<ref name="PureTextElement"/>
|
910
915
|
<ref name="index"/>
|
916
|
+
<ref name="index-xref"/>
|
911
917
|
</choice>
|
912
918
|
</zeroOrMore>
|
913
919
|
</element>
|
@@ -918,6 +924,7 @@
|
|
918
924
|
<choice>
|
919
925
|
<ref name="PureTextElement"/>
|
920
926
|
<ref name="index"/>
|
927
|
+
<ref name="index-xref"/>
|
921
928
|
</choice>
|
922
929
|
</zeroOrMore>
|
923
930
|
</element>
|
@@ -928,6 +935,7 @@
|
|
928
935
|
<choice>
|
929
936
|
<ref name="PureTextElement"/>
|
930
937
|
<ref name="index"/>
|
938
|
+
<ref name="index-xref"/>
|
931
939
|
</choice>
|
932
940
|
</zeroOrMore>
|
933
941
|
</element>
|
@@ -938,6 +946,7 @@
|
|
938
946
|
<choice>
|
939
947
|
<ref name="PureTextElement"/>
|
940
948
|
<ref name="index"/>
|
949
|
+
<ref name="index-xref"/>
|
941
950
|
</choice>
|
942
951
|
</zeroOrMore>
|
943
952
|
</element>
|
@@ -1047,6 +1056,8 @@
|
|
1047
1056
|
<ref name="keyword"/>
|
1048
1057
|
<ref name="xref"/>
|
1049
1058
|
<ref name="hyperlink"/>
|
1059
|
+
<ref name="index"/>
|
1060
|
+
<ref name="index-xref"/>
|
1050
1061
|
</choice>
|
1051
1062
|
</element>
|
1052
1063
|
</define>
|
@@ -1060,6 +1071,8 @@
|
|
1060
1071
|
<ref name="keyword"/>
|
1061
1072
|
<ref name="xref"/>
|
1062
1073
|
<ref name="hyperlink"/>
|
1074
|
+
<ref name="index"/>
|
1075
|
+
<ref name="index-xref"/>
|
1063
1076
|
</choice>
|
1064
1077
|
</element>
|
1065
1078
|
</define>
|
@@ -1126,6 +1139,8 @@
|
|
1126
1139
|
<choice>
|
1127
1140
|
<ref name="PureTextElement"/>
|
1128
1141
|
<ref name="stem"/>
|
1142
|
+
<ref name="index"/>
|
1143
|
+
<ref name="index-xref"/>
|
1129
1144
|
</choice>
|
1130
1145
|
</zeroOrMore>
|
1131
1146
|
</element>
|
@@ -1136,6 +1151,8 @@
|
|
1136
1151
|
<choice>
|
1137
1152
|
<ref name="PureTextElement"/>
|
1138
1153
|
<ref name="stem"/>
|
1154
|
+
<ref name="index"/>
|
1155
|
+
<ref name="index-xref"/>
|
1139
1156
|
</choice>
|
1140
1157
|
</zeroOrMore>
|
1141
1158
|
</element>
|
@@ -28,12 +28,11 @@ module Metanorma
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def doctype_validate(xmldoc)
|
31
|
-
doctype = xmldoc&.at("//bibdata/ext/doctype")&.text
|
32
31
|
%w(standard recommended-practice guide whitepaper redline other)
|
33
|
-
.include?
|
32
|
+
.include?(@doctype) or
|
34
33
|
@log.add("Document Attributes", nil,
|
35
|
-
"#{doctype} is not a recognised document type")
|
36
|
-
docsubtype = xmldoc
|
34
|
+
"#{@doctype} is not a recognised document type")
|
35
|
+
docsubtype = xmldoc.at("//bibdata/ext/subdoctype")&.text or return
|
37
36
|
%w(amendment corrigendum erratum document).include? docsubtype or
|
38
37
|
@log.add("Document Attributes", nil,
|
39
38
|
"#{docsubtype} is not a recognised document subtype")
|
@@ -55,7 +54,7 @@ module Metanorma
|
|
55
54
|
def locality_range_validate(root)
|
56
55
|
root.xpath("//eref | xref").each do |e|
|
57
56
|
e.at(".//localityStack[@connective = 'from'] | .//referenceTo") and
|
58
|
-
@log.add("Style", e, "Cross-reference contains range, "\
|
57
|
+
@log.add("Style", e, "Cross-reference contains range, " \
|
59
58
|
"should be separate cross-references")
|
60
59
|
end
|
61
60
|
end
|
@@ -65,7 +64,7 @@ module Metanorma
|
|
65
64
|
root.xpath("//eref[descendant::locality]").each do |t|
|
66
65
|
if !/[:-](\d+{4})$/.match?(t["citeas"])
|
67
66
|
@log.add("Style", t,
|
68
|
-
"Undated reference #{t['citeas']} should not contain "\
|
67
|
+
"Undated reference #{t['citeas']} should not contain " \
|
69
68
|
"specific elements")
|
70
69
|
end
|
71
70
|
end
|
@@ -204,7 +203,7 @@ module Metanorma
|
|
204
203
|
desc = a.at("./description")
|
205
204
|
if desc && !desc.text.strip.empty?
|
206
205
|
amend_validate1(a, desc.text.strip,
|
207
|
-
a.at("./newcontent//figure | "\
|
206
|
+
a.at("./newcontent//figure | " \
|
208
207
|
"./newcontent//formula"))
|
209
208
|
else @log.add("Style", a,
|
210
209
|
"Editorial instruction is missing from change")
|
@@ -227,9 +226,9 @@ module Metanorma
|
|
227
226
|
|
228
227
|
AMD_VALID_MOD = [
|
229
228
|
"'Modify' change description should start with _Change_ or _Replace_",
|
230
|
-
"'Modify' change description for change involving figure or equation "\
|
229
|
+
"'Modify' change description for change involving figure or equation " \
|
231
230
|
"should start with _Replace_",
|
232
|
-
"'Modify' change description for change not involving figure or "\
|
231
|
+
"'Modify' change description for change not involving figure or " \
|
233
232
|
"equation should start with _Change_",
|
234
233
|
].freeze
|
235
234
|
|
@@ -2,8 +2,7 @@ module Metanorma
|
|
2
2
|
module IEEE
|
3
3
|
class Converter < Standoc::Converter
|
4
4
|
def section_validate(doc)
|
5
|
-
|
6
|
-
unless %w(amendment technical-corrigendum).include? doctype
|
5
|
+
unless %w(amendment technical-corrigendum).include? @doctype
|
7
6
|
sections_presence_validate(doc.root)
|
8
7
|
sections_sequence_validate(doc.root)
|
9
8
|
end
|
@@ -117,11 +117,10 @@ module Metanorma
|
|
117
117
|
def title_validate_type(xml)
|
118
118
|
title = xml.at("//bibdata/title") or return
|
119
119
|
draft = xml.at("//bibdata//draft")
|
120
|
-
type = xml.at("//bibdata/ext/doctype")
|
121
120
|
trial = xml.at("//bibdata/ext/trial-use[text() = 'true']")
|
122
121
|
target = draft ? "Draft " : ""
|
123
122
|
target += trial ? "Trial-Use " : ""
|
124
|
-
target +=
|
123
|
+
target += @doctype ? "#{strict_capitalize_phrase(@doctype)} " : ""
|
125
124
|
/^#{target}/.match?(title.text) or
|
126
125
|
@log.add("Style", title,
|
127
126
|
"Expected title to start as: #{target}")
|
data/lib/metanorma-ieee.rb
CHANGED
@@ -9,17 +9,17 @@ extenttemplate:
|
|
9
9
|
misc: "{{ volume }}, {{issue}}, {{ page }}, {{ duration }}"
|
10
10
|
template:
|
11
11
|
# skip authoritative_identifier, it is inserted in front of formattedref within metanorma
|
12
|
-
standard: "{% if home_standard %}{{ title }}.{% else %}{{ creatornames }}, “{{ title }},” {{ extent }}, {{ labels['version'] }}_{{ edition_raw }}, {{date}}, {{labels['updated'] | capitalize }}_{{date_updated}}, {{status }}, {{ authorizer }}, {{ uri }} .{% endif %}"
|
13
|
-
article: "{{creatornames}}, “{{title}},” <em>{{ series }}</em>, {{ extent }}, {{ date }}, {{ labels['viewed'] }}_{{date_accessed}}, {{ uri }} ."
|
14
|
-
book: "{{creatornames}}, <em>{{title}}</em>, {{ edition }}, {{place}}: {{publisher}}, {{date}}, {{ labels['viewed'] }}_{{date_accessed}}, {{ uri }} ."
|
12
|
+
standard: "{% if home_standard %}{{ title }}.{% else %}{{ creatornames }}, “{{ title }},” {{ extent }}, {{ labels['version'] }}_{{ edition_raw }}, {{date}}, {{labels['updated'] | capitalize }}_{{date_updated}}, {{status }}, {{ authorizer }}, {% if uri %}{{ uri }}{% else %}{% if doi %}DOI: {{ doi | join: ', ' }}{% endif %}{% endif %} .{% endif %}"
|
13
|
+
article: "{{creatornames}}, “{{title}},” <em>{{ series }}</em>, {{ extent }}, {{ date }}, {{ labels['viewed'] }}_{{date_accessed}}, {% if uri %}{{ uri }}{% else %}{% if doi %}DOI: {{ doi | join: ', ' }}{% endif %}{% endif %} ."
|
14
|
+
book: "{{creatornames}}, <em>{{title}}</em>, {{ edition }}, {{place}}: {{publisher}}, {{date}}, {{ labels['viewed'] }}_{{date_accessed}}, {% if uri %}{{ uri }}{% else %}{% if doi %}DOI: {{ doi | join: ', ' }}{% endif %}{% endif %} ."
|
15
15
|
techreport: book
|
16
16
|
booklet: book
|
17
17
|
manual: book
|
18
18
|
proceedings: book
|
19
|
-
inproceedings: "{{ creatornames }}, “{{ title }},” <em>{{host_title}}</em>, {{place}}, {{extent}}, {{date}}, {{ labels['viewed'] }}_{{date_accessed}}, {{ uri }} ."
|
20
|
-
inbook: "{{ creatornames }}, “{{ title }},” {{ labels['in'] }} {{ host_creatornames}} ({{ host_role}}) : <em>{{host_title}}</em>, {{place}}: {{publisher}}, {{date}}, {{extent}}, {{ labels['viewed'] }}_{{date_accessed}}, {{ uri }} ."
|
19
|
+
inproceedings: "{{ creatornames }}, “{{ title }},” <em>{{host_title}}</em>, {{place}}, {{extent}}, {{date}}, {{ labels['viewed'] }}_{{date_accessed}}, {% if uri %}{{ uri }}{% else %}{% if doi %}DOI: {{ doi | join: ', ' }}{% endif %}{% endif %} ."
|
20
|
+
inbook: "{{ creatornames }}, “{{ title }},” {{ labels['in'] }} {{ host_creatornames}} ({{ host_role}}) : <em>{{host_title}}</em>, {{place}}: {{publisher}}, {{date}}, {{extent}}, {{ labels['viewed'] }}_{{date_accessed}}, {% if uri %}{{ uri }}{% else %}{% if doi %}DOI: {{ doi | join: ', ' }}{% endif %}{% endif %} ."
|
21
21
|
incollection: inbook
|
22
|
-
thesis: "{{ creatornames }} , “{{ title }}.” {{ medium | capitalize }}, {{ publisher }}, {{ date }}, {{ labels['viewed'] }}_{{date_accessed}}, {{ uri }} ."
|
22
|
+
thesis: "{{ creatornames }} , “{{ title }}.” {{ medium | capitalize }}, {{ publisher }}, {{ date }}, {{ labels['viewed'] }}_{{date_accessed}}, {% if uri %}{{ uri }}{% else %}{% if doi %}DOI: {{ doi | join: ', ' }}{% endif %}{% endif %} ."
|
23
23
|
unpublished: thesis
|
24
24
|
misc: thesis
|
25
25
|
website: thesis
|
data/metanorma-ieee.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.require_paths = ["lib"]
|
26
26
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
27
27
|
|
28
|
-
spec.add_dependency "metanorma-standoc", "~> 2.
|
28
|
+
spec.add_dependency "metanorma-standoc", "~> 2.6.0"
|
29
29
|
spec.add_dependency "mnconvert", "~> 1.20"
|
30
30
|
#spec.add_dependency "pubid-ieee", "~> 0.1.1"
|
31
31
|
#spec.add_dependency "pubid-iso", "~> 0.5.3"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ieee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.6.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.6.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mnconvert
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -224,21 +224,34 @@ files:
|
|
224
224
|
- lib/html2doc/ieee.rb
|
225
225
|
- lib/html2doc/ieee/lists.rb
|
226
226
|
- lib/html2doc/ieee/notes.rb
|
227
|
+
- lib/html2doc/ieee_wp.rb
|
228
|
+
- lib/html2doc/ieee_wp/lists.rb
|
227
229
|
- lib/isodoc/ieee.rb
|
228
230
|
- lib/isodoc/ieee/base_convert.rb
|
229
231
|
- lib/isodoc/ieee/html/header.html
|
230
232
|
- lib/isodoc/ieee/html/header_amd.html
|
233
|
+
- lib/isodoc/ieee/html/header_wp.html
|
231
234
|
- lib/isodoc/ieee/html/html_ieee_intro.html
|
232
235
|
- lib/isodoc/ieee/html/html_ieee_titlepage.html
|
233
236
|
- lib/isodoc/ieee/html/htmlstyle.css
|
234
237
|
- lib/isodoc/ieee/html/htmlstyle.scss
|
235
238
|
- lib/isodoc/ieee/html/ieee.css
|
236
239
|
- lib/isodoc/ieee/html/ieee.scss
|
240
|
+
- lib/isodoc/ieee/html/ieee_wp.css
|
241
|
+
- lib/isodoc/ieee/html/ieee_wp.scss
|
237
242
|
- lib/isodoc/ieee/html/scripts.html
|
243
|
+
- lib/isodoc/ieee/html/word_ieee_colophon_wp.html
|
238
244
|
- lib/isodoc/ieee/html/word_ieee_intro.html
|
245
|
+
- lib/isodoc/ieee/html/word_ieee_intro_wp.html
|
239
246
|
- lib/isodoc/ieee/html/word_ieee_titlepage.html
|
247
|
+
- lib/isodoc/ieee/html/word_ieee_titlepage_wp.html
|
240
248
|
- lib/isodoc/ieee/html/wordstyle.css
|
241
249
|
- lib/isodoc/ieee/html/wordstyle.scss
|
250
|
+
- lib/isodoc/ieee/html/wordstyle_wp.css
|
251
|
+
- lib/isodoc/ieee/html/wordstyle_wp.scss
|
252
|
+
- lib/isodoc/ieee/html/wp_image001.emz
|
253
|
+
- lib/isodoc/ieee/html/wp_image003.emz
|
254
|
+
- lib/isodoc/ieee/html/wp_image008.emz
|
242
255
|
- lib/isodoc/ieee/html_convert.rb
|
243
256
|
- lib/isodoc/ieee/i18n-en.yaml
|
244
257
|
- lib/isodoc/ieee/i18n.rb
|
@@ -257,6 +270,8 @@ files:
|
|
257
270
|
- lib/isodoc/ieee/word_cleanup.rb
|
258
271
|
- lib/isodoc/ieee/word_cleanup_blocks.rb
|
259
272
|
- lib/isodoc/ieee/word_convert.rb
|
273
|
+
- lib/isodoc/ieee/word_wp_cleanup.rb
|
274
|
+
- lib/isodoc/ieee/word_wp_convert.rb
|
260
275
|
- lib/isodoc/ieee/xref.rb
|
261
276
|
- lib/metanorma-ieee.rb
|
262
277
|
- lib/metanorma/ieee.rb
|
@@ -264,6 +279,7 @@ files:
|
|
264
279
|
- lib/metanorma/ieee/biblio-standoc.rng
|
265
280
|
- lib/metanorma/ieee/biblio.rng
|
266
281
|
- lib/metanorma/ieee/boilerplate.adoc
|
282
|
+
- lib/metanorma/ieee/boilerplate_wp.adoc
|
267
283
|
- lib/metanorma/ieee/cleanup.rb
|
268
284
|
- lib/metanorma/ieee/cleanup_ref.rb
|
269
285
|
- lib/metanorma/ieee/converter.rb
|