metanorma-iso 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/guidance.adoc +1 -1
- data/docs/htmloutput.adoc +3 -0
- data/lib/asciidoctor/iso/converter.rb +1 -1
- data/lib/isodoc/iso/html/isodoc.scss +0 -24
- data/lib/isodoc/iso/html/style-human.scss +2 -2
- data/lib/isodoc/iso/html/style-iso.scss +2 -2
- data/lib/isodoc/iso/html/wordstyle.scss +25 -0
- data/lib/isodoc/iso/html_convert.rb +9 -3
- data/lib/isodoc/iso/word_convert.rb +10 -4
- data/lib/metanorma-iso.rb +1 -1
- data/lib/metanorma/iso/processor.rb +1 -1
- data/lib/metanorma/iso/version.rb +5 -0
- data/metanorma-iso.gemspec +3 -2
- data/spec/asciidoctor-iso/base_spec.rb +1 -1
- data/spec/asciidoctor-iso/refs_spec.rb +2 -1
- data/spec/assets/iso.doc +7 -32
- data/spec/examples/rice.adoc +5 -5
- data/spec/examples/{rice_images → rice_img}/rice_image1.png +0 -0
- data/spec/examples/{rice_images → rice_img}/rice_image2.png +0 -0
- data/spec/examples/{rice_images → rice_img}/rice_image3_1.png +0 -0
- data/spec/examples/{rice_images → rice_img}/rice_image3_2.png +0 -0
- data/spec/examples/{rice_images → rice_img}/rice_image3_3.png +0 -0
- data/spec/isodoc/inline_spec.rb +1 -1
- data/spec/isodoc/postproc_spec.rb +4 -4
- data/spec/isodoc/xref_spec.rb +12 -12
- data/spec/metanorma/processor_spec.rb +1 -2
- metadata +22 -8
- data/lib/asciidoctor/iso/version.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d89d0e755c16c4261948825fea427ec2eb255f548a34a996f7263eea3fc0503
|
4
|
+
data.tar.gz: 75c0d94502690fef83157506796522f451d52f52672ece087485fdeb6bc090ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cd85c2674397b24c5c6b27815474b8c8b11f52ab46fc133f652688428d20a2bb4c5b95128356c8d031755dec71939af22234070ecdf5f6693af50e48543a51b
|
7
|
+
data.tar.gz: 89193ce1d3fef951ab93006dd21d28f3132aca52c4f97d91f76fb18ee72a58daa3128273bca9154963b4c76430e720e0390d6c0c3108af1e492d93f483df47b5
|
data/docs/guidance.adoc
CHANGED
@@ -204,7 +204,7 @@ NOTE: The starch of waxy rice consists almost entirely of amylopectin. The kerne
|
|
204
204
|
and Note 1 to entry is not included here
|
205
205
|
--
|
206
206
|
|
207
|
-
The requirement that the source of a term be given in a citation also applies when the source is a term bank, such as http://www.electropedia.org[IEV]. Formally, IEV references should be cited as `IEC 60050-nnn:
|
207
|
+
The requirement that the source of a term be given in a citation also applies when the source is a term bank, such as http://www.electropedia.org[IEV]. Formally, IEV references should be cited as `IEC 60050-nnn:20xx`, where `n` is the top-level clause, and `20xx` is the year when that particular specification was published; e.g. `IEC 60050-113:2011, 113-01-07`. For convenience, this gem requires all Electropedia references to be to a single reference, named `IEV` in the normative references. In rendering the Asciidoctor into ISO XML, this reference will be replaced by the various required IEC 60050-nnn:20xx references. (That means that you should not insert your own instances of Electropedia references with id `IEC 60050-nnn`: they will be duplicated by the automatically generated references.)
|
208
208
|
|
209
209
|
[source,asciidoc]
|
210
210
|
--
|
data/docs/htmloutput.adoc
CHANGED
@@ -78,6 +78,9 @@ Line Break:: `<br>`
|
|
78
78
|
Horizontal Rule:: `<hr>`
|
79
79
|
Page Break:: `<br>` (realised as page break in Word HTML)
|
80
80
|
|
81
|
+
==== Images
|
82
|
+
|
83
|
+
All images for an HTML document `{filename}.html` are moved to the folder `{filename}_images`, and renamed with GUIDs. This is to ensure that all images are available in the one location, making it easier to package the HTML output and upload it elsewhere.
|
81
84
|
|
82
85
|
== Word HTML
|
83
86
|
|
@@ -455,30 +455,6 @@ table.dl
|
|
455
455
|
margin-right:0cm;
|
456
456
|
margin-bottom:11.0pt;
|
457
457
|
margin-left:20.15pt;}
|
458
|
-
.h2Annex
|
459
|
-
{mso-style-priority:2;
|
460
|
-
mso-style-unhide:no;
|
461
|
-
mso-style-qformat:yes;
|
462
|
-
mso-style-link:"Heading 2 Char";
|
463
|
-
mso-style-next:Normal;
|
464
|
-
margin-top:3.0pt;
|
465
|
-
margin-right:0cm;
|
466
|
-
margin-bottom:12.0pt;
|
467
|
-
margin-left:0cm;
|
468
|
-
text-indent:0cm;
|
469
|
-
line-height:12.5pt;
|
470
|
-
mso-pagination:widow-orphan;
|
471
|
-
page-break-after:avoid;
|
472
|
-
mso-hyphenate:none;
|
473
|
-
tab-stops:27.0pt 35.0pt;
|
474
|
-
font-size:12.0pt;
|
475
|
-
mso-bidi-font-size:11.0pt;
|
476
|
-
font-family:$headerfont;
|
477
|
-
font-weight:bold;
|
478
|
-
mso-fareast-font-family:$headerfont;
|
479
|
-
mso-ansi-language:EN-GB;
|
480
|
-
mso-fareast-language:JA;
|
481
|
-
mso-bidi-font-weight:normal;}
|
482
458
|
|
483
459
|
ol
|
484
460
|
{margin-bottom:0cm;}
|
@@ -409,7 +409,7 @@ ul li {
|
|
409
409
|
list-style: none;
|
410
410
|
}
|
411
411
|
|
412
|
-
ul li p:before {
|
412
|
+
ul > li > p:before {
|
413
413
|
content: "—";
|
414
414
|
display: inline-block;
|
415
415
|
width: 1em;
|
@@ -747,7 +747,7 @@ sup a {
|
|
747
747
|
display: inline;
|
748
748
|
}
|
749
749
|
|
750
|
-
ol li p:before {
|
750
|
+
ol > li > p:before {
|
751
751
|
content: "";
|
752
752
|
display: none;
|
753
753
|
}
|
@@ -251,7 +251,7 @@ h2 p {
|
|
251
251
|
list-style: none;
|
252
252
|
}
|
253
253
|
|
254
|
-
ul li p:before {
|
254
|
+
ul > li > p:before {
|
255
255
|
content: "—";
|
256
256
|
display: inline-block;
|
257
257
|
width: 1em;
|
@@ -731,7 +731,7 @@ ol.footnotes-list p, aside.footnote p {
|
|
731
731
|
display: inline;
|
732
732
|
}
|
733
733
|
|
734
|
-
ol li p:before {
|
734
|
+
ol > li > p:before {
|
735
735
|
content: "";
|
736
736
|
display: none;
|
737
737
|
}
|
@@ -162,6 +162,31 @@ h1.Annex
|
|
162
162
|
mso-ansi-language:EN-GB;
|
163
163
|
mso-fareast-language:JA;
|
164
164
|
mso-bidi-font-weight:normal;}
|
165
|
+
.h2Annex
|
166
|
+
{mso-style-priority:2;
|
167
|
+
mso-style-unhide:no;
|
168
|
+
mso-style-qformat:yes;
|
169
|
+
mso-style-parent:"Heading 1";
|
170
|
+
mso-style-link:"Heading 2 Char";
|
171
|
+
mso-style-next:Normal;
|
172
|
+
margin-top:3.0pt;
|
173
|
+
margin-right:0cm;
|
174
|
+
margin-bottom:12.0pt;
|
175
|
+
margin-left:0cm;
|
176
|
+
text-indent:0cm;
|
177
|
+
line-height:12.5pt;
|
178
|
+
mso-pagination:widow-orphan;
|
179
|
+
page-break-after:avoid;
|
180
|
+
mso-outline-level:2;
|
181
|
+
mso-hyphenate:none;
|
182
|
+
tab-stops:27.0pt 35.0pt;
|
183
|
+
font-size:12.0pt;
|
184
|
+
mso-bidi-font-size:11.0pt;
|
185
|
+
font-family:$headerfont;
|
186
|
+
mso-fareast-font-family:$headerfont;
|
187
|
+
mso-ansi-language:EN-GB;
|
188
|
+
mso-fareast-language:JA;
|
189
|
+
mso-bidi-font-weight:normal;}
|
165
190
|
h2
|
166
191
|
{mso-style-priority:2;
|
167
192
|
mso-style-unhide:no;
|
@@ -91,7 +91,7 @@ module IsoDoc
|
|
91
91
|
|
92
92
|
def appendix_names(clause, num)
|
93
93
|
clause.xpath(ns("./appendix")).each_with_index do |c, i|
|
94
|
-
@anchors[c["id"]] = anchor_struct(i + 1, nil, @appendix_lbl)
|
94
|
+
@anchors[c["id"]] = anchor_struct(i + 1, nil, @appendix_lbl, "clause")
|
95
95
|
@anchors[c["id"]][:level] = 2
|
96
96
|
@anchors[c["id"]][:container] = clause["id"]
|
97
97
|
end
|
@@ -116,7 +116,8 @@ module IsoDoc
|
|
116
116
|
|
117
117
|
def eref_localities1_zh(target, type, from, to)
|
118
118
|
subsection = from&.text&.match(/\./)
|
119
|
-
ret = "
|
119
|
+
ret = type == "list" ? "" : ","
|
120
|
+
ret += " 第#{from.text}" if from
|
120
121
|
ret += "–#{to}" if to
|
121
122
|
loc = (@locality[type] || type.sub(/^locality:/, "").capitalize )
|
122
123
|
ret += " #{loc}" unless subsection && type == "clause" || type == "list" || target.match(/^IEV$/)
|
@@ -127,7 +128,7 @@ module IsoDoc
|
|
127
128
|
def eref_localities1(target, type, from, to, lang = "en")
|
128
129
|
subsection = from&.text&.match(/\./)
|
129
130
|
return l10n(eref_localities1_zh(target, type, from, to)) if lang == "zh"
|
130
|
-
ret = ","
|
131
|
+
ret = type == "list" ? "" : ","
|
131
132
|
loc = @locality[type] || type.sub(/^locality:/, "").capitalize
|
132
133
|
ret += " #{loc}" unless subsection && type == "clause" || type == "list" || target.match(/^IEV$/)
|
133
134
|
ret += " #{from.text}" if from
|
@@ -135,6 +136,11 @@ module IsoDoc
|
|
135
136
|
ret += ")" if type == "list"
|
136
137
|
l10n(ret)
|
137
138
|
end
|
139
|
+
|
140
|
+
def prefix_container(container, linkend, target)
|
141
|
+
delim = get_anchors[target][:type] == "listitem" ? " " : ", "
|
142
|
+
l10n(get_anchors[container][:xref] + delim + linkend)
|
143
|
+
end
|
138
144
|
end
|
139
145
|
end
|
140
146
|
end
|
@@ -114,7 +114,7 @@ module IsoDoc
|
|
114
114
|
|
115
115
|
def appendix_names(clause, num)
|
116
116
|
clause.xpath(ns("./appendix")).each_with_index do |c, i|
|
117
|
-
@anchors[c["id"]] = anchor_struct(i + 1, nil, @appendix_lbl)
|
117
|
+
@anchors[c["id"]] = anchor_struct(i + 1, nil, @appendix_lbl, "clause")
|
118
118
|
@anchors[c["id"]][:level] = 2
|
119
119
|
@anchors[c["id"]][:container] = clause["id"]
|
120
120
|
end
|
@@ -137,9 +137,10 @@ module IsoDoc
|
|
137
137
|
end
|
138
138
|
end
|
139
139
|
|
140
|
-
|
140
|
+
def eref_localities1_zh(target, type, from, to)
|
141
141
|
subsection = from&.text&.match(/\./)
|
142
|
-
ret = "
|
142
|
+
ret = type == "list" ? "" : ","
|
143
|
+
ret += " 第#{from.text}" if from
|
143
144
|
ret += "–#{to}" if to
|
144
145
|
loc = (@locality[type] || type.sub(/^locality:/, "").capitalize )
|
145
146
|
ret += " #{loc}" unless subsection && type == "clause" || type == "list" || target.match(/^IEV$/)
|
@@ -150,7 +151,7 @@ module IsoDoc
|
|
150
151
|
def eref_localities1(target, type, from, to, lang = "en")
|
151
152
|
subsection = from&.text&.match(/\./)
|
152
153
|
return l10n(eref_localities1_zh(target, type, from, to)) if lang == "zh"
|
153
|
-
ret = ","
|
154
|
+
ret = type == "list" ? "" : ","
|
154
155
|
loc = @locality[type] || type.sub(/^locality:/, "").capitalize
|
155
156
|
ret += " #{loc}" unless subsection && type == "clause" || type == "list" || target.match(/^IEV$/)
|
156
157
|
ret += " #{from.text}" if from
|
@@ -158,6 +159,11 @@ module IsoDoc
|
|
158
159
|
ret += ")" if type == "list"
|
159
160
|
l10n(ret)
|
160
161
|
end
|
162
|
+
|
163
|
+
def prefix_container(container, linkend, target)
|
164
|
+
delim = get_anchors[target][:type] == "listitem" ? " " : ", "
|
165
|
+
l10n(get_anchors[container][:xref] + delim + linkend)
|
166
|
+
end
|
161
167
|
end
|
162
168
|
end
|
163
169
|
end
|
data/lib/metanorma-iso.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require "asciidoctor" unless defined? Asciidoctor::Converter
|
2
2
|
require_relative "asciidoctor/iso/converter"
|
3
|
-
require_relative "
|
3
|
+
require_relative "metanorma/iso/version"
|
4
4
|
require_relative "isodoc/iso/html_convert"
|
5
5
|
require_relative "isodoc/iso/word_convert"
|
6
6
|
require "asciidoctor/extensions"
|
data/metanorma-iso.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
lib = File.expand_path("../lib", __FILE__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require "
|
5
|
+
require "metanorma/iso/version"
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
8
|
spec.name = "metanorma-iso"
|
9
|
-
spec.version =
|
9
|
+
spec.version = Metanorma::ISO::VERSION
|
10
10
|
spec.authors = ["Ribose Inc."]
|
11
11
|
spec.email = ["open.source@ribose.com"]
|
12
12
|
|
@@ -48,4 +48,5 @@ Gem::Specification.new do |spec|
|
|
48
48
|
spec.add_development_dependency "timecop", "~> 0.9"
|
49
49
|
spec.add_development_dependency "metanorma", "~> 0.2.6"
|
50
50
|
spec.add_development_dependency "isobib", "~> 0.3.0"
|
51
|
+
spec.add_development_dependency "ietfbib", "~> 0.4.0"
|
51
52
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
require "isobib"
|
3
|
+
require "ietfbib"
|
3
4
|
|
4
5
|
RSpec.describe Asciidoctor::ISO do
|
5
6
|
it "processes simple ISO reference" do
|
@@ -626,7 +627,7 @@ OUTPUT
|
|
626
627
|
end
|
627
628
|
|
628
629
|
def mock_rfcbib_get_rfc8341
|
629
|
-
expect(
|
630
|
+
expect(IETFBib::RfcBibliography).to receive(:get).with("RFC 8341", nil, {}) do
|
630
631
|
IsoBibItem.from_xml(<<~"OUTPUT")
|
631
632
|
<bibitem id="RFC8341">
|
632
633
|
<title format="text/plain" language="en" script="Latn">Network Configuration Access Control Model</title>
|
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_ae3d8762.8f8c.4cd3"
|
3
3
|
|
4
|
-
------=
|
4
|
+
------=_NextPart_ae3d8762.8f8c.4cd3
|
5
5
|
Content-Location: file:///C:/Doc/spec/assets/iso.htm
|
6
6
|
Content-Type: text/html; charset="utf-8"
|
7
7
|
|
@@ -509,31 +509,6 @@ table.dl {
|
|
509
509
|
margin-bottom: 11.0pt;
|
510
510
|
margin-left: 20.15pt; }
|
511
511
|
|
512
|
-
.h2Annex {
|
513
|
-
mso-style-priority: 2;
|
514
|
-
mso-style-unhide: no;
|
515
|
-
mso-style-qformat: yes;
|
516
|
-
mso-style-link: "Heading 2 Char";
|
517
|
-
mso-style-next: Normal;
|
518
|
-
margin-top: 3.0pt;
|
519
|
-
margin-right: 0cm;
|
520
|
-
margin-bottom: 12.0pt;
|
521
|
-
margin-left: 0cm;
|
522
|
-
text-indent: 0cm;
|
523
|
-
line-height: 12.5pt;
|
524
|
-
mso-pagination: widow-orphan;
|
525
|
-
page-break-after: avoid;
|
526
|
-
mso-hyphenate: none;
|
527
|
-
tab-stops: 27.0pt 35.0pt;
|
528
|
-
font-size: 12.0pt;
|
529
|
-
mso-bidi-font-size: 11.0pt;
|
530
|
-
font-family: "Cambria", serif;
|
531
|
-
font-weight: bold;
|
532
|
-
mso-fareast-font-family: "Cambria", serif;
|
533
|
-
mso-ansi-language: EN-GB;
|
534
|
-
mso-fareast-language: JA;
|
535
|
-
mso-bidi-font-weight: normal; }
|
536
|
-
|
537
512
|
ol {
|
538
513
|
margin-bottom: 0cm; }
|
539
514
|
|
@@ -843,11 +818,11 @@ Switzerland<p class="MsoNormal"></p></span></p>
|
|
843
818
|
<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
|
844
819
|
\o "1-2" \h \z \u <span style="mso-element:field-separator"></span></span>
|
845
820
|
<span class="MsoHyperlink"><span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
846
|
-
<a href="#
|
821
|
+
<a href="#_Toc808706670">Foreword<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
847
822
|
<span style="mso-tab-count:1 dotted">. </span>
|
848
823
|
</span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
849
824
|
<span style="mso-element:field-begin"></span></span>
|
850
|
-
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF
|
825
|
+
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc808706670 \h </span>
|
851
826
|
<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>
|
852
827
|
<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>
|
853
828
|
|
@@ -880,7 +855,7 @@ Switzerland<p class="MsoNormal"></p></span></p>
|
|
880
855
|
</html>
|
881
856
|
|
882
857
|
|
883
|
-
------=
|
858
|
+
------=_NextPart_ae3d8762.8f8c.4cd3
|
884
859
|
Content-Location: file:///C:/Doc/spec/assets/iso_files/filelist.xml
|
885
860
|
Content-Transfer-Encoding: base64
|
886
861
|
Content-Type: application/xml
|
@@ -890,7 +865,7 @@ ICAgICAgIDxvOk1haW5GaWxlIEhSZWY9Ii4uL3NwZWMvYXNzZXRzL2lzby5odG0iLz4gIDxvOkZp
|
|
890
865
|
bGUgSFJlZj0iZmlsZWxpc3QueG1sIi8+CiAgPG86RmlsZSBIUmVmPSJoZWFkZXIuaHRtbCIvPgo8
|
891
866
|
L3htbD4K
|
892
867
|
|
893
|
-
------=
|
868
|
+
------=_NextPart_ae3d8762.8f8c.4cd3
|
894
869
|
Content-Location: file:///C:/Doc/spec/assets/iso_files/header.html
|
895
870
|
Content-Transfer-Encoding: base64
|
896
871
|
Content-Type: text/html charset="utf-8"
|
@@ -1083,4 +1058,4 @@ cD4NCg0KPHAgY2xhc3M9TXNvRm9vdGVyPjxzcGFuIGxhbmc9RU4tQVUgc3R5bGU9J2ZvbnQtc2l6
|
|
1083
1058
|
ZToxMC4wcHQ7Jz7CqQ0KJm5ic3A7Jm5ic3A74oCTIEFsbCByaWdodHMgcmVzZXJ2ZWQ8bzpwPjwv
|
1084
1059
|
bzpwPjwvc3Bhbj48L3A+DQoNCjwvZGl2Pg0KDQoNCg0KPC9ib2R5Pg0KDQo8L2h0bWw+DQo=
|
1085
1060
|
|
1086
|
-
------=
|
1061
|
+
------=_NextPart_ae3d8762.8f8c.4cd3--
|
data/spec/examples/rice.adoc
CHANGED
@@ -446,7 +446,7 @@ All parts of kernels which get stuck in the perforations of a sieve should be co
|
|
446
446
|
|
447
447
|
[[figureA-1]]
|
448
448
|
.Split-it-right sample divider
|
449
|
-
image::
|
449
|
+
image::rice_img/rice_image1.png[]
|
450
450
|
|
451
451
|
=== Determination
|
452
452
|
|
@@ -594,7 +594,7 @@ Report the results as specified in <<clause7>>, giving the results calculated us
|
|
594
594
|
|
595
595
|
[[figureC-1]]
|
596
596
|
.Typical gelatinization curve
|
597
|
-
image::
|
597
|
+
image::rice_img/rice_image2.png[]
|
598
598
|
footnote:[The time stem:[t_90] was estimated to be 18,2 min for this example.]
|
599
599
|
|
600
600
|
*Key*
|
@@ -610,13 +610,13 @@ NOTE: These results are based on a study carried out on three different types of
|
|
610
610
|
.Stages of gelatinization
|
611
611
|
====
|
612
612
|
.Initial stages: No grains are fully gelatinized (ungelatinized starch granules are visible inside the kernels)
|
613
|
-
image::
|
613
|
+
image::rice_img/rice_image3_1.png[]
|
614
614
|
|
615
615
|
.Intermediate stages: Some fully gelatinized kernels are visible
|
616
|
-
image::
|
616
|
+
image::rice_img/rice_image3_2.png[]
|
617
617
|
|
618
618
|
.Final stages: All kernels are fully gelatinized
|
619
|
-
image::
|
619
|
+
image::rice_img/rice_image3_3.png[]
|
620
620
|
|
621
621
|
====
|
622
622
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/isodoc/inline_spec.rb
CHANGED
@@ -240,7 +240,7 @@ RSpec.describe IsoDoc do
|
|
240
240
|
<a href="#ISO712">ISO 712, Table 1</a>
|
241
241
|
<a href="#ISO712">ISO 712, Table 1–1</a>
|
242
242
|
<a href="#ISO712">ISO 712, Clause 1, Table 1</a>
|
243
|
-
<a href="#ISO712">ISO 712, Clause 1
|
243
|
+
<a href="#ISO712">ISO 712, Clause 1 a)</a>
|
244
244
|
<a href="#ISO712">ISO 712, Clause 1</a>
|
245
245
|
<a href="#ISO712">ISO 712, 1.5</a>
|
246
246
|
<a href="#ISO712">A</a>
|
@@ -339,16 +339,16 @@ RSpec.describe IsoDoc do
|
|
339
339
|
INPUT
|
340
340
|
html = File.read("test.html").sub(/^.*<main class="main-section">/m, '<main class="main-section">').
|
341
341
|
sub(%r{</main>.*$}m, "</main>")
|
342
|
-
expect(`ls
|
342
|
+
expect(`ls test_images`).to match(/\.png$/)
|
343
343
|
expect(html.gsub(/\/[0-9a-f-]+\.png/, "/_.png")).to be_equivalent_to <<~"OUTPUT"
|
344
344
|
<main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
|
345
345
|
<br />
|
346
346
|
<div>
|
347
347
|
<h1 class="ForewordTitle">Foreword</h1>
|
348
348
|
<div id="_" class="figure">
|
349
|
-
<img src="
|
350
|
-
<img src="
|
351
|
-
<img src="
|
349
|
+
<img src="test_images/_.png" height="776" width="922" />
|
350
|
+
<img src="test_images/_.png" height="800" width="53" />
|
351
|
+
<img src="test_images/_.png" height="83" width="99" />
|
352
352
|
<p class="FigureTitle" align="center">Figure 1 — Split-it-right sample divider</p></div>
|
353
353
|
</div>
|
354
354
|
<p class="zzSTDTitle1"></p>
|
data/spec/isodoc/xref_spec.rb
CHANGED
@@ -1196,12 +1196,12 @@ RSpec.describe IsoDoc do
|
|
1196
1196
|
<div>
|
1197
1197
|
<h1 class="ForewordTitle">Foreword</h1>
|
1198
1198
|
<p>
|
1199
|
-
<a href="#N">Clause 1
|
1200
|
-
<a href="#note1">3.1
|
1201
|
-
<a href="#note2">3.1
|
1202
|
-
<a href="#AN">A.1
|
1203
|
-
<a href="#Anote1">A.2
|
1204
|
-
<a href="#Anote2">A.2
|
1199
|
+
<a href="#N">Clause 1 a)</a>
|
1200
|
+
<a href="#note1">3.1 List 1 a)</a>
|
1201
|
+
<a href="#note2">3.1 List 2 a)</a>
|
1202
|
+
<a href="#AN">A.1 a)</a>
|
1203
|
+
<a href="#Anote1">A.2 List 1 a)</a>
|
1204
|
+
<a href="#Anote2">A.2 List 2 a)</a>
|
1205
1205
|
</p>
|
1206
1206
|
</div>
|
1207
1207
|
<p class="zzSTDTitle1"/>
|
@@ -1299,12 +1299,12 @@ RSpec.describe IsoDoc do
|
|
1299
1299
|
<div>
|
1300
1300
|
<h1 class="ForewordTitle">Foreword</h1>
|
1301
1301
|
<p>
|
1302
|
-
<a href="#N">Clause 1
|
1303
|
-
<a href="#note1">Clause 1
|
1304
|
-
<a href="#note2">Clause 1
|
1305
|
-
<a href="#AN">Clause 1
|
1306
|
-
<a href="#Anote1">Clause 1
|
1307
|
-
<a href="#Anote2">Clause 1
|
1302
|
+
<a href="#N">Clause 1 a)</a>
|
1303
|
+
<a href="#note1">Clause 1 a.1)</a>
|
1304
|
+
<a href="#note2">Clause 1 a.1.i)</a>
|
1305
|
+
<a href="#AN">Clause 1 a.1.i.A)</a>
|
1306
|
+
<a href="#Anote1">Clause 1 a.1.i.A.I)</a>
|
1307
|
+
<a href="#Anote2">Clause 1 a.1.i.A.I.a)</a>
|
1308
1308
|
</p>
|
1309
1309
|
</div>
|
1310
1310
|
<p class="zzSTDTitle1"/>
|
@@ -19,8 +19,7 @@ RSpec.describe Metanorma::Iso::Processor do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
it "registers version against metanorma" do
|
22
|
-
expect(processor.version.to_s).to match(%r{^
|
23
|
-
expect(processor.version.to_s).to match(%r{/IsoDoc })
|
22
|
+
expect(processor.version.to_s).to match(%r{^Metanorma::ISO })
|
24
23
|
end
|
25
24
|
|
26
25
|
it "generates IsoDoc XML from a blank document" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -262,6 +262,20 @@ dependencies:
|
|
262
262
|
- - "~>"
|
263
263
|
- !ruby/object:Gem::Version
|
264
264
|
version: 0.3.0
|
265
|
+
- !ruby/object:Gem::Dependency
|
266
|
+
name: ietfbib
|
267
|
+
requirement: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - "~>"
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: 0.4.0
|
272
|
+
type: :development
|
273
|
+
prerelease: false
|
274
|
+
version_requirements: !ruby/object:Gem::Requirement
|
275
|
+
requirements:
|
276
|
+
- - "~>"
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: 0.4.0
|
265
279
|
description: |
|
266
280
|
metanorma-iso lets you write ISO standards in AsciiDoc syntax.
|
267
281
|
|
@@ -307,7 +321,6 @@ files:
|
|
307
321
|
- lib/asciidoctor/iso/validate_requirements.rb
|
308
322
|
- lib/asciidoctor/iso/validate_section.rb
|
309
323
|
- lib/asciidoctor/iso/validate_style.rb
|
310
|
-
- lib/asciidoctor/iso/version.rb
|
311
324
|
- lib/isodoc/iso/html/header.html
|
312
325
|
- lib/isodoc/iso/html/html_iso_intro.html
|
313
326
|
- lib/isodoc/iso/html/html_iso_titlepage.html
|
@@ -325,6 +338,7 @@ files:
|
|
325
338
|
- lib/metanorma-iso.rb
|
326
339
|
- lib/metanorma/iso.rb
|
327
340
|
- lib/metanorma/iso/processor.rb
|
341
|
+
- lib/metanorma/iso/version.rb
|
328
342
|
- metanorma-iso.gemspec
|
329
343
|
- spec/asciidoctor-iso/base_spec.rb
|
330
344
|
- spec/asciidoctor-iso/blocks_spec.rb
|
@@ -363,11 +377,11 @@ files:
|
|
363
377
|
- spec/examples/rice.adoc
|
364
378
|
- spec/examples/rice.preview.html
|
365
379
|
- spec/examples/rice.sh
|
366
|
-
- spec/examples/
|
367
|
-
- spec/examples/
|
368
|
-
- spec/examples/
|
369
|
-
- spec/examples/
|
370
|
-
- spec/examples/
|
380
|
+
- spec/examples/rice_img/rice_image1.png
|
381
|
+
- spec/examples/rice_img/rice_image2.png
|
382
|
+
- spec/examples/rice_img/rice_image3_1.png
|
383
|
+
- spec/examples/rice_img/rice_image3_2.png
|
384
|
+
- spec/examples/rice_img/rice_image3_3.png
|
371
385
|
- spec/isodoc/i18n_spec.rb
|
372
386
|
- spec/isodoc/inline_spec.rb
|
373
387
|
- spec/isodoc/iso_spec.rb
|