metanorma-iso 1.1.2 → 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/isodoc/iso/html/isodoc.scss +22 -2
- data/lib/isodoc/iso/html_convert.rb +58 -0
- data/lib/isodoc/iso/word_convert.rb +60 -4
- data/lib/metanorma/iso/version.rb +1 -1
- data/spec/assets/iso.doc +29 -12
- data/spec/isodoc/i18n_spec.rb +236 -236
- data/spec/isodoc/inline_spec.rb +2 -2
- data/spec/isodoc/iso_spec.rb +29 -48
- data/spec/isodoc/postproc_spec.rb +60 -28
- data/spec/isodoc/section_spec.rb +37 -37
- data/spec/isodoc/terms_spec.rb +25 -32
- data/spec/isodoc/xref_spec.rb +113 -123
- data/spec/metanorma/processor_spec.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: 37a689d47337189ccb75b778d9452f91b171b6b56c16480ce1bc593114205517
|
4
|
+
data.tar.gz: a7234ed37edccea8e3186341ac9395fdd4d0279147265b7a7ed696a65ece1501
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 373fc89b917011e0faf4f099f487277966e9e4727042c593ff46dbf80b36b76ea2574509e315eb2e0f478de60e68820ccd16d5de4113600dda0ea6e73673dc70
|
7
|
+
data.tar.gz: 71cb3917f0c13efe5c6a8b8afbc7770d0201ddb90ef6b9e576ceb21d9b87d8aaefdbab4ba0aea7262e6a2edfa43052cefb364bc3a8e8052610ad4b28b743c9b8
|
@@ -492,7 +492,23 @@ table.dl
|
|
492
492
|
{margin-top:0cm;
|
493
493
|
margin-right:0cm;
|
494
494
|
margin-bottom:11.0pt;
|
495
|
-
margin-left:
|
495
|
+
margin-left:0cm;}
|
496
|
+
|
497
|
+
div.figdl {
|
498
|
+
text-align: left; }
|
499
|
+
|
500
|
+
table.figdl
|
501
|
+
{
|
502
|
+
mso-para-margin:0cm;
|
503
|
+
mso-para-margin-bottom:.0001pt;
|
504
|
+
mso-pagination:widow-orphan;
|
505
|
+
align: left;
|
506
|
+
text-align: left;
|
507
|
+
margin-top:0cm;
|
508
|
+
margin-right:0cm;
|
509
|
+
margin-left: 0cm;
|
510
|
+
margin-right: 0cm;
|
511
|
+
}
|
496
512
|
|
497
513
|
ol
|
498
514
|
{margin-bottom:0cm;}
|
@@ -692,14 +708,18 @@ div.example {
|
|
692
708
|
}
|
693
709
|
*/
|
694
710
|
|
711
|
+
|
712
|
+
/*
|
695
713
|
div.example {
|
696
714
|
margin-left:70.9pt;
|
697
715
|
text-indent:-70.9pt;
|
698
716
|
}
|
717
|
+
*/
|
699
718
|
p.example, li.example, div.example, td.example
|
700
719
|
{ margin:0in;
|
701
|
-
margin-bottom
|
720
|
+
margin-bottom:12.0pt;
|
702
721
|
mso-pagination:none;
|
722
|
+
tab-stops:70.9pt;
|
703
723
|
font-size:10.0pt;
|
704
724
|
font-family:$bodyfont;}
|
705
725
|
|
@@ -142,6 +142,64 @@ module IsoDoc
|
|
142
142
|
delim = get_anchors[target][:type] == "listitem" ? " " : ", "
|
143
143
|
l10n(get_anchors[container][:xref] + delim + linkend)
|
144
144
|
end
|
145
|
+
|
146
|
+
def example_p_parse(node, div)
|
147
|
+
div.p do |p|
|
148
|
+
p.span **{ class: "example_label" } do |s|
|
149
|
+
s << example_label(node)
|
150
|
+
end
|
151
|
+
insert_tab(p, 1)
|
152
|
+
node.first_element_child.children.each { |n| parse(n, p) }
|
153
|
+
end
|
154
|
+
node.element_children[1..-1].each { |n| parse(n, div) }
|
155
|
+
end
|
156
|
+
|
157
|
+
def example_parse1(node, div)
|
158
|
+
div.p do |p|
|
159
|
+
p.span **{ class: "example_label" } do |s|
|
160
|
+
s << example_label(node)
|
161
|
+
end
|
162
|
+
insert_tab(p, 1)
|
163
|
+
end
|
164
|
+
node.children.each { |n| parse(n, div) }
|
165
|
+
end
|
166
|
+
|
167
|
+
def example_parse(node, out)
|
168
|
+
out.div **{ id: node["id"], class: "example" } do |div|
|
169
|
+
if node.first_element_child.name == "p"
|
170
|
+
example_p_parse(node, div)
|
171
|
+
else
|
172
|
+
example_parse1(node, div)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
def insertall_after_here(node, insert, name)
|
178
|
+
node.children.each do |n|
|
179
|
+
next unless n.name == name
|
180
|
+
insert.next = n.remove
|
181
|
+
insert = n
|
182
|
+
end
|
183
|
+
insert
|
184
|
+
end
|
185
|
+
|
186
|
+
def termexamples_before_termnotes(node)
|
187
|
+
return unless node.at(ns("./termnote")) && node.at(ns("./termexample"))
|
188
|
+
return unless insert = node.at(ns("./definition"))
|
189
|
+
insert = insertall_after_here(node, insert, "termexample")
|
190
|
+
insert = insertall_after_here(node, insert, "termnote")
|
191
|
+
end
|
192
|
+
|
193
|
+
def term_parse(node, out)
|
194
|
+
termexamples_before_termnotes(node)
|
195
|
+
out.p **{ class: "Terms", style:"text-align:left;" } do |p|
|
196
|
+
node.children.each { |c| parse(c, p) }
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
def clausedelim
|
201
|
+
""
|
202
|
+
end
|
145
203
|
end
|
146
204
|
end
|
147
205
|
end
|
@@ -139,13 +139,14 @@ module IsoDoc
|
|
139
139
|
end
|
140
140
|
end
|
141
141
|
|
142
|
-
|
142
|
+
def eref_localities1_zh(target, type, from, to)
|
143
143
|
subsection = from&.text&.match(/\./)
|
144
144
|
ret = type == "list" ? "" : ","
|
145
145
|
ret += " 第#{from.text}" if from
|
146
146
|
ret += "–#{to}" if to
|
147
147
|
loc = (@locality[type] || type.sub(/^locality:/, "").capitalize )
|
148
|
-
ret += " #{loc}" unless subsection && type == "clause" ||
|
148
|
+
ret += " #{loc}" unless subsection && type == "clause" ||
|
149
|
+
type == "list" || target.match(/^IEV$|^IEC 60050-/)
|
149
150
|
ret += ")" if type == "list"
|
150
151
|
ret
|
151
152
|
end
|
@@ -156,7 +157,8 @@ module IsoDoc
|
|
156
157
|
return l10n(eref_localities1_zh(target, type, from, to)) if lang == "zh"
|
157
158
|
ret = type == "list" ? "" : ","
|
158
159
|
loc = @locality[type] || type.sub(/^locality:/, "").capitalize
|
159
|
-
ret += " #{loc}" unless subsection && type == "clause" ||
|
160
|
+
ret += " #{loc}" unless subsection && type == "clause" ||
|
161
|
+
type == "list" || target.match(/^IEV$|^IEC 60050-/)
|
160
162
|
ret += " #{from.text}" if from
|
161
163
|
ret += "–#{to.text}" if to
|
162
164
|
ret += ")" if type == "list"
|
@@ -168,8 +170,62 @@ module IsoDoc
|
|
168
170
|
l10n(get_anchors[container][:xref] + delim + linkend)
|
169
171
|
end
|
170
172
|
|
173
|
+
def example_p_parse(node, div)
|
174
|
+
div.p do |p|
|
175
|
+
p.span **{ class: "example_label" } do |s|
|
176
|
+
s << example_label(node)
|
177
|
+
end
|
178
|
+
insert_tab(p, 1)
|
179
|
+
node.first_element_child.children.each { |n| parse(n, p) }
|
180
|
+
end
|
181
|
+
node.element_children[1..-1].each { |n| parse(n, div) }
|
182
|
+
end
|
183
|
+
|
184
|
+
def example_parse1(node, div)
|
185
|
+
div.p do |p|
|
186
|
+
p.span **{ class: "example_label" } do |s|
|
187
|
+
s << example_label(node)
|
188
|
+
end
|
189
|
+
insert_tab(p, 1)
|
190
|
+
end
|
191
|
+
node.children.each { |n| parse(n, div) }
|
192
|
+
end
|
193
|
+
|
171
194
|
def example_parse(node, out)
|
172
|
-
|
195
|
+
out.div **{ id: node["id"], class: "example" } do |div|
|
196
|
+
if node.first_element_child.name == "p"
|
197
|
+
example_p_parse(node, div)
|
198
|
+
else
|
199
|
+
example_parse1(node, div)
|
200
|
+
end
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
def termexamples_before_termnotes(node)
|
205
|
+
return unless node.at(ns("./termnote")) && node.at(ns("./termexample"))
|
206
|
+
return unless insert = node.at(ns("./definition"))
|
207
|
+
insert = insertall_after_here(node, insert, "termexample")
|
208
|
+
insert = insertall_after_here(node, insert, "termnote")
|
209
|
+
end
|
210
|
+
|
211
|
+
def term_parse(node, out)
|
212
|
+
termexamples_before_termnotes(node)
|
213
|
+
out.p **{ class: "Terms", style:"text-align:left;" } do |p|
|
214
|
+
node.children.each { |c| parse(c, p) }
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
def clausedelim
|
219
|
+
""
|
220
|
+
end
|
221
|
+
|
222
|
+
def figure_cleanup(docxml)
|
223
|
+
super
|
224
|
+
docxml.xpath("//div[@class = 'figure']//table[@class = 'dl']").each do |t|
|
225
|
+
t["class"] = "figdl"
|
226
|
+
d = t.add_previous_sibling("<div class='figdl'/>")
|
227
|
+
t.parent = d.first
|
228
|
+
end
|
173
229
|
end
|
174
230
|
end
|
175
231
|
end
|
data/spec/assets/iso.doc
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
MIME-Version: 1.0
|
2
|
-
Content-Type: multipart/related; boundary="----=
|
2
|
+
Content-Type: multipart/related; boundary="----=_NextPart_b1a6fb96.a341.4f67"
|
3
3
|
|
4
|
-
------=
|
4
|
+
------=_NextPart_b1a6fb96.a341.4f67
|
5
5
|
Content-Location: file:///C:/Doc/iso.htm
|
6
6
|
Content-Type: text/html; charset="utf-8"
|
7
7
|
|
@@ -547,7 +547,21 @@ table.dl {
|
|
547
547
|
margin-top: 0cm;
|
548
548
|
margin-right: 0cm;
|
549
549
|
margin-bottom: 11.0pt;
|
550
|
-
margin-left:
|
550
|
+
margin-left: 0cm; }
|
551
|
+
|
552
|
+
div.figdl {
|
553
|
+
text-align: left; }
|
554
|
+
|
555
|
+
table.figdl {
|
556
|
+
mso-para-margin: 0cm;
|
557
|
+
mso-para-margin-bottom: .0001pt;
|
558
|
+
mso-pagination: widow-orphan;
|
559
|
+
align: left;
|
560
|
+
text-align: left;
|
561
|
+
margin-top: 0cm;
|
562
|
+
margin-right: 0cm;
|
563
|
+
margin-left: 0cm;
|
564
|
+
margin-right: 0cm; }
|
551
565
|
|
552
566
|
ol {
|
553
567
|
margin-bottom: 0cm; }
|
@@ -749,14 +763,17 @@ div.example {
|
|
749
763
|
mso-margin-alt:10.0pt 10.0pt 10.0pt 10.0pt;
|
750
764
|
}
|
751
765
|
*/
|
766
|
+
/*
|
752
767
|
div.example {
|
753
|
-
margin-left:
|
754
|
-
text-indent
|
755
|
-
|
768
|
+
margin-left:70.9pt;
|
769
|
+
text-indent:-70.9pt;
|
770
|
+
}
|
771
|
+
*/
|
756
772
|
p.example, li.example, div.example, td.example {
|
757
773
|
margin: 0in;
|
758
|
-
margin-bottom: .
|
774
|
+
margin-bottom: 12.0pt;
|
759
775
|
mso-pagination: none;
|
776
|
+
tab-stops: 70.9pt;
|
760
777
|
font-size: 10.0pt;
|
761
778
|
font-family: "Cambria", serif; }
|
762
779
|
|
@@ -869,11 +886,11 @@ Switzerland<p class="MsoNormal"></p></span></p>
|
|
869
886
|
<p class="MsoToc1"><span lang="EN-GB" xml:lang="EN-GB"><span style="mso-element:field-begin"></span><span style="mso-spacerun:yes"> </span>TOC
|
870
887
|
\o "1-2" \h \z \u <span style="mso-element:field-separator"></span></span>
|
871
888
|
<span class="MsoHyperlink"><span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
872
|
-
<a href="#
|
889
|
+
<a href="#_Toc96258254">Foreword<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
873
890
|
<span style="mso-tab-count:1 dotted">. </span>
|
874
891
|
</span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
875
892
|
<span style="mso-element:field-begin"></span></span>
|
876
|
-
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF
|
893
|
+
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc96258254 \h </span>
|
877
894
|
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-separator"></span></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">1</span>
|
878
895
|
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-end"></span></span></a></span></span></p>
|
879
896
|
|
@@ -910,7 +927,7 @@ Switzerland<p class="MsoNormal"></p></span></p>
|
|
910
927
|
</html>
|
911
928
|
|
912
929
|
|
913
|
-
------=
|
930
|
+
------=_NextPart_b1a6fb96.a341.4f67
|
914
931
|
Content-Location: file:///C:/Doc/iso_files/filelist.xml
|
915
932
|
Content-Transfer-Encoding: base64
|
916
933
|
Content-Type: application/xml
|
@@ -920,7 +937,7 @@ ICAgICAgIDxvOk1haW5GaWxlIEhSZWY9Ii4uL3NwZWMvYXNzZXRzL2lzby5odG0iLz4gIDxvOkZp
|
|
920
937
|
bGUgSFJlZj0iZmlsZWxpc3QueG1sIi8+CiAgPG86RmlsZSBIUmVmPSJoZWFkZXIuaHRtbCIvPgo8
|
921
938
|
L3htbD4K
|
922
939
|
|
923
|
-
------=
|
940
|
+
------=_NextPart_b1a6fb96.a341.4f67
|
924
941
|
Content-Location: file:///C:/Doc/iso_files/header.html
|
925
942
|
Content-Transfer-Encoding: base64
|
926
943
|
Content-Type: text/html charset="utf-8"
|
@@ -1113,4 +1130,4 @@ cD4NCg0KPHAgY2xhc3M9TXNvRm9vdGVyPjxzcGFuIGxhbmc9RU4tQVUgc3R5bGU9J2ZvbnQtc2l6
|
|
1113
1130
|
ZToxMC4wcHQ7Jz7CqQ0KJm5ic3A7Jm5ic3A74oCTIEFsbCByaWdodHMgcmVzZXJ2ZWQ8bzpwPjwv
|
1114
1131
|
bzpwPjwvc3Bhbj48L3A+DQoNCjwvZGl2Pg0KDQoNCg0KPC9ib2R5Pg0KDQo8L2h0bWw+DQo=
|
1115
1132
|
|
1116
|
-
------=
|
1133
|
+
------=_NextPart_b1a6fb96.a341.4f67--
|
data/spec/isodoc/i18n_spec.rb
CHANGED
@@ -73,29 +73,29 @@ RSpec.describe IsoDoc do
|
|
73
73
|
</iso-standard>
|
74
74
|
INPUT
|
75
75
|
#{HTML_HDR}
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
76
|
+
<br/>
|
77
|
+
<div>
|
78
|
+
<h1 class="ForewordTitle">Foreword</h1>
|
79
|
+
<p id="A">This is a preamble</p>
|
80
|
+
</div>
|
81
|
+
<br/>
|
82
|
+
<div class="Section3" id="B">
|
83
|
+
<h1 class="IntroTitle">0  Introduction</h1>
|
84
|
+
<div id="C"><h2>0.1 Introduction Subsection</h2>
|
85
|
+
|
86
86
|
</div>
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
87
|
+
<p>This is patent boilerplate</p>
|
88
|
+
</div>
|
89
|
+
<p class="zzSTDTitle1"/>
|
90
|
+
<div id="D">
|
91
|
+
<h1>1  Scope</h1>
|
92
|
+
<p id="E">Text</p>
|
93
|
+
</div>
|
94
|
+
<div>
|
95
|
+
<h1>2  Normative references</h1>
|
96
|
+
<p>There are no normative references in this document.</p>
|
97
|
+
</div>
|
98
|
+
<div id="H"><h1>3  Terms, definitions, symbols and abbreviated terms</h1><p>For the purposes of this document,
|
99
99
|
the following terms and definitions apply.</p>
|
100
100
|
<p>ISO and IEC maintain terminological databases for use in
|
101
101
|
standardization at the following addresses:</p>
|
@@ -106,54 +106,54 @@ RSpec.describe IsoDoc do
|
|
106
106
|
<li> <p>IEC Electropedia: available at
|
107
107
|
<a href="http://www.electropedia.org">http://www.electropedia.org</a>
|
108
108
|
</p> </li> </ul>
|
109
|
-
<div id="I">
|
110
|
-
|
109
|
+
<div id="I"><h2>3.1 Normal Terms</h2>
|
110
|
+
|
111
111
|
<p class="TermNum" id="J">3.1.1</p>
|
112
112
|
<p class="Terms" style="text-align:left;">Term2</p>
|
113
113
|
|
114
|
-
</div><div id="K"><h2>3.2
|
114
|
+
</div><div id="K"><h2>3.2 Symbols and abbreviated terms</h2>
|
115
115
|
<dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
|
116
116
|
</div></div>
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
117
|
+
<div id="L" class="Symbols">
|
118
|
+
<h1>4  Symbols and abbreviated terms</h1>
|
119
|
+
<dl>
|
120
|
+
<dt>
|
121
|
+
<p>Symbol</p>
|
122
|
+
</dt>
|
123
|
+
<dd>Definition</dd>
|
124
|
+
</dl>
|
125
|
+
</div>
|
126
|
+
<div id="M">
|
127
|
+
<h1>5  Clause 4</h1>
|
128
|
+
<div id="N"><h2>5.1 Introduction</h2>
|
129
|
+
|
130
130
|
</div>
|
131
|
-
|
132
|
-
|
131
|
+
<div id="O"><h2>5.2 Clause 4.2</h2>
|
132
|
+
|
133
133
|
</div>
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
<div id="Q1">
|
141
|
-
|
134
|
+
</div>
|
135
|
+
<br/>
|
136
|
+
<div id="P" class="Section3">
|
137
|
+
<h1 class="Annex"><b>Annex A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
|
138
|
+
<div id="Q"><h2>A.1 Annex A.1</h2>
|
139
|
+
|
140
|
+
<div id="Q1"><h3>A.1.1 Annex A.1a</h3>
|
141
|
+
|
142
142
|
</div>
|
143
143
|
</div>
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
144
|
+
<div id="Q2"><h2>Appendix 1 An Appendix</h2>
|
145
|
+
|
146
|
+
</div>
|
147
|
+
</div>
|
148
|
+
<br/>
|
149
|
+
<div>
|
150
|
+
<h1 class="Section3">Bibliography</h1>
|
149
151
|
<div>
|
150
|
-
<
|
151
|
-
<div>
|
152
|
-
<h2 class="Section3">Bibliography Subsection</h2>
|
153
|
-
</div>
|
152
|
+
<h2 class="Section3">Bibliography Subsection</h2>
|
154
153
|
</div>
|
155
154
|
</div>
|
156
|
-
</
|
155
|
+
</div>
|
156
|
+
</body>
|
157
157
|
</html>
|
158
158
|
OUTPUT
|
159
159
|
end
|
@@ -230,29 +230,29 @@ RSpec.describe IsoDoc do
|
|
230
230
|
</iso-standard>
|
231
231
|
INPUT
|
232
232
|
#{HTML_HDR}
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
233
|
+
<br/>
|
234
|
+
<div>
|
235
|
+
<h1 class="ForewordTitle">Foreword</h1>
|
236
|
+
<p id="A">This is a preamble</p>
|
237
|
+
</div>
|
238
|
+
<br/>
|
239
|
+
<div class="Section3" id="B">
|
240
|
+
<h1 class="IntroTitle">0  Introduction</h1>
|
241
|
+
<div id="C"><h2>0.1 Introduction Subsection</h2>
|
242
|
+
|
243
243
|
</div>
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
244
|
+
<p>This is patent boilerplate</p>
|
245
|
+
</div>
|
246
|
+
<p class="zzSTDTitle1"/>
|
247
|
+
<div id="D">
|
248
|
+
<h1>1  Scope</h1>
|
249
|
+
<p id="E">Text</p>
|
250
|
+
</div>
|
251
|
+
<div>
|
252
|
+
<h1>2  Normative references</h1>
|
253
|
+
<p>There are no normative references in this document.</p>
|
254
|
+
</div>
|
255
|
+
<div id="H"><h1>3  Terms, definitions, symbols and abbreviated terms</h1><p>For the purposes of this document,
|
256
256
|
the following terms and definitions apply.</p>
|
257
257
|
<p>ISO and IEC maintain terminological databases for use in
|
258
258
|
standardization at the following addresses:</p>
|
@@ -263,54 +263,54 @@ RSpec.describe IsoDoc do
|
|
263
263
|
<li> <p>IEC Electropedia: available at
|
264
264
|
<a href="http://www.electropedia.org">http://www.electropedia.org</a>
|
265
265
|
</p> </li> </ul>
|
266
|
-
<div id="I">
|
267
|
-
|
266
|
+
<div id="I"><h2>3.1 Normal Terms</h2>
|
267
|
+
|
268
268
|
<p class="TermNum" id="J">3.1.1</p>
|
269
269
|
<p class="Terms" style="text-align:left;">Term2</p>
|
270
270
|
|
271
|
-
</div><div id="K"><h2>3.2
|
271
|
+
</div><div id="K"><h2>3.2 Symbols and abbreviated terms</h2>
|
272
272
|
<dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
|
273
273
|
</div></div>
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
274
|
+
<div id="L" class="Symbols">
|
275
|
+
<h1>4  Symbols and abbreviated terms</h1>
|
276
|
+
<dl>
|
277
|
+
<dt>
|
278
|
+
<p>Symbol</p>
|
279
|
+
</dt>
|
280
|
+
<dd>Definition</dd>
|
281
|
+
</dl>
|
282
|
+
</div>
|
283
|
+
<div id="M">
|
284
|
+
<h1>5  Clause 4</h1>
|
285
|
+
<div id="N"><h2>5.1 Introduction</h2>
|
286
|
+
|
287
287
|
</div>
|
288
|
-
|
289
|
-
|
288
|
+
<div id="O"><h2>5.2 Clause 4.2</h2>
|
289
|
+
|
290
290
|
</div>
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
<div id="Q1">
|
298
|
-
|
291
|
+
</div>
|
292
|
+
<br/>
|
293
|
+
<div id="P" class="Section3">
|
294
|
+
<h1 class="Annex"><b>Annex A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
|
295
|
+
<div id="Q"><h2>A.1 Annex A.1</h2>
|
296
|
+
|
297
|
+
<div id="Q1"><h3>A.1.1 Annex A.1a</h3>
|
298
|
+
|
299
299
|
</div>
|
300
300
|
</div>
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
301
|
+
<div id="Q2"><h2>Appendix 1 An Appendix</h2>
|
302
|
+
|
303
|
+
</div>
|
304
|
+
</div>
|
305
|
+
<br/>
|
306
|
+
<div>
|
307
|
+
<h1 class="Section3">Bibliography</h1>
|
306
308
|
<div>
|
307
|
-
<
|
308
|
-
<div>
|
309
|
-
<h2 class="Section3">Bibliography Subsection</h2>
|
310
|
-
</div>
|
309
|
+
<h2 class="Section3">Bibliography Subsection</h2>
|
311
310
|
</div>
|
312
311
|
</div>
|
313
|
-
</
|
312
|
+
</div>
|
313
|
+
</body>
|
314
314
|
</html>
|
315
315
|
OUTPUT
|
316
316
|
end
|
@@ -387,29 +387,29 @@ RSpec.describe IsoDoc do
|
|
387
387
|
</iso-standard>
|
388
388
|
INPUT
|
389
389
|
#{HTML_HDR}
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
390
|
+
<br/>
|
391
|
+
<div>
|
392
|
+
<h1 class="ForewordTitle">Avant-propos</h1>
|
393
|
+
<p id="A">This is a preamble</p>
|
394
|
+
</div>
|
395
|
+
<br/>
|
396
|
+
<div class="Section3" id="B">
|
397
|
+
<h1 class="IntroTitle">0  Introduction</h1>
|
398
|
+
<div id="C"><h2>0.1 Introduction Subsection</h2>
|
399
|
+
|
400
400
|
</div>
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
401
|
+
<p>This is patent boilerplate</p>
|
402
|
+
</div>
|
403
|
+
<p class="zzSTDTitle1"/>
|
404
|
+
<div id="D">
|
405
|
+
<h1>1  Domaine d'application</h1>
|
406
|
+
<p id="E">Text</p>
|
407
|
+
</div>
|
408
|
+
<div>
|
409
|
+
<h1>2  Références normatives</h1>
|
410
|
+
<p>Le présent document ne contient aucune référence normative.</p>
|
411
|
+
</div>
|
412
|
+
<div id="H"><h1>3  Terms, définitions, symboles et termes abrégés</h1><p>Pour les besoins du présent document, les termes et définitions suivants s'appliquent.</p>
|
413
413
|
<p>L'ISO et l'IEC tiennent à jour des bases de données terminologiques
|
414
414
|
destinées à être utilisées en normalisation, consultables aux adresses
|
415
415
|
suivantes:</p>
|
@@ -419,54 +419,54 @@ RSpec.describe IsoDoc do
|
|
419
419
|
<li> <p>IEC Electropedia: disponible à l'adresse
|
420
420
|
<a href="http://www.electropedia.org">http://www.electropedia.org</a>
|
421
421
|
</p> </li> </ul>
|
422
|
-
<div id="I">
|
423
|
-
|
422
|
+
<div id="I"><h2>3.1 Normal Terms</h2>
|
423
|
+
|
424
424
|
<p class="TermNum" id="J">3.1.1</p>
|
425
425
|
<p class="Terms" style="text-align:left;">Term2</p>
|
426
426
|
|
427
|
-
</div><div id="K"><h2>3.2
|
427
|
+
</div><div id="K"><h2>3.2 Symboles et termes abrégés</h2>
|
428
428
|
<dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
|
429
429
|
</div></div>
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
430
|
+
<div id="L" class="Symbols">
|
431
|
+
<h1>4  Symboles et termes abrégés</h1>
|
432
|
+
<dl>
|
433
|
+
<dt>
|
434
|
+
<p>Symbol</p>
|
435
|
+
</dt>
|
436
|
+
<dd>Definition</dd>
|
437
|
+
</dl>
|
438
|
+
</div>
|
439
|
+
<div id="M">
|
440
|
+
<h1>5  Clause 4</h1>
|
441
|
+
<div id="N"><h2>5.1 Introduction</h2>
|
442
|
+
|
443
443
|
</div>
|
444
|
-
|
445
|
-
|
444
|
+
<div id="O"><h2>5.2 Clause 4.2</h2>
|
445
|
+
|
446
446
|
</div>
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
<div id="Q1">
|
454
|
-
|
447
|
+
</div>
|
448
|
+
<br/>
|
449
|
+
<div id="P" class="Section3">
|
450
|
+
<h1 class="Annex"><b>Annexe A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
|
451
|
+
<div id="Q"><h2>A.1 Annex A.1</h2>
|
452
|
+
|
453
|
+
<div id="Q1"><h3>A.1.1 Annex A.1a</h3>
|
454
|
+
|
455
455
|
</div>
|
456
456
|
</div>
|
457
|
-
<div id="Q2">
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
457
|
+
<div id="Q2"><h2>Appendice 1 An Appendix</h2>
|
458
|
+
|
459
|
+
</div>
|
460
|
+
</div>
|
461
|
+
<br/>
|
462
|
+
<div>
|
463
|
+
<h1 class="Section3">Bibliographie</h1>
|
462
464
|
<div>
|
463
|
-
<
|
464
|
-
<div>
|
465
|
-
<h2 class="Section3">Bibliography Subsection</h2>
|
466
|
-
</div>
|
465
|
+
<h2 class="Section3">Bibliography Subsection</h2>
|
467
466
|
</div>
|
468
467
|
</div>
|
469
|
-
</
|
468
|
+
</div>
|
469
|
+
</body>
|
470
470
|
</html>
|
471
471
|
OUTPUT
|
472
472
|
end
|
@@ -554,32 +554,32 @@ RSpec.describe IsoDoc do
|
|
554
554
|
</iso-standard>
|
555
555
|
INPUT
|
556
556
|
#{HTML_HDR}
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
557
|
+
<br/>
|
558
|
+
<div>
|
559
|
+
<h1 class="ForewordTitle">前言</h1>
|
560
|
+
<p id="A">This is a preamble</p>
|
561
|
+
</div>
|
562
|
+
<br/>
|
563
|
+
<div class="Section3" id="B">
|
564
|
+
<h1 class="IntroTitle">0  引言</h1>
|
565
|
+
<div id="C"><h2>0.1 Introduction Subsection</h2>
|
566
|
+
|
567
567
|
</div>
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
568
|
+
<p>This is patent boilerplate</p>
|
569
|
+
</div>
|
570
|
+
<p class="zzSTDTitle1"/>
|
571
|
+
<div id="D">
|
572
|
+
<h1>1  范围</h1>
|
573
|
+
<p id="E">
|
574
|
+
<a href="#ISO712">ISO 712、第1–<referenceto>1</referenceto>表</a>
|
575
|
+
</p>
|
576
|
+
</div>
|
577
|
+
<div>
|
578
|
+
<h1>2  规范性引用文件</h1>
|
579
|
+
<p>下列文件对于本文件的应用是必不可少的。 凡是注日期的引用文件,仅注日期的版本适用于本文件。 凡是不注日期的引用文件,其最新版本(包括所有的修改单)适用于本文件。</p>
|
580
|
+
<p id="ISO712" class="NormRef">ISO 712, <i> Cereals and cereal products</i></p>
|
581
|
+
</div>
|
582
|
+
<div id="H"><h1>3  术语、定义、符号、代号和缩略语</h1><p>下列术语和定义适用于本文件。</p>
|
583
583
|
<p>ISO和IEC用于标准化的术语数据库地址如下:</p>
|
584
584
|
<ul>
|
585
585
|
<li> <p>ISO在线浏览平台:
|
@@ -587,54 +587,54 @@ RSpec.describe IsoDoc do
|
|
587
587
|
<li> <p>IEC Electropedia:
|
588
588
|
位于<a href="http://www.electropedia.org">http://www.electropedia.org</a>
|
589
589
|
</p> </li> </ul>
|
590
|
-
<div id="I">
|
591
|
-
|
590
|
+
<div id="I"><h2>3.1 Normal Terms</h2>
|
591
|
+
|
592
592
|
<p class="TermNum" id="J">3.1.1</p>
|
593
593
|
<p class="Terms" style="text-align:left;">Term2</p>
|
594
|
-
|
595
|
-
</div><div id="K"><h2>3.2
|
594
|
+
|
595
|
+
</div><div id="K"><h2>3.2 符号、代号和缩略语</h2>
|
596
596
|
<dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
|
597
597
|
</div></div>
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
598
|
+
<div id="L" class="Symbols">
|
599
|
+
<h1>4  符号、代号和缩略语</h1>
|
600
|
+
<dl>
|
601
|
+
<dt>
|
602
|
+
<p>Symbol</p>
|
603
|
+
</dt>
|
604
|
+
<dd>Definition</dd>
|
605
|
+
</dl>
|
606
|
+
</div>
|
607
|
+
<div id="M">
|
608
|
+
<h1>5  Clause 4</h1>
|
609
|
+
<div id="N"><h2>5.1 Introduction</h2>
|
610
|
+
|
611
611
|
</div>
|
612
|
-
|
613
|
-
|
612
|
+
<div id="O"><h2>5.2 Clause 4.2</h2>
|
613
|
+
|
614
614
|
</div>
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
<div id="Q1">
|
622
|
-
|
623
|
-
</div>
|
615
|
+
</div>
|
616
|
+
<br/>
|
617
|
+
<div id="P" class="Section3">
|
618
|
+
<h1 class="Annex">附件A<br/>(规范性附录)<br/><br/><b>Annex</b></h1>
|
619
|
+
<div id="Q"><h2>A.1 Annex A.1</h2>
|
620
|
+
|
621
|
+
<div id="Q1"><h3>A.1.1 Annex A.1a</h3>
|
622
|
+
|
624
623
|
</div>
|
625
|
-
<div id="Q2">
|
626
|
-
<h2>附录1. An Appendix</h2>
|
627
624
|
</div>
|
628
|
-
</
|
629
|
-
|
625
|
+
<div id="Q2"><h2>附录1 An Appendix</h2>
|
626
|
+
|
627
|
+
</div>
|
628
|
+
</div>
|
629
|
+
<br/>
|
630
|
+
<div>
|
631
|
+
<h1 class="Section3">参考文献</h1>
|
630
632
|
<div>
|
631
|
-
<
|
632
|
-
<div>
|
633
|
-
<h2 class="Section3">Bibliography Subsection</h2>
|
634
|
-
</div>
|
633
|
+
<h2 class="Section3">Bibliography Subsection</h2>
|
635
634
|
</div>
|
636
635
|
</div>
|
637
|
-
</
|
636
|
+
</div>
|
637
|
+
</body>
|
638
638
|
</html>
|
639
639
|
OUTPUT
|
640
640
|
end
|