metanorma-ieee 0.0.1 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.adoc +1 -1
- data/lib/html2doc/ieee/lists.rb +44 -0
- data/lib/html2doc/ieee/notes.rb +57 -0
- data/lib/html2doc/ieee.rb +4 -86
- data/lib/isodoc/ieee/base_convert.rb +56 -0
- data/lib/isodoc/ieee/html/header.html +1 -2
- data/lib/isodoc/ieee/html/header_amd.html +105 -0
- data/lib/isodoc/ieee/html/html_ieee_titlepage.html +14 -12
- data/lib/isodoc/ieee/html/htmlstyle.css +2 -1
- data/lib/isodoc/ieee/html/htmlstyle.scss +1 -0
- data/lib/isodoc/ieee/html/ieee.css +46 -273
- data/lib/isodoc/ieee/html/ieee.scss +46 -257
- data/lib/isodoc/ieee/html/word_ieee_intro.html +1 -1
- data/lib/isodoc/ieee/html/word_ieee_titlepage.html +12 -1
- data/lib/isodoc/ieee/html/wordstyle.css +20 -23
- data/lib/isodoc/ieee/html/wordstyle.scss +20 -17
- data/lib/isodoc/ieee/html_convert.rb +37 -1
- data/lib/isodoc/ieee/i18n-en.yaml +5 -0
- data/lib/isodoc/ieee/ieee.amendment.xsl +5488 -3540
- data/lib/isodoc/ieee/ieee.standard.xsl +5488 -3540
- data/lib/isodoc/ieee/metadata.rb +35 -51
- data/lib/isodoc/ieee/pdf_convert.rb +2 -2
- data/lib/isodoc/ieee/presentation_ref.rb +70 -0
- data/lib/isodoc/ieee/presentation_terms.rb +105 -32
- data/lib/isodoc/ieee/presentation_xml_convert.rb +136 -0
- data/lib/isodoc/ieee/word_authority.rb +73 -3
- data/lib/isodoc/ieee/word_cleanup.rb +55 -65
- data/lib/isodoc/ieee/word_cleanup_blocks.rb +151 -0
- data/lib/isodoc/ieee/word_convert.rb +98 -2
- data/lib/isodoc/ieee/xref.rb +31 -0
- data/lib/metanorma/ieee/boilerplate.xml +72 -23
- data/lib/metanorma/ieee/cleanup.rb +142 -77
- data/lib/metanorma/ieee/cleanup_ref.rb +126 -0
- data/lib/metanorma/ieee/converter.rb +8 -0
- data/lib/metanorma/ieee/front.rb +44 -53
- data/lib/metanorma/ieee/ieee.rng +44 -6
- data/lib/metanorma/ieee/isodoc.rng +32 -1
- data/lib/metanorma/ieee/reqt.rng +1 -1
- data/lib/metanorma/ieee/term_lookup_cleanup.rb +11 -0
- data/lib/metanorma/ieee/validate.rb +105 -57
- data/lib/metanorma/ieee/validate_section.rb +14 -7
- data/lib/metanorma/ieee/validate_style.rb +58 -1
- data/lib/metanorma/ieee/version.rb +1 -1
- data/lib/relaton/render/config.yml +44 -0
- data/lib/relaton/render/general.rb +13 -0
- data/metanorma-itu.gemspec +1 -1
- metadata +13 -4
@@ -103,12 +103,11 @@ h1, .h1
|
|
103
103
|
mso-ansi-language:EN-US;
|
104
104
|
mso-fareast-language:JA;
|
105
105
|
font-weight:bold;
|
106
|
-
mso-bidi-font-weight:normal;
|
107
|
-
h1 {
|
106
|
+
mso-bidi-font-weight:normal;
|
108
107
|
mso-outline-level:1;
|
109
108
|
mso-list:l13 level1 lfo33;
|
110
109
|
}
|
111
|
-
h2
|
110
|
+
h2
|
112
111
|
{mso-style-priority:2;
|
113
112
|
mso-style-unhide:no;
|
114
113
|
mso-style-qformat:yes;
|
@@ -130,12 +129,11 @@ h2, .h2
|
|
130
129
|
mso-ansi-language:EN-US;
|
131
130
|
mso-fareast-language:JA;
|
132
131
|
font-weight:bold;
|
133
|
-
mso-bidi-font-weight:normal;
|
134
|
-
h2 {
|
132
|
+
mso-bidi-font-weight:normal;
|
135
133
|
mso-outline-level:2;
|
136
134
|
mso-list:l13 level2 lfo33;
|
137
135
|
}
|
138
|
-
h3
|
136
|
+
h3
|
139
137
|
{mso-style-priority:3;
|
140
138
|
mso-style-unhide:no;
|
141
139
|
mso-style-qformat:yes;
|
@@ -156,12 +154,11 @@ h3, .h3
|
|
156
154
|
mso-ansi-language:EN-US;
|
157
155
|
mso-fareast-language:JA;
|
158
156
|
font-weight:bold;
|
159
|
-
mso-bidi-font-weight:normal;
|
160
|
-
h3 {
|
157
|
+
mso-bidi-font-weight:normal;
|
161
158
|
mso-outline-level:3;
|
162
159
|
mso-list:l13 level3 lfo33;
|
163
160
|
}
|
164
|
-
h4
|
161
|
+
h4
|
165
162
|
{mso-style-priority:4;
|
166
163
|
mso-style-parent:"Heading 3";
|
167
164
|
mso-style-next:"IEEEStds Paragraph";
|
@@ -180,12 +177,11 @@ h4, .h4
|
|
180
177
|
mso-ansi-language:EN-US;
|
181
178
|
mso-fareast-language:JA;
|
182
179
|
font-weight:bold;
|
183
|
-
mso-bidi-font-weight:normal;
|
184
|
-
h4 {
|
180
|
+
mso-bidi-font-weight:normal;
|
185
181
|
mso-outline-level:4;
|
186
182
|
mso-list:l1 level4 lfo6;
|
187
183
|
}
|
188
|
-
h5
|
184
|
+
h5
|
189
185
|
{mso-style-priority:5;
|
190
186
|
mso-style-unhide:no;
|
191
187
|
mso-style-qformat:yes;
|
@@ -206,12 +202,11 @@ h5, .h5
|
|
206
202
|
mso-ansi-language:EN-US;
|
207
203
|
mso-fareast-language:JA;
|
208
204
|
font-weight:bold;
|
209
|
-
mso-bidi-font-weight:normal;
|
210
|
-
h5 {
|
205
|
+
mso-bidi-font-weight:normal;
|
211
206
|
mso-outline-level:5;
|
212
207
|
mso-list:l13 level5 lfo33;
|
213
208
|
}
|
214
|
-
h6
|
209
|
+
h6
|
215
210
|
{mso-style-priority:6;
|
216
211
|
mso-style-unhide:no;
|
217
212
|
mso-style-qformat:yes;
|
@@ -232,8 +227,7 @@ h6, .h6
|
|
232
227
|
mso-ansi-language:EN-US;
|
233
228
|
mso-fareast-language:JA;
|
234
229
|
font-weight:bold;
|
235
|
-
mso-bidi-font-weight:normal;
|
236
|
-
h6 {
|
230
|
+
mso-bidi-font-weight:normal;
|
237
231
|
mso-outline-level:6;
|
238
232
|
mso-list:l13 level6 lfo33;
|
239
233
|
}
|
@@ -468,6 +462,7 @@ p.MsoToc1, li.MsoToc1, div.MsoToc1
|
|
468
462
|
mso-hyphenate:none;
|
469
463
|
font-size:$smallerfontsize;
|
470
464
|
font-family:$bodyfont;
|
465
|
+
tab-stops:right dotted 431.5pt;
|
471
466
|
mso-fareast-font-family:"Times New Roman";
|
472
467
|
mso-ansi-language:EN-US;
|
473
468
|
mso-fareast-language:JA;}
|
@@ -485,6 +480,7 @@ p.MsoToc2, li.MsoToc2, div.MsoToc2
|
|
485
480
|
mso-hyphenate:none;
|
486
481
|
font-size:$smallerfontsize;
|
487
482
|
font-family:$bodyfont;
|
483
|
+
tab-stops:right dotted 431.5pt;
|
488
484
|
mso-fareast-font-family:"Times New Roman";
|
489
485
|
mso-ansi-language:EN-US;
|
490
486
|
mso-fareast-language:JA;}
|
@@ -501,6 +497,7 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3
|
|
501
497
|
font-size:$smallerfontsize;
|
502
498
|
mso-bidi-font-size:10.0pt;
|
503
499
|
font-family:$bodyfont;
|
500
|
+
tab-stops:right dotted 431.5pt;
|
504
501
|
mso-fareast-font-family:"Times New Roman";
|
505
502
|
mso-ansi-language:EN-US;
|
506
503
|
mso-fareast-language:JA;}
|
@@ -516,6 +513,7 @@ p.MsoToc4, li.MsoToc4, div.MsoToc4
|
|
516
513
|
mso-pagination:widow-orphan;
|
517
514
|
font-size:$smallerfontsize;
|
518
515
|
font-family:$bodyfont;
|
516
|
+
tab-stops:right dotted 431.5pt;
|
519
517
|
mso-fareast-font-family:"MS Mincho";
|
520
518
|
mso-ansi-language:EN-US;
|
521
519
|
mso-fareast-language:JA;}
|
@@ -531,6 +529,7 @@ p.MsoToc5, li.MsoToc5, div.MsoToc5
|
|
531
529
|
mso-pagination:widow-orphan;
|
532
530
|
font-size:$smallerfontsize;
|
533
531
|
font-family:$bodyfont;
|
532
|
+
tab-stops:right dotted 431.5pt;
|
534
533
|
mso-fareast-font-family:"MS Mincho";
|
535
534
|
mso-ansi-language:EN-US;
|
536
535
|
mso-fareast-language:JA;}
|
@@ -546,6 +545,7 @@ p.MsoToc6, li.MsoToc6, div.MsoToc6
|
|
546
545
|
mso-pagination:widow-orphan;
|
547
546
|
font-size:$smallerfontsize;
|
548
547
|
font-family:$bodyfont;
|
548
|
+
tab-stops:right dotted 431.5pt;
|
549
549
|
mso-fareast-font-family:"MS Mincho";
|
550
550
|
mso-ansi-language:EN-US;
|
551
551
|
mso-fareast-language:JA;}
|
@@ -561,6 +561,7 @@ p.MsoToc7, li.MsoToc7, div.MsoToc7
|
|
561
561
|
mso-pagination:widow-orphan;
|
562
562
|
font-size:$smallerfontsize;
|
563
563
|
font-family:$bodyfont;
|
564
|
+
tab-stops:right dotted 431.5pt;
|
564
565
|
mso-fareast-font-family:"MS Mincho";
|
565
566
|
mso-ansi-language:EN-US;
|
566
567
|
mso-fareast-language:JA;}
|
@@ -576,6 +577,7 @@ p.MsoToc8, li.MsoToc8, div.MsoToc8
|
|
576
577
|
mso-pagination:widow-orphan;
|
577
578
|
font-size:$smallerfontsize;
|
578
579
|
font-family:$bodyfont;
|
580
|
+
tab-stops:right dotted 431.5pt;
|
579
581
|
mso-fareast-font-family:"MS Mincho";
|
580
582
|
mso-ansi-language:EN-US;
|
581
583
|
mso-fareast-language:JA;}
|
@@ -591,6 +593,7 @@ p.MsoToc9, li.MsoToc9, div.MsoToc9
|
|
591
593
|
mso-pagination:widow-orphan;
|
592
594
|
font-size:$smallerfontsize;
|
593
595
|
font-family:$bodyfont;
|
596
|
+
tab-stops:right dotted 431.5pt;
|
594
597
|
mso-fareast-font-family:"MS Mincho";
|
595
598
|
mso-ansi-language:EN-US;
|
596
599
|
mso-fareast-language:JA;}
|
@@ -37,7 +37,7 @@ module IsoDoc
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def html_cleanup(html)
|
40
|
-
para_type_strip(super)
|
40
|
+
para_type_strip(affiliation_table(super))
|
41
41
|
end
|
42
42
|
|
43
43
|
def para_type_strip(html)
|
@@ -45,6 +45,42 @@ module IsoDoc
|
|
45
45
|
html
|
46
46
|
end
|
47
47
|
|
48
|
+
def affiliation_table(html)
|
49
|
+
html.xpath("//p[@type = 'officeorgrepmemberhdr']").each do |p|
|
50
|
+
affiliation_table1(p)
|
51
|
+
end
|
52
|
+
html
|
53
|
+
end
|
54
|
+
|
55
|
+
def affiliation_table1(para)
|
56
|
+
ret = "<table><thead>#{para_to_tr(para)}</thead><tbody>"
|
57
|
+
n = para.next_element
|
58
|
+
while n.name == "p" && n["type"] == "officeorgrepmember"
|
59
|
+
n1 = n.next_element
|
60
|
+
ret += para_to_tr(n.remove)
|
61
|
+
n = n1
|
62
|
+
end
|
63
|
+
ret += "</tbody></table>"
|
64
|
+
para.replace(ret)
|
65
|
+
end
|
66
|
+
|
67
|
+
def para_to_tr(para)
|
68
|
+
ret = para.children.each_with_object([[]]) do |c, m|
|
69
|
+
if c.name == "tab" then m << []
|
70
|
+
else m[-1] << c.to_xml
|
71
|
+
end
|
72
|
+
end.map { |c| "<td>#{c.join}</td>" }
|
73
|
+
"<tr>#{ret.join}</tr>"
|
74
|
+
end
|
75
|
+
|
76
|
+
def clausedelimspace(node, out)
|
77
|
+
if node.at("./ancestor::xmlns:p[@type = 'officeorgrepmemberhdr'"\
|
78
|
+
" or @type = 'officeorgrepmember']")
|
79
|
+
out.tab
|
80
|
+
else super
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
48
84
|
include BaseConvert
|
49
85
|
include Init
|
50
86
|
end
|
@@ -7,6 +7,11 @@ termsdefsymbols: Definitions, acronyms and abbreviations
|
|
7
7
|
termsdefabbrev: Definitions, acronyms and abbreviations
|
8
8
|
formula: Equation
|
9
9
|
inequality: Inequality
|
10
|
+
termnote: NOTE
|
11
|
+
example: Example
|
12
|
+
table_of_contents: Contents
|
13
|
+
viewed: accessed
|
14
|
+
adapted_from: "adapted from "
|
10
15
|
doctype_abbrev:
|
11
16
|
standard: Std.
|
12
17
|
recommended-practice: Rec. Prac.
|