metanorma-unece 0.2.13 → 0.2.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/unece/converter.rb +3 -9
- data/lib/asciidoctor/unece/unece.rng +1 -1
- data/lib/isodoc/unece/html/header.html +66 -5
- data/lib/isodoc/unece/html/unece.scss +8 -8
- data/lib/isodoc/unece/html/wordstyle.scss +22 -0
- data/lib/isodoc/unece/html_convert.rb +1 -1
- data/lib/isodoc/unece/pdf_convert.rb +1 -1
- data/lib/isodoc/unece/word_convert.rb +1 -1
- data/lib/metanorma/unece/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbeb1945111d64732470050011044711324f18faa31d6f99012fc5bab95c556f
|
4
|
+
data.tar.gz: b5da6d4b27c5396cfeb942eb5692d8f20c97539858adb9dc4ce2b89a9c2e82c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0a10e0f22ff39dfeadd05b27d28074f490475cdd7a350a47ee7b60cb7712bd0b07dac8ed7c0874084484f550180689b2a94ef1fdee359137320c99e4401b0c9
|
7
|
+
data.tar.gz: a084084af12e471c1cea17063aa7290028a8035bf11f229007cab9b90a3564d2a41fc620b10a381ccf7fb215c660ea3f246a0cefd8873f219fbd1472590c17d3
|
@@ -10,6 +10,8 @@ module Asciidoctor
|
|
10
10
|
# schema encapsulation of the document for validation
|
11
11
|
#
|
12
12
|
class Converter < Standoc::Converter
|
13
|
+
XML_ROOT_TAG = "unece-standard".freeze
|
14
|
+
XML_NAMESPACE = "https://www.metanorma.com/ns/unece".freeze
|
13
15
|
|
14
16
|
register_for "unece"
|
15
17
|
|
@@ -118,16 +120,8 @@ module Asciidoctor
|
|
118
120
|
end
|
119
121
|
|
120
122
|
def makexml(node)
|
121
|
-
result = ["<?xml version='1.0' encoding='UTF-8'?>\n<unece-standard>"]
|
122
123
|
@draft = node.attributes.has_key?("draft")
|
123
|
-
|
124
|
-
result << noko { |ixml| middle node, ixml }
|
125
|
-
result << "</unece-standard>"
|
126
|
-
result = textcleanup(result)
|
127
|
-
ret1 = cleanup(Nokogiri::XML(result))
|
128
|
-
validate(ret1) unless @novalid
|
129
|
-
ret1.root.add_namespace(nil, Metanorma::Unece::DOCUMENT_NAMESPACE)
|
130
|
-
ret1
|
124
|
+
super
|
131
125
|
end
|
132
126
|
|
133
127
|
def doctype(node)
|
@@ -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 ns="https://www.metanorma.com/ns/unece" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
3
|
<!--
|
4
4
|
Currently we inherit from a namespaced grammar, isostandard. Until we inherit from isodoc,
|
5
5
|
we cannot have a new default namespace: we will end up with a grammar with two different
|
@@ -84,7 +84,6 @@ exactly'></p>
|
|
84
84
|
</div>
|
85
85
|
|
86
86
|
<div style='mso-element:header' id=eh2>
|
87
|
-
|
88
87
|
<p class=MsoHeader align=center style='text-align:center;line-height:12.0pt;
|
89
88
|
mso-line-height-rule:exactly'><span lang=EN-GB><b>{{ formatted_docnumber }}</b></span></p>
|
90
89
|
|
@@ -99,6 +98,21 @@ lang=EN-US><o:p> </o:p></span></p>
|
|
99
98
|
</div>
|
100
99
|
</div>
|
101
100
|
|
101
|
+
<div style='mso-element:header' id=eh2l>
|
102
|
+
<p class=MsoHeaderLandscape align=center style='text-align:center;line-height:12.0pt;
|
103
|
+
mso-line-height-rule:exactly'><span lang=EN-GB><b>{{ formatted_docnumber }}</b></span></p>
|
104
|
+
|
105
|
+
<div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;
|
106
|
+
mso-border-bottom-alt:solid windowtext .5pt;padding:0cm 0cm 1.0pt 0cm'>
|
107
|
+
|
108
|
+
<p class=MsoHeaderLandscape align=center style='margin-bottom:12.0pt;text-align:center;
|
109
|
+
line-height:12.0pt;mso-line-height-rule:exactly;border:none;mso-border-bottom-alt:
|
110
|
+
solid windowtext .5pt;padding:0cm;mso-padding-alt:0cm 0cm 1.0pt 0cm'><span
|
111
|
+
lang=EN-US><o:p> </o:p></span></p>
|
112
|
+
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
|
102
116
|
<div style='mso-element:header' id=h2>
|
103
117
|
|
104
118
|
<p class=MsoHeader align=center style='text-align:center;line-height:12.0pt;
|
@@ -115,19 +129,40 @@ lang=EN-US><o:p> </o:p></span></p>
|
|
115
129
|
</div>
|
116
130
|
</div>
|
117
131
|
|
118
|
-
<div style='mso-element:
|
132
|
+
<div style='mso-element:header' id=h2l>
|
119
133
|
|
134
|
+
<p class=MsoHeaderLandscape align=center style='text-align:center;line-height:12.0pt;
|
135
|
+
mso-line-height-rule:exactly'><span lang=EN-GB><b>{{ formatted_docnumber }}</b></span></p>
|
136
|
+
|
137
|
+
<div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;
|
138
|
+
mso-border-bottom-alt:solid windowtext .5pt;padding:0cm 0cm 1.0pt 0cm'>
|
139
|
+
|
140
|
+
<p class=MsoHeaderLandscape align=center style='margin-bottom:12.0pt;text-align:center;
|
141
|
+
line-height:12.0pt;mso-line-height-rule:exactly;border:none;mso-border-bottom-alt:
|
142
|
+
solid windowtext .5pt;padding:0cm;mso-padding-alt:0cm 0cm 1.0pt 0cm'><span
|
143
|
+
lang=EN-US><o:p> </o:p></span></p>
|
144
|
+
|
145
|
+
</div>
|
146
|
+
</div>
|
147
|
+
|
148
|
+
|
149
|
+
<div style='mso-element:footer' id=ef2>
|
120
150
|
<p class=MsoFooter style='line-height:12.0pt;mso-line-height-rule:exactly'></p>
|
121
151
|
</div>
|
122
152
|
|
123
|
-
<div style='mso-element:footer' id=
|
153
|
+
<div style='mso-element:footer' id=ef2l>
|
154
|
+
<p class=MsoFooterLandscape style='line-height:12.0pt;mso-line-height-rule:exactly'></p>
|
155
|
+
</div>
|
124
156
|
|
157
|
+
<div style='mso-element:footer' id=f2>
|
125
158
|
<p class=MsoFooter style='line-height:12.0pt'></p>
|
159
|
+
</div>
|
126
160
|
|
161
|
+
<div style='mso-element:footer' id=f2l>
|
162
|
+
<p class=MsoFooterLandscape style='line-height:12.0pt'></p>
|
127
163
|
</div>
|
128
164
|
|
129
165
|
<div style='mso-element:footer' id=ef3>
|
130
|
-
|
131
166
|
<p class=MsoFooter align="center" style='text-align:center;margin-top:12.0pt;line-height:12.0pt;mso-line-height-rule:
|
132
167
|
exactly'><!--[if supportFields]><b><span
|
133
168
|
lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
|
@@ -140,11 +175,24 @@ style='mso-spacerun:yes'> </span>PAGE<span style='mso-spacerun:yes'>
|
|
140
175
|
mso-bidi-font-size:11.0pt'><span style='mso-element:field-end'></span></span></b><![endif]--><span
|
141
176
|
lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
|
142
177
|
style='mso-tab-count:0'> </span></span></p>
|
178
|
+
</div>
|
143
179
|
|
180
|
+
<div style='mso-element:footer' id=ef3l>
|
181
|
+
<p class=MsoFooterLandscape align="center" style='text-align:center;margin-top:12.0pt;line-height:12.0pt;mso-line-height-rule:
|
182
|
+
exactly'><!--[if supportFields]><b><span
|
183
|
+
lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
|
184
|
+
style='mso-element:field-begin'></span><span
|
185
|
+
style='mso-spacerun:yes'> </span>PAGE<span style='mso-spacerun:yes'>
|
186
|
+
</span>\* MERGEFORMAT <span style='mso-element:field-separator'></span></span></b><![endif]--><b>
|
187
|
+
<span lang=EN-GB style='font-size:10.0pt;
|
188
|
+
mso-bidi-font-size:11.0pt'><span style='mso-no-proof:yes'>2</span></span></b><!--[if supportFields]><b>
|
189
|
+
<span lang=EN-GB style='font-size:10.0pt;
|
190
|
+
mso-bidi-font-size:11.0pt'><span style='mso-element:field-end'></span></span></b><![endif]--><span
|
191
|
+
lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
|
192
|
+
style='mso-tab-count:0'> </span></span></p>
|
144
193
|
</div>
|
145
194
|
|
146
195
|
<div style='mso-element:footer' id=f3>
|
147
|
-
|
148
196
|
<p class=MsoFooter align="center" style='text-align:center;line-height:12.0pt'><span lang=EN-GB
|
149
197
|
style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span style='mso-tab-count:0'> </span></span><!--[if supportFields]><b>
|
150
198
|
<span lang=EN-GB style='font-size:10.0pt;
|
@@ -156,7 +204,20 @@ PAGE<span style='mso-spacerun:yes'> </span>\* MERGEFORMAT <span
|
|
156
204
|
<span lang=EN-GB style='font-size:10.0pt;
|
157
205
|
mso-bidi-font-size:11.0pt'><span style='mso-element:field-end'></span></span></b><![endif]--><span
|
158
206
|
lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><o:p></o:p></span></p>
|
207
|
+
</div>
|
159
208
|
|
209
|
+
<div style='mso-element:footer' id=f3l>
|
210
|
+
<p class=MsoFooterLandscape align="center" style='text-align:center;line-height:12.0pt'><span lang=EN-GB
|
211
|
+
style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span style='mso-tab-count:0'> </span></span><!--[if supportFields]><b>
|
212
|
+
<span lang=EN-GB style='font-size:10.0pt;
|
213
|
+
mso-bidi-font-size:11.0pt'><span style='mso-element:field-begin'></span>
|
214
|
+
PAGE<span style='mso-spacerun:yes'> </span>\* MERGEFORMAT <span
|
215
|
+
style='mso-element:field-separator'></span></span></b><![endif]--><b>
|
216
|
+
<span lang=EN-GB style='font-size:10.0pt;
|
217
|
+
mso-bidi-font-size:11.0pt'><span style='mso-no-proof:yes'>3</span></span></b><!--[if supportFields]><b>
|
218
|
+
<span lang=EN-GB style='font-size:10.0pt;
|
219
|
+
mso-bidi-font-size:11.0pt'><span style='mso-element:field-end'></span></span></b><![endif]--><span
|
220
|
+
lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><o:p></o:p></span></p>
|
160
221
|
</div>
|
161
222
|
|
162
223
|
</body>
|
@@ -602,10 +602,10 @@ div.WordSection1
|
|
602
602
|
margin:39.7pt 53.85pt 1.0cm 3.0cm;
|
603
603
|
mso-header-margin:35.45pt;
|
604
604
|
mso-footer-margin:14.2pt;
|
605
|
-
mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html")
|
606
|
-
mso-header:url("file:///C:/Doc/FILENAME_files/header.html")
|
607
|
-
mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html")
|
608
|
-
mso-footer:url("file:///C:/Doc/FILENAME_files/header.html")
|
605
|
+
mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") eh2l;
|
606
|
+
mso-header:url("file:///C:/Doc/FILENAME_files/header.html") h2l;
|
607
|
+
mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html") ef2l;
|
608
|
+
mso-footer:url("file:///C:/Doc/FILENAME_files/header.html") f2l;
|
609
609
|
mso-paper-source:0;
|
610
610
|
mso-footnote-numbering-restart:each-section;
|
611
611
|
}
|
@@ -641,10 +641,10 @@ div.WordSection2
|
|
641
641
|
margin:39.7pt 53.85pt 1.0cm 3.0cm;
|
642
642
|
mso-header-margin:35.45pt;
|
643
643
|
mso-footer-margin:14.2pt;
|
644
|
-
mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html")
|
645
|
-
mso-header:url("file:///C:/Doc/FILENAME_files/header.html")
|
646
|
-
mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html")
|
647
|
-
mso-footer:url("file:///C:/Doc/FILENAME_files/header.html")
|
644
|
+
mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") eh2l;
|
645
|
+
mso-header:url("file:///C:/Doc/FILENAME_files/header.html") h2l;
|
646
|
+
mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html") ef3l;
|
647
|
+
mso-footer:url("file:///C:/Doc/FILENAME_files/header.html") f3l;
|
648
648
|
mso-paper-source:0;
|
649
649
|
mso-footnote-numbering-restart:each-section;
|
650
650
|
}
|
@@ -154,6 +154,17 @@ p.MsoHeader, li.MsoHeader, div.MsoHeader
|
|
154
154
|
mso-fareast-font-family:"Times New Roman";
|
155
155
|
mso-ansi-language:EN-US;
|
156
156
|
mso-fareast-language:EN-US;}
|
157
|
+
p.MsoHeaderLandscape, li.MsoHeaderLandscape, div.MsoHeaderLandscape
|
158
|
+
{mso-style-unhide:no;
|
159
|
+
margin:0cm;
|
160
|
+
margin-bottom:.0001pt;
|
161
|
+
mso-pagination:widow-orphan;
|
162
|
+
tab-stops:center 367.0pt right 734.0pt;
|
163
|
+
font-size:10.5pt;
|
164
|
+
font-family:$bodyfont;
|
165
|
+
mso-fareast-font-family:"Times New Roman";
|
166
|
+
mso-ansi-language:EN-US;
|
167
|
+
mso-fareast-language:EN-US;}
|
157
168
|
p.MsoFooter, li.MsoFooter, div.MsoFooter
|
158
169
|
{mso-style-unhide:no;
|
159
170
|
margin:0cm;
|
@@ -165,6 +176,17 @@ p.MsoFooter, li.MsoFooter, div.MsoFooter
|
|
165
176
|
mso-fareast-font-family:"Times New Roman";
|
166
177
|
mso-ansi-language:EN-US;
|
167
178
|
mso-fareast-language:EN-US;}
|
179
|
+
p.MsoFooterLandscape, li.MsoFooterLandscape, div.MsoFooterLandscape
|
180
|
+
{mso-style-unhide:no;
|
181
|
+
margin:0cm;
|
182
|
+
margin-bottom:.0001pt;
|
183
|
+
mso-pagination:widow-orphan;
|
184
|
+
tab-stops:right 734.0pt;
|
185
|
+
font-size:10.5pt;
|
186
|
+
font-family:$bodyfont;
|
187
|
+
mso-fareast-font-family:"Times New Roman";
|
188
|
+
mso-ansi-language:EN-US;
|
189
|
+
mso-fareast-language:EN-US;}
|
168
190
|
span.MsoCommentReference
|
169
191
|
{mso-style-noshow:yes;
|
170
192
|
mso-style-unhide:no;
|
@@ -81,7 +81,7 @@ module IsoDoc
|
|
81
81
|
if node["inline-header"] == "true"
|
82
82
|
inline_header_title(out, node, c1)
|
83
83
|
else
|
84
|
-
div.send "h#{anchor(node['id'], :level) || '1'}" do |h|
|
84
|
+
div.send "h#{anchor(node['id'], :level, false) || '1'}" do |h|
|
85
85
|
lbl = anchor(node['id'], :label, false)
|
86
86
|
h << "#{lbl}. " if lbl && !@suppressheadingnumbers
|
87
87
|
insert_tab(h, 1) if lbl && !@suppressheadingnumbers
|
@@ -93,7 +93,7 @@ module IsoDoc
|
|
93
93
|
if node["inline-header"] == "true"
|
94
94
|
inline_header_title(out, node, c1)
|
95
95
|
else
|
96
|
-
div.send "h#{anchor(node['id'], :level) || '1'}" do |h|
|
96
|
+
div.send "h#{anchor(node['id'], :level, false) || '1'}" do |h|
|
97
97
|
lbl = anchor(node['id'], :label, false)
|
98
98
|
h << "#{lbl}. " if lbl && !@suppressheadingnumbers
|
99
99
|
insert_tab(h, 1) if lbl && !@suppressheadingnumbers
|
@@ -100,7 +100,7 @@ module IsoDoc
|
|
100
100
|
if node["inline-header"] == "true"
|
101
101
|
inline_header_title(out, node, c1)
|
102
102
|
else
|
103
|
-
div.send "h#{anchor(node['id'], :level) || '1'}" do |h|
|
103
|
+
div.send "h#{anchor(node['id'], :level, false) || '1'}" do |h|
|
104
104
|
lbl = anchor(node['id'], :label, false)
|
105
105
|
if lbl && !@suppressheadingnumbers
|
106
106
|
h << "#{lbl}. "
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-unece
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|