metanorma-iso 1.9.4 → 1.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ubuntu.yml +41 -0
- data/Gemfile +3 -4
- data/Makefile +44 -0
- data/Rakefile +1 -1
- data/bin/rspec +1 -2
- data/lib/asciidoctor/iso/basicdoc.rng +32 -5
- data/lib/asciidoctor/iso/biblio.rng +2 -0
- data/lib/asciidoctor/iso/cleanup.rb +7 -6
- data/lib/asciidoctor/iso/front.rb +9 -1
- data/lib/asciidoctor/iso/isodoc.rng +430 -76
- data/lib/asciidoctor/iso/isostandard-amd.rng +1 -1
- data/lib/asciidoctor/iso/isostandard.rng +9 -23
- data/lib/asciidoctor/iso/reqt.rng +24 -3
- data/lib/asciidoctor/iso/validate.rb +7 -7
- data/lib/asciidoctor/iso/validate_section.rb +1 -1
- data/lib/isodoc/iso/html/isodoc.css +1 -2
- data/lib/isodoc/iso/html/isodoc.scss +1 -1
- data/lib/isodoc/iso/html/wordstyle.css +16 -4
- data/lib/isodoc/iso/html/wordstyle.scss +16 -4
- data/lib/isodoc/iso/i18n.rb +10 -9
- data/lib/isodoc/iso/iso.amendment.xsl +200 -20
- data/lib/isodoc/iso/iso.international-standard.xsl +200 -20
- data/lib/isodoc/iso/presentation_xml_convert.rb +9 -10
- data/lib/isodoc/iso/sections.rb +2 -0
- data/lib/isodoc/iso/word_cleanup.rb +94 -0
- data/lib/isodoc/iso/word_convert.rb +12 -89
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +4 -3
- data/spec/asciidoctor/base_spec.rb +685 -178
- data/spec/asciidoctor/blank_spec.rb +38 -0
- data/spec/asciidoctor/blocks_spec.rb +22 -47
- data/spec/asciidoctor/cleanup_spec.rb +34 -20
- data/spec/asciidoctor/inline_spec.rb +10 -2
- data/spec/asciidoctor/refs_spec.rb +87 -4
- data/spec/asciidoctor/section_spec.rb +3 -3
- data/spec/isodoc/i18n_spec.rb +29 -15
- data/spec/isodoc/inline_spec.rb +56 -26
- data/spec/isodoc/section_spec.rb +1 -1
- data/spec/isodoc/table_spec.rb +6 -8
- data/spec/isodoc/terms_spec.rb +11 -11
- data/spec/isodoc/xref_spec.rb +1397 -1376
- data/spec/metanorma/processor_spec.rb +4 -1
- data/spec/spec_helper.rb +14 -1
- data/spec/vcr_cassettes/docrels.yml +783 -0
- data/spec/vcr_cassettes/sortrefs.yml +599 -0
- metadata +38 -19
@@ -1,5 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<grammar ns="https://www.metanorma.org/ns/iso" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<grammar ns="https://www.metanorma.org/ns/iso" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
3
|
<!-- default namespace isostandard = "https://www.metanorma.com/ns/iso" -->
|
4
4
|
<include href="isostandard.rng">
|
5
5
|
<start>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<grammar ns="https://www.metanorma.org/ns/iso" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<grammar ns="https://www.metanorma.org/ns/iso" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
3
|
<!-- default namespace isostandard = "https://www.metanorma.com/ns/iso" -->
|
4
4
|
<include href="isodoc.rng">
|
5
5
|
<start>
|
@@ -142,14 +142,9 @@
|
|
142
142
|
</optional>
|
143
143
|
<choice>
|
144
144
|
<choice>
|
145
|
-
<
|
146
|
-
<
|
147
|
-
|
148
|
-
</oneOrMore>
|
149
|
-
<zeroOrMore>
|
150
|
-
<ref name="note"/>
|
151
|
-
</zeroOrMore>
|
152
|
-
</group>
|
145
|
+
<oneOrMore>
|
146
|
+
<ref name="BasicBlock"/>
|
147
|
+
</oneOrMore>
|
153
148
|
<ref name="amend"/>
|
154
149
|
</choice>
|
155
150
|
<oneOrMore>
|
@@ -225,9 +220,6 @@
|
|
225
220
|
-->
|
226
221
|
<ref name="BasicBlock"/>
|
227
222
|
</zeroOrMore>
|
228
|
-
<zeroOrMore>
|
229
|
-
<ref name="note"/>
|
230
|
-
</zeroOrMore>
|
231
223
|
<zeroOrMore>
|
232
224
|
<ref name="clause-hanging-paragraph-with-footnote"/>
|
233
225
|
</zeroOrMore>
|
@@ -351,14 +343,9 @@
|
|
351
343
|
<ref name="section-title"/>
|
352
344
|
</optional>
|
353
345
|
<choice>
|
354
|
-
<
|
355
|
-
<
|
356
|
-
|
357
|
-
</zeroOrMore>
|
358
|
-
<zeroOrMore>
|
359
|
-
<ref name="note"/>
|
360
|
-
</zeroOrMore>
|
361
|
-
</group>
|
346
|
+
<zeroOrMore>
|
347
|
+
<ref name="BasicBlock"/>
|
348
|
+
</zeroOrMore>
|
362
349
|
<oneOrMore>
|
363
350
|
<ref name="content-subsection"/>
|
364
351
|
</oneOrMore>
|
@@ -372,6 +359,7 @@
|
|
372
359
|
-->
|
373
360
|
<define name="iso-standard">
|
374
361
|
<element name="iso-standard">
|
362
|
+
<a:documentation>Root element for xml document</a:documentation>
|
375
363
|
<attribute name="version"/>
|
376
364
|
<attribute name="type">
|
377
365
|
<choice>
|
@@ -475,9 +463,6 @@
|
|
475
463
|
<!-- allow hanging paragraphs in annexes: they introduce lists -->
|
476
464
|
<ref name="BasicBlock"/>
|
477
465
|
</zeroOrMore>
|
478
|
-
<zeroOrMore>
|
479
|
-
<ref name="note"/>
|
480
|
-
</zeroOrMore>
|
481
466
|
<zeroOrMore>
|
482
467
|
<ref name="clause-hanging-paragraph-with-footnote"/>
|
483
468
|
</zeroOrMore>
|
@@ -485,6 +470,7 @@
|
|
485
470
|
</define>
|
486
471
|
<define name="annex-appendix">
|
487
472
|
<element name="appendix">
|
473
|
+
<a:documentation>Appendix</a:documentation>
|
488
474
|
<ref name="Clause-Section"/>
|
489
475
|
</element>
|
490
476
|
</define>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
2
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
3
|
<!--
|
4
4
|
Presupposes isodoc.rnc, is included in it
|
5
5
|
include "isodoc.rnc" { }
|
@@ -58,6 +58,14 @@
|
|
58
58
|
<optional>
|
59
59
|
<attribute name="type"/>
|
60
60
|
</optional>
|
61
|
+
<optional>
|
62
|
+
<attribute name="tag"/>
|
63
|
+
</optional>
|
64
|
+
<optional>
|
65
|
+
<attribute name="multilingual-rendering">
|
66
|
+
<ref name="MultilingualRenderingType"/>
|
67
|
+
</attribute>
|
68
|
+
</optional>
|
61
69
|
<optional>
|
62
70
|
<ref name="reqtitle"/>
|
63
71
|
</optional>
|
@@ -101,7 +109,9 @@
|
|
101
109
|
</define>
|
102
110
|
<define name="label">
|
103
111
|
<element name="label">
|
104
|
-
<
|
112
|
+
<oneOrMore>
|
113
|
+
<ref name="TextElement"/>
|
114
|
+
</oneOrMore>
|
105
115
|
</element>
|
106
116
|
</define>
|
107
117
|
<define name="subject">
|
@@ -175,8 +185,19 @@
|
|
175
185
|
<data type="boolean"/>
|
176
186
|
</attribute>
|
177
187
|
</optional>
|
188
|
+
<optional>
|
189
|
+
<attribute name="tag"/>
|
190
|
+
</optional>
|
191
|
+
<optional>
|
192
|
+
<attribute name="multilingual-rendering">
|
193
|
+
<ref name="MultilingualRenderingType"/>
|
194
|
+
</attribute>
|
195
|
+
</optional>
|
178
196
|
<oneOrMore>
|
179
|
-
<
|
197
|
+
<choice>
|
198
|
+
<ref name="BasicBlock"/>
|
199
|
+
<ref name="component"/>
|
200
|
+
</choice>
|
180
201
|
</oneOrMore>
|
181
202
|
</define>
|
182
203
|
<define name="ObligationType">
|
@@ -63,7 +63,7 @@ module Asciidoctor
|
|
63
63
|
def locality_erefs_validate(root)
|
64
64
|
root.xpath("//eref[descendant::locality]").each do |t|
|
65
65
|
if /^(ISO|IEC)/.match?(t["citeas"]) &&
|
66
|
-
|
66
|
+
!/: ?(\d+{4}|–)$/.match?(t["citeas"])
|
67
67
|
@log.add("Style", t,
|
68
68
|
"undated reference #{t['citeas']} should not contain "\
|
69
69
|
"specific elements")
|
@@ -78,8 +78,8 @@ module Asciidoctor
|
|
78
78
|
# ISO/IEC DIR 2, 16.5.6
|
79
79
|
def termdef_style(xmldoc)
|
80
80
|
xmldoc.xpath("//term").each do |t|
|
81
|
-
para = t.at("./definition") || return
|
82
|
-
term = t.at("./preferred").text
|
81
|
+
para = t.at("./definition/verbaldefinition") || return
|
82
|
+
term = t.at("./preferred//name").text
|
83
83
|
termdef_warn(para.text, /\A(the|a)\b/i, t, term,
|
84
84
|
"term definition starts with article")
|
85
85
|
termdef_warn(para.text, /\.\Z/i, t, term,
|
@@ -90,10 +90,10 @@ module Asciidoctor
|
|
90
90
|
def doctype_validate(xmldoc)
|
91
91
|
doctype = xmldoc&.at("//bibdata/ext/doctype")&.text
|
92
92
|
%w(international-standard technical-specification technical-report
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
93
|
+
publicly-available-specification international-workshop-agreement
|
94
|
+
guide amendment technical-corrigendum).include? doctype or
|
95
|
+
@log.add("Document Attributes", nil,
|
96
|
+
"#{doctype} is not a recognised document type")
|
97
97
|
end
|
98
98
|
|
99
99
|
def script_validate(xmldoc)
|
@@ -216,7 +216,7 @@ module Asciidoctor
|
|
216
216
|
|
217
217
|
def asset_style(root)
|
218
218
|
root.xpath("//example | //termexample").each { |e| example_style(e) }
|
219
|
-
root.xpath("//definition").each { |e| definition_style(e) }
|
219
|
+
root.xpath("//definition/verbaldefinition").each { |e| definition_style(e) }
|
220
220
|
root.xpath("//note").each { |e| note_style(e) }
|
221
221
|
root.xpath("//fn").each { |e| footnote_style(e) }
|
222
222
|
root.xpath(ASSETS_TO_STYLE).each { |e| style(e, extract_text(e)) }
|
@@ -1,4 +1,3 @@
|
|
1
|
-
@charset "UTF-8";
|
2
1
|
p.Sourcecode, li.Sourcecode, div.Sourcecode, pre.Sourcecode {
|
3
2
|
mso-style-unhide: no;
|
4
3
|
mso-style-qformat: yes;
|
@@ -208,7 +207,7 @@ p.AnnexTableTitle, li.AnnexTableTitle, div.AnnexTableTitle {
|
|
208
207
|
mso-style-name: "Annex Table Title";
|
209
208
|
mso-style-unhide: no;
|
210
209
|
mso-style-qformat: yes;
|
211
|
-
mso-style-parent: "
|
210
|
+
mso-style-parent: "List Paragraph";
|
212
211
|
mso-style-link: "Annex Table Title Char";
|
213
212
|
margin-top: 0cm;
|
214
213
|
margin-right: 0cm;
|
@@ -197,7 +197,7 @@ p.AnnexTableTitle, li.AnnexTableTitle, div.AnnexTableTitle
|
|
197
197
|
{mso-style-name:"Annex Table Title";
|
198
198
|
mso-style-unhide:no;
|
199
199
|
mso-style-qformat:yes;
|
200
|
-
mso-style-parent:"
|
200
|
+
mso-style-parent:"List Paragraph";
|
201
201
|
mso-style-link:"Annex Table Title Char";
|
202
202
|
margin-top:0cm;
|
203
203
|
margin-right:0cm;
|
@@ -130,7 +130,7 @@ p.MsoBlockText, li.MsoBlockText, div.MsoBlockText {
|
|
130
130
|
p.MsoList, li.MsoList, div.MsoList {
|
131
131
|
mso-style-priority: 4;
|
132
132
|
mso-style-unhide: no;
|
133
|
-
mso-style-parent: "
|
133
|
+
mso-style-parent: "List Paragraph";
|
134
134
|
margin-top: 0cm;
|
135
135
|
margin-right: 0cm;
|
136
136
|
margin-bottom: 6.0pt;
|
@@ -151,7 +151,7 @@ p.MsoList, li.MsoList, div.MsoList {
|
|
151
151
|
p.MsoListCxSpFirst, li.MsoListCxSpFirst, div.MsoListCxSpFirst {
|
152
152
|
mso-style-priority: 4;
|
153
153
|
mso-style-unhide: no;
|
154
|
-
mso-style-parent: "
|
154
|
+
mso-style-parent: "List Paragraph";
|
155
155
|
mso-style-type: export-only;
|
156
156
|
margin-top: 0cm;
|
157
157
|
margin-right: 0cm;
|
@@ -173,7 +173,7 @@ p.MsoListCxSpFirst, li.MsoListCxSpFirst, div.MsoListCxSpFirst {
|
|
173
173
|
p.MsoListCxSpMiddle, li.MsoListCxSpMiddle, div.MsoListCxSpMiddle {
|
174
174
|
mso-style-priority: 4;
|
175
175
|
mso-style-unhide: no;
|
176
|
-
mso-style-parent: "
|
176
|
+
mso-style-parent: "List Paragraph";
|
177
177
|
mso-style-type: export-only;
|
178
178
|
margin-top: 0cm;
|
179
179
|
margin-right: 0cm;
|
@@ -195,7 +195,7 @@ p.MsoListCxSpMiddle, li.MsoListCxSpMiddle, div.MsoListCxSpMiddle {
|
|
195
195
|
p.MsoListCxSpLast, li.MsoListCxSpLast, div.MsoListCxSpLast {
|
196
196
|
mso-style-priority: 4;
|
197
197
|
mso-style-unhide: no;
|
198
|
-
mso-style-parent: "
|
198
|
+
mso-style-parent: "List Paragraph";
|
199
199
|
mso-style-type: export-only;
|
200
200
|
margin-top: 0cm;
|
201
201
|
margin-right: 0cm;
|
@@ -217,6 +217,7 @@ p.MsoListCxSpLast, li.MsoListCxSpLast, div.MsoListCxSpLast {
|
|
217
217
|
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
|
218
218
|
mso-style-priority: 34;
|
219
219
|
mso-style-unhide: no;
|
220
|
+
mso-style-name: "List Paragraph";
|
220
221
|
mso-style-qformat: yes;
|
221
222
|
margin-top: 0cm;
|
222
223
|
margin-right: 0cm;
|
@@ -292,6 +293,7 @@ h1 {
|
|
292
293
|
mso-style-priority: 1;
|
293
294
|
mso-style-unhide: no;
|
294
295
|
mso-style-qformat: yes;
|
296
|
+
mso-style-name: "Heading 1";
|
295
297
|
mso-style-link: "Heading 1 Char";
|
296
298
|
mso-style-next: Normal;
|
297
299
|
margin-top: 13.5pt;
|
@@ -360,6 +362,7 @@ h1.Annex {
|
|
360
362
|
mso-style-priority: 2;
|
361
363
|
mso-style-unhide: no;
|
362
364
|
mso-style-qformat: yes;
|
365
|
+
mso-style-name: "Heading 2";
|
363
366
|
mso-style-parent: "Heading 1";
|
364
367
|
mso-style-link: "Heading 2 Char";
|
365
368
|
mso-style-next: Normal;
|
@@ -396,6 +399,7 @@ h2 {
|
|
396
399
|
mso-style-priority: 3;
|
397
400
|
mso-style-unhide: no;
|
398
401
|
mso-style-qformat: yes;
|
402
|
+
mso-style-name: "Heading 3";
|
399
403
|
mso-style-parent: "Heading 1";
|
400
404
|
mso-style-link: "Heading 3 Char";
|
401
405
|
mso-style-next: Normal;
|
@@ -432,6 +436,7 @@ h3 {
|
|
432
436
|
mso-style-priority: 4;
|
433
437
|
mso-style-unhide: no;
|
434
438
|
mso-style-qformat: yes;
|
439
|
+
mso-style-name: "Heading 4";
|
435
440
|
mso-style-parent: "Heading 3";
|
436
441
|
mso-style-link: "Heading 4 Char";
|
437
442
|
mso-style-next: Normal;
|
@@ -466,6 +471,7 @@ h4 {
|
|
466
471
|
mso-style-priority: 5;
|
467
472
|
mso-style-unhide: no;
|
468
473
|
mso-style-qformat: yes;
|
474
|
+
mso-style-name: "Heading 5";
|
469
475
|
mso-style-parent: "Heading 4";
|
470
476
|
mso-style-link: "Heading 5 Char";
|
471
477
|
mso-style-next: Normal;
|
@@ -500,6 +506,7 @@ h6 {
|
|
500
506
|
mso-style-priority: 6;
|
501
507
|
mso-style-unhide: no;
|
502
508
|
mso-style-qformat: yes;
|
509
|
+
mso-style-name: "Heading 6";
|
503
510
|
mso-style-parent: "Heading 5";
|
504
511
|
mso-style-link: "Heading 6 Char";
|
505
512
|
mso-style-next: Normal;
|
@@ -533,6 +540,7 @@ h6 {
|
|
533
540
|
p.MsoToc1, li.MsoToc1, div.MsoToc1 {
|
534
541
|
mso-style-priority: 39;
|
535
542
|
mso-style-unhide: no;
|
543
|
+
mso-style-name: "TOC 1";
|
536
544
|
mso-style-next: Normal;
|
537
545
|
margin-top: 6.0pt;
|
538
546
|
margin-right: 25.0pt;
|
@@ -555,6 +563,7 @@ p.MsoToc2, li.MsoToc2, div.MsoToc2 {
|
|
555
563
|
mso-style-noshow: yes;
|
556
564
|
mso-style-priority: 39;
|
557
565
|
mso-style-unhide: no;
|
566
|
+
mso-style-name: "TOC 2";
|
558
567
|
mso-style-parent: "TOC 1";
|
559
568
|
mso-style-next: Normal;
|
560
569
|
margin-top: 0cm;
|
@@ -578,6 +587,7 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3 {
|
|
578
587
|
mso-style-noshow: yes;
|
579
588
|
mso-style-priority: 39;
|
580
589
|
mso-style-unhide: no;
|
590
|
+
mso-style-name: "TOC 3";
|
581
591
|
mso-style-parent: "TOC 2";
|
582
592
|
mso-style-next: Normal;
|
583
593
|
margin-top: 0cm;
|
@@ -683,6 +693,7 @@ p.MsoFooterLandscape, li.MsoFooterLandscape, div.MsoFooterLandscape {
|
|
683
693
|
|
684
694
|
span.MsoFootnoteReference {
|
685
695
|
mso-style-priority: 99;
|
696
|
+
mso-style-name: "Footnote Reference";
|
686
697
|
vertical-align: super; }
|
687
698
|
|
688
699
|
p.MsoCaption, li.MsoCaption, div.MsoCaption {
|
@@ -1084,6 +1095,7 @@ span.BodyTextChar, span.Char3 {
|
|
1084
1095
|
p.MsoCommentText, li.MsoCommentText, div.MsoCommentText {
|
1085
1096
|
mso-style-noshow: yes;
|
1086
1097
|
mso-style-priority: 99;
|
1098
|
+
mso-style-name: "Comment Text";
|
1087
1099
|
mso-style-link: "Comment Text Char";
|
1088
1100
|
margin-top: 0cm;
|
1089
1101
|
margin-right: 0cm;
|
@@ -118,7 +118,7 @@ p.MsoBlockText, li.MsoBlockText, div.MsoBlockText
|
|
118
118
|
p.MsoList, li.MsoList, div.MsoList
|
119
119
|
{mso-style-priority:4;
|
120
120
|
mso-style-unhide:no;
|
121
|
-
mso-style-parent:"
|
121
|
+
mso-style-parent:"List Paragraph";
|
122
122
|
margin-top:0cm;
|
123
123
|
margin-right:0cm;
|
124
124
|
margin-bottom:6.0pt;
|
@@ -138,7 +138,7 @@ p.MsoList, li.MsoList, div.MsoList
|
|
138
138
|
p.MsoListCxSpFirst, li.MsoListCxSpFirst, div.MsoListCxSpFirst
|
139
139
|
{mso-style-priority:4;
|
140
140
|
mso-style-unhide:no;
|
141
|
-
mso-style-parent:"
|
141
|
+
mso-style-parent:"List Paragraph";
|
142
142
|
mso-style-type:export-only;
|
143
143
|
margin-top:0cm;
|
144
144
|
margin-right:0cm;
|
@@ -159,7 +159,7 @@ p.MsoListCxSpFirst, li.MsoListCxSpFirst, div.MsoListCxSpFirst
|
|
159
159
|
p.MsoListCxSpMiddle, li.MsoListCxSpMiddle, div.MsoListCxSpMiddle
|
160
160
|
{mso-style-priority:4;
|
161
161
|
mso-style-unhide:no;
|
162
|
-
mso-style-parent:"
|
162
|
+
mso-style-parent:"List Paragraph";
|
163
163
|
mso-style-type:export-only;
|
164
164
|
margin-top:0cm;
|
165
165
|
margin-right:0cm;
|
@@ -180,7 +180,7 @@ p.MsoListCxSpMiddle, li.MsoListCxSpMiddle, div.MsoListCxSpMiddle
|
|
180
180
|
p.MsoListCxSpLast, li.MsoListCxSpLast, div.MsoListCxSpLast
|
181
181
|
{mso-style-priority:4;
|
182
182
|
mso-style-unhide:no;
|
183
|
-
mso-style-parent:"
|
183
|
+
mso-style-parent:"List Paragraph";
|
184
184
|
mso-style-type:export-only;
|
185
185
|
margin-top:0cm;
|
186
186
|
margin-right:0cm;
|
@@ -201,6 +201,7 @@ p.MsoListCxSpLast, li.MsoListCxSpLast, div.MsoListCxSpLast
|
|
201
201
|
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
|
202
202
|
{mso-style-priority:34;
|
203
203
|
mso-style-unhide:no;
|
204
|
+
mso-style-name:"List Paragraph";
|
204
205
|
mso-style-qformat:yes;
|
205
206
|
margin-top:0cm;
|
206
207
|
margin-right:0cm;
|
@@ -272,6 +273,7 @@ h1
|
|
272
273
|
{mso-style-priority:1;
|
273
274
|
mso-style-unhide:no;
|
274
275
|
mso-style-qformat:yes;
|
276
|
+
mso-style-name:"Heading 1";
|
275
277
|
mso-style-link:"Heading 1 Char";
|
276
278
|
mso-style-next:Normal;
|
277
279
|
margin-top:13.5pt;
|
@@ -338,6 +340,7 @@ h1.Annex
|
|
338
340
|
{mso-style-priority:2;
|
339
341
|
mso-style-unhide:no;
|
340
342
|
mso-style-qformat:yes;
|
343
|
+
mso-style-name:"Heading 2";
|
341
344
|
mso-style-parent:"Heading 1";
|
342
345
|
mso-style-link:"Heading 2 Char";
|
343
346
|
mso-style-next:Normal;
|
@@ -373,6 +376,7 @@ h2
|
|
373
376
|
{mso-style-priority:3;
|
374
377
|
mso-style-unhide:no;
|
375
378
|
mso-style-qformat:yes;
|
379
|
+
mso-style-name:"Heading 3";
|
376
380
|
mso-style-parent:"Heading 1";
|
377
381
|
mso-style-link:"Heading 3 Char";
|
378
382
|
mso-style-next:Normal;
|
@@ -407,6 +411,7 @@ h3 {mso-list:l1 level3 lfo6;
|
|
407
411
|
{mso-style-priority:4;
|
408
412
|
mso-style-unhide:no;
|
409
413
|
mso-style-qformat:yes;
|
414
|
+
mso-style-name:"Heading 4";
|
410
415
|
mso-style-parent:"Heading 3";
|
411
416
|
mso-style-link:"Heading 4 Char";
|
412
417
|
mso-style-next:Normal;
|
@@ -439,6 +444,7 @@ h4 {mso-list:l1 level4 lfo6;
|
|
439
444
|
{mso-style-priority:5;
|
440
445
|
mso-style-unhide:no;
|
441
446
|
mso-style-qformat:yes;
|
447
|
+
mso-style-name:"Heading 5";
|
442
448
|
mso-style-parent:"Heading 4";
|
443
449
|
mso-style-link:"Heading 5 Char";
|
444
450
|
mso-style-next:Normal;
|
@@ -471,6 +477,7 @@ h6
|
|
471
477
|
{mso-style-priority:6;
|
472
478
|
mso-style-unhide:no;
|
473
479
|
mso-style-qformat:yes;
|
480
|
+
mso-style-name:"Heading 6";
|
474
481
|
mso-style-parent:"Heading 5";
|
475
482
|
mso-style-link:"Heading 6 Char";
|
476
483
|
mso-style-next:Normal;
|
@@ -502,6 +509,7 @@ h6 {mso-list:l1 level6 lfo6;
|
|
502
509
|
p.MsoToc1, li.MsoToc1, div.MsoToc1
|
503
510
|
{mso-style-priority:39;
|
504
511
|
mso-style-unhide:no;
|
512
|
+
mso-style-name:"TOC 1";
|
505
513
|
mso-style-next:Normal;
|
506
514
|
margin-top:6.0pt;
|
507
515
|
margin-right:25.0pt;
|
@@ -523,6 +531,7 @@ p.MsoToc2, li.MsoToc2, div.MsoToc2
|
|
523
531
|
{mso-style-noshow:yes;
|
524
532
|
mso-style-priority:39;
|
525
533
|
mso-style-unhide:no;
|
534
|
+
mso-style-name:"TOC 2";
|
526
535
|
mso-style-parent:"TOC 1";
|
527
536
|
mso-style-next:Normal;
|
528
537
|
margin-top:0cm;
|
@@ -545,6 +554,7 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3
|
|
545
554
|
{mso-style-noshow:yes;
|
546
555
|
mso-style-priority:39;
|
547
556
|
mso-style-unhide:no;
|
557
|
+
mso-style-name:"TOC 3";
|
548
558
|
mso-style-parent:"TOC 2";
|
549
559
|
mso-style-next:Normal;
|
550
560
|
margin-top:0cm;
|
@@ -645,6 +655,7 @@ p.MsoFooterLandscape, li.MsoFooterLandscape, div.MsoFooterLandscape
|
|
645
655
|
mso-ansi-language:EN-GB;}
|
646
656
|
span.MsoFootnoteReference
|
647
657
|
{mso-style-priority:99;
|
658
|
+
mso-style-name:"Footnote Reference";
|
648
659
|
vertical-align:super;}
|
649
660
|
p.MsoCaption, li.MsoCaption, div.MsoCaption
|
650
661
|
{mso-style-priority:35;
|
@@ -1022,6 +1033,7 @@ span.BodyTextChar, span.Char3
|
|
1022
1033
|
p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
|
1023
1034
|
{mso-style-noshow:yes;
|
1024
1035
|
mso-style-priority:99;
|
1036
|
+
mso-style-name:"Comment Text";
|
1025
1037
|
mso-style-link:"Comment Text Char";
|
1026
1038
|
margin-top:0cm;
|
1027
1039
|
margin-right:0cm;
|
data/lib/isodoc/iso/i18n.rb
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
module IsoDoc
|
2
2
|
module Iso
|
3
3
|
class I18n < IsoDoc::I18n
|
4
|
+
def load_file(fname)
|
5
|
+
YAML.load_file(File.join(File.dirname(__FILE__), fname))
|
6
|
+
end
|
7
|
+
|
4
8
|
def load_yaml1(lang, script)
|
5
|
-
y = if lang == "en"
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
else
|
12
|
-
YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
|
13
|
-
end
|
9
|
+
y = if lang == "en" then load_file("i18n-en.yaml")
|
10
|
+
elsif lang == "fr" then load_file("i18n-fr.yaml")
|
11
|
+
elsif lang == "zh" && script == "Hans"
|
12
|
+
load_file("i18n-zh-Hans.yaml")
|
13
|
+
else load_file("i18n-en.yaml")
|
14
|
+
end
|
14
15
|
super.merge(y)
|
15
16
|
end
|
16
17
|
end
|