metanorma-iso 1.1.5 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +11 -9
- data/appveyor.yml +7 -2
- data/lib/asciidoctor/iso/biblio.rng +44 -15
- data/lib/asciidoctor/iso/cleanup.rb +1 -2
- data/lib/asciidoctor/iso/front.rb +45 -14
- data/lib/asciidoctor/iso/isodoc.rng +128 -71
- data/lib/asciidoctor/iso/isostandard.rng +29 -304
- data/lib/asciidoctor/iso/reqt.rng +5 -0
- data/lib/asciidoctor/iso/validate.rb +49 -8
- data/lib/isodoc/iso/base_convert.rb +190 -0
- data/lib/isodoc/iso/html_convert.rb +2 -165
- data/lib/isodoc/iso/i18n-en.yaml +11 -0
- data/lib/isodoc/iso/i18n-fr.yaml +10 -0
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +8 -0
- data/lib/isodoc/iso/metadata.rb +71 -8
- data/lib/isodoc/iso/word_convert.rb +3 -168
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +4 -4
- data/spec/asciidoctor-iso/base_spec.rb +210 -24
- data/spec/asciidoctor-iso/refs_spec.rb +3 -382
- data/spec/asciidoctor-iso/validate_spec.rb +81 -0
- data/spec/assets/iso.doc +27 -26
- data/spec/assets/iso.html +1 -1
- data/spec/isodoc/metadata_spec.rb +28 -26
- data/spec/isodoc/postproc_spec.rb +7 -7
- data/spec/spec_helper.rb +4 -5
- metadata +25 -22
- data/docs/styling-output-html.adoc +0 -37
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_ba7557de.8346.4bce"
|
3
3
|
|
4
|
-
------=
|
4
|
+
------=_NextPart_ba7557de.8346.4bce
|
5
5
|
Content-Location: file:///C:/Doc/iso.htm
|
6
6
|
Content-Type: text/html; charset="utf-8"
|
7
7
|
|
@@ -891,11 +891,11 @@ Switzerland<p class="MsoNormal"></p></span></p>
|
|
891
891
|
<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
|
892
892
|
\o "1-2" \h \z \u <span style="mso-element:field-separator"></span></span>
|
893
893
|
<span class="MsoHyperlink"><span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
894
|
-
<a href="#
|
894
|
+
<a href="#_Toc881003173">Foreword<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
895
895
|
<span style="mso-tab-count:1 dotted">. </span>
|
896
896
|
</span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
|
897
897
|
<span style="mso-element:field-begin"></span></span>
|
898
|
-
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF
|
898
|
+
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc881003173 \h </span>
|
899
899
|
<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>
|
900
900
|
<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>
|
901
901
|
|
@@ -932,7 +932,7 @@ Switzerland<p class="MsoNormal"></p></span></p>
|
|
932
932
|
</html>
|
933
933
|
|
934
934
|
|
935
|
-
------=
|
935
|
+
------=_NextPart_ba7557de.8346.4bce
|
936
936
|
Content-Location: file:///C:/Doc/iso_files/filelist.xml
|
937
937
|
Content-Transfer-Encoding: base64
|
938
938
|
Content-Type: application/xml
|
@@ -942,7 +942,7 @@ ICAgICAgIDxvOk1haW5GaWxlIEhSZWY9Ii4uL3NwZWMvYXNzZXRzL2lzby5odG0iLz4gIDxvOkZp
|
|
942
942
|
bGUgSFJlZj0iZmlsZWxpc3QueG1sIi8+CiAgPG86RmlsZSBIUmVmPSJoZWFkZXIuaHRtbCIvPgo8
|
943
943
|
L3htbD4K
|
944
944
|
|
945
|
-
------=
|
945
|
+
------=_NextPart_ba7557de.8346.4bce
|
946
946
|
Content-Location: file:///C:/Doc/iso_files/header.html
|
947
947
|
Content-Transfer-Encoding: base64
|
948
948
|
Content-Type: text/html charset="utf-8"
|
@@ -1116,23 +1116,24 @@ LWVuZCc+PC9zcGFuPjwvc3Bhbj48L2I+PCFbZW5kaWZdLS0+PHNwYW4NCmxhbmc9RU4tR0Igc3R5
|
|
1116
1116
|
bGU9J2ZvbnQtc2l6ZToxMC4wcHQ7bXNvLWJpZGktZm9udC1zaXplOjExLjBwdCc+PG86cD48L286
|
1117
1117
|
cD48L3NwYW4+PC9wPg0KDQo8L2Rpdj4NCg0KPGRpdiBzdHlsZT0nbXNvLWVsZW1lbnQ6Zm9vdGVy
|
1118
1118
|
JyBpZD1mND4NCg0KPHAgY2xhc3M9TXNvRm9vdGVyPjxiIHN0eWxlPSdtc28tYmlkaS1mb250LXdl
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1119
|
+
aWdodDpub3JtYWwnPjxzcGFuPklDUyBYWFg8bzpwPjwvbzpwPjwvc3Bhbj48L2I+PC9wPg0KDQo8
|
1120
|
+
cCBjbGFzcz1Nc29Gb290ZXIgc3R5bGU9J21hcmdpbi10b3A6MGNtJz48c3BhbiBsYW5nPUVOLUFV
|
1121
|
+
IHN0eWxlPSdmb250LXNpemU6DQoxMC4wcHQ7bXNvLWFuc2ktbGFuZ3VhZ2U6RU4tQVUnPlByaWNl
|
1122
|
+
IGJhc2VkIG9uIDwvc3Bhbj48IS0tW2lmIHN1cHBvcnRGaWVsZHNdPjxzcGFuDQpsYW5nPUVOLUFV
|
1123
|
+
IHN0eWxlPSdmb250LXNpemU6MTAuMHB0O21zby1hbnNpLWxhbmd1YWdlOkVOLUFVJz48c3Bhbg0K
|
1124
|
+
c3R5bGU9J21zby1lbGVtZW50OmZpZWxkLWJlZ2luJz48L3NwYW4+PHNwYW4gc3R5bGU9J21zby1z
|
1125
|
+
cGFjZXJ1bjp5ZXMnPsKgPC9zcGFuPk5VTVBBR0VTPHNwYW4NCnN0eWxlPSdtc28tc3BhY2VydW46
|
1126
|
+
eWVzJz7CoCA8L3NwYW4+XCogTUVSR0VGT1JNQVQgPHNwYW4gc3R5bGU9J21zby1lbGVtZW50OmZp
|
1127
|
+
ZWxkLXNlcGFyYXRvcic+PC9zcGFuPjwvc3Bhbj48IVtlbmRpZl0tLT48c3Bhbg0KbGFuZz1FTi1B
|
1128
|
+
VSBzdHlsZT0nZm9udC1zaXplOjEwLjBwdDttc28tYW5zaS1sYW5ndWFnZTpFTi1BVSc+PHNwYW4N
|
1129
|
+
CnN0eWxlPSdtc28tbm8tcHJvb2Y6eWVzJz4yNjwvc3Bhbj48L3NwYW4+PCEtLVtpZiBzdXBwb3J0
|
1130
|
+
RmllbGRzXT48c3Bhbg0KbGFuZz1FTi1BVSBzdHlsZT0nZm9udC1zaXplOjEwLjBwdDttc28tYW5z
|
1131
|
+
aS1sYW5ndWFnZTpFTi1BVSc+PHNwYW4NCnN0eWxlPSdtc28tZWxlbWVudDpmaWVsZC1lbmQnPjwv
|
1132
|
+
c3Bhbj48L3NwYW4+PCFbZW5kaWZdLS0+PHNwYW4gbGFuZz1FTi1BVQ0Kc3R5bGU9J2ZvbnQtc2l6
|
1133
|
+
ZToxMC4wcHQ7bXNvLWFuc2ktbGFuZ3VhZ2U6RU4tQVUnPiBwYWdlczxvOnA+PC9vOnA+PC9zcGFu
|
1134
|
+
PjwvcD4NCg0KPHAgY2xhc3M9TXNvRm9vdGVyPjxzcGFuIGxhbmc9RU4tQVUgc3R5bGU9J2ZvbnQt
|
1135
|
+
c2l6ZToxMC4wcHQ7Jz7CqQ0KJm5ic3A7Jm5ic3A74oCTIEFsbCByaWdodHMgcmVzZXJ2ZWQ8bzpw
|
1136
|
+
PjwvbzpwPjwvc3Bhbj48L3A+DQoNCjwvZGl2Pg0KDQoNCg0KPC9ib2R5Pg0KDQo8L2h0bWw+DQo=
|
1137
|
+
|
1138
|
+
|
1139
|
+
------=_NextPart_ba7557de.8346.4bce--
|
data/spec/assets/iso.html
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
<script type="text/javascript" src="https://cdn.rawgit.com/jgallen23/toc/0.3.2/dist/toc.min.js"></script>
|
14
14
|
<script type="text/javascript">function toclevel() { var i; var text = "";
|
15
15
|
for(i = 1; i <= 2; i++) {
|
16
|
-
if (i > 1) { text += ","; } text += "h" + i + ":not(.TermNum)"; }
|
16
|
+
if (i > 1) { text += ","; } text += "h" + i + ":not(:empty):not(.TermNum)"; }
|
17
17
|
return text;}
|
18
18
|
</script>
|
19
19
|
|
@@ -9,21 +9,14 @@ RSpec.describe IsoDoc::Iso::Metadata do
|
|
9
9
|
INPUT
|
10
10
|
expect(Hash[c.info(Nokogiri::XML(<<~"INPUT"), nil).sort]).to be_equivalent_to <<~"OUTPUT"
|
11
11
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
12
|
-
<bibdata type="
|
13
|
-
|
14
|
-
<title-
|
15
|
-
<title-
|
16
|
-
<title-
|
17
|
-
|
18
|
-
|
19
|
-
<title-intro language="fr" format="text/plain">Céréales et légumineuses</title-intro>
|
20
|
-
<title-main language="fr" format="text/plain">Spécification et méthodes d'essai</title-main>
|
21
|
-
<title-part language="fr" format="text/plain">Riz</title-part>
|
22
|
-
</title>
|
12
|
+
<bibdata type="standard">
|
13
|
+
<title type="title-intro" language="en" format="text/plain">Cereals and pulses</title>
|
14
|
+
<title type="title-main" language="en" format="text/plain">Specifications and test methods</title>
|
15
|
+
<title type="title-part" language="en" format="text/plain">Rice</title>
|
16
|
+
<title type="title-intro" language="fr" format="text/plain">Céréales et légumineuses</title>
|
17
|
+
<title type="title-main" language="fr" format="text/plain">Spécification et méthodes d'essai</title>
|
18
|
+
<title type="title-part" language="fr" format="text/plain">Riz</title>
|
23
19
|
<docidentifier type="iso">ISO/PreCD3 17301-1</docidentifier>
|
24
|
-
<docidentifier type="iso-structured">
|
25
|
-
<project-number part="1">ISO/PreCD3 17301</project-number>
|
26
|
-
</docidentifier>
|
27
20
|
<docidentifier type="iso-tc">17301</docidentifier>
|
28
21
|
<date type="published"><on>2011</on></date>
|
29
22
|
<date type="accessed"><on>2012</on></date>
|
@@ -62,16 +55,22 @@ RSpec.describe IsoDoc::Iso::Metadata do
|
|
62
55
|
</organization>
|
63
56
|
</owner>
|
64
57
|
</copyright>
|
58
|
+
<ext>
|
59
|
+
<doctype>international-standard</doctype>
|
65
60
|
<editorialgroup>
|
66
61
|
<technical-committee number="34">Food products</technical-committee>
|
67
62
|
<subcommittee number="4">Cereals and pulses</subcommittee>
|
68
63
|
<workgroup number="3">Rice Group</workgroup>
|
69
64
|
<secretariat>GB</secretariat>
|
70
65
|
</editorialgroup>
|
66
|
+
<structuredidentifier>
|
67
|
+
<project-number part="1">ISO/PreCD3 17301</project-number>
|
68
|
+
</structuredidentifier>
|
69
|
+
</ext>
|
71
70
|
</bibdata>
|
72
71
|
</iso-standard>
|
73
72
|
INPUT
|
74
|
-
|
73
|
+
{:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :authors=>[], :authors_affiliations=>{}, :createddate=>"2010–2011", :docnumber=>"ISO/PreCD3 17301-1", :docsubtitle=>"Céréales et légumineuses — Spécification et méthodes d'essai — Partie 1: Riz", :docsubtitleintro=>"Céréales et légumineuses", :docsubtitlemain=>"Spécification et méthodes d'essai", :docsubtitlepart=>"Riz", :docsubtitlepartlabel=>"Partie 1", :doctitle=>"Cereals and pulses — Specifications and test methods — Part 1: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Rice", :doctitlepartlabel=>"Part 1", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :edition=>"2", :editorialgroup=>["TC 34", "SC 4", "WG 3"], :ics=>"XXX", :obsoleteddate=>"2014", :obsoletes=>nil, :obsoletes_part=>nil, :publisheddate=>"2011", :revdate=>"2016-05-01", :sc=>"SC 4", :secretariat=>"GB", :stage=>"30", :stage_int=>30, :stageabbr=>"PreCD3", :tc=>"TC 34", :tc_docnumber=>"17301", :unpublished=>true, :wg=>"WG 3"}
|
75
74
|
OUTPUT
|
76
75
|
end
|
77
76
|
|
@@ -82,21 +81,18 @@ OUTPUT
|
|
82
81
|
INPUT
|
83
82
|
expect(Hash[c.info(Nokogiri::XML(<<~"INPUT"), nil).sort]).to be_equivalent_to <<~"OUTPUT"
|
84
83
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
85
|
-
<bibdata type="
|
84
|
+
<bibdata type="standard">
|
86
85
|
<title>
|
87
|
-
<title-intro language="en" format="text/plain">Cereals and pulses</title
|
88
|
-
<title-main language="en" format="text/plain">Specifications and test methods</title
|
89
|
-
<title-part language="en" format="text/plain">Rice</title
|
86
|
+
<title type="title-intro" language="en" format="text/plain">Cereals and pulses</title>
|
87
|
+
<title type="title-main" language="en" format="text/plain">Specifications and test methods</title>
|
88
|
+
<title type="title-part" language="en" format="text/plain">Rice</title>
|
90
89
|
</title>
|
91
90
|
<title>
|
92
|
-
<title-intro language="fr" format="text/plain">Céréales et légumineuses</title
|
93
|
-
<title-main language="fr" format="text/plain">Spécification et méthodes d'essai</title
|
94
|
-
<title-part language="fr" format="text/plain">Riz</title
|
91
|
+
<title type="title-intro" language="fr" format="text/plain">Céréales et légumineuses</title>
|
92
|
+
<title type="title-main" language="fr" format="text/plain">Spécification et méthodes d'essai</title>
|
93
|
+
<title type="title-part" language="fr" format="text/plain">Riz</title>
|
95
94
|
</title>
|
96
95
|
<docidentifier type="iso">ISO/IEC/CD 17301-1-3</docidentifier>
|
97
|
-
<docidentifier type="iso-structured">
|
98
|
-
<project-number part="1" subpart="3">ISO/IEC/CD 17301</project-number>
|
99
|
-
</docidentifier>
|
100
96
|
<docidentifier type="iso-tc">17301</docidentifier>
|
101
97
|
<contributor>
|
102
98
|
<role type="author"/>
|
@@ -134,6 +130,8 @@ OUTPUT
|
|
134
130
|
<locality type="clause"><referenceFrom>3.1</referenceFrom></locality>
|
135
131
|
<docidentifier>IEC 8121</docidentifier>
|
136
132
|
</relation>
|
133
|
+
<ext>
|
134
|
+
<doctype>international-standard</doctype>
|
137
135
|
<editorialgroup>
|
138
136
|
<technical-committee number="34" type="ABC">Food products</technical-committee>
|
139
137
|
<subcommittee number="4" type="DEF">Cereals and pulses</subcommittee>
|
@@ -141,10 +139,14 @@ OUTPUT
|
|
141
139
|
</editorialgroup>
|
142
140
|
<ics><code>1.2.3</code></ics>
|
143
141
|
<ics><code>1.2.3</code></ics>
|
142
|
+
<structuredidentifier>
|
143
|
+
<project-number part="1" subpart="3">ISO/IEC/CD 17301</project-number>
|
144
|
+
</strucuredidentifier>
|
145
|
+
</ext>
|
144
146
|
</bibdata>
|
145
147
|
</iso-standard>
|
146
148
|
INPUT
|
147
|
-
{:
|
149
|
+
{:agency=>"ISO/IEC", :authors=>[], :authors_affiliations=>{}, :docnumber=>"ISO/IEC/CD 17301-1-3", :docsubtitle=>"Céréales et légumineuses — Spécification et méthodes d'essai — Partie 1–3: Riz", :docsubtitleintro=>"Céréales et légumineuses", :docsubtitlemain=>"Spécification et méthodes d'essai", :docsubtitlepart=>"Riz", :docsubtitlepartlabel=>"Partie 1–3", :doctitle=>"Cereals and pulses — Specifications and test methods — Part 1–3: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Rice", :doctitlepartlabel=>"Part 1–3", :doctype=>"International Standard", :docyear=>"2016", :draft=>nil, :draftinfo=>"", :edition=>nil, :editorialgroup=>["ABC 34", "DEF 4", "GHI 3"], :ics=>"1.2.3, 1.2.3", :obsoletes=>"IEC 8121", :obsoletes_part=>"3.1", :revdate=>nil, :sc=>"DEF 4", :secretariat=>"XXXX", :stage=>"60", :stage_int=>60, :stageabbr=>"IS", :tc=>"ABC 34", :tc_docnumber=>"17301", :unpublished=>false, :wg=>"GHI 3"}
|
148
150
|
OUTPUT
|
149
151
|
end
|
150
152
|
|
@@ -9,9 +9,9 @@ RSpec.describe IsoDoc do
|
|
9
9
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
10
10
|
<bibdata>
|
11
11
|
<title>
|
12
|
-
<title-intro language="en" format="text/plain">Cereals and pulses</title
|
13
|
-
<title-main language="en" format="text/plain">Specifications and test methods</title
|
14
|
-
<title-part language="en" format="text/plain">Rice</title
|
12
|
+
<title type="title-intro" language="en" format="text/plain">Cereals and pulses</title>
|
13
|
+
<title type="title-main" language="en" format="text/plain">Specifications and test methods</title>
|
14
|
+
<title type="title-part" language="en" format="text/plain">Rice</title>
|
15
15
|
</title>
|
16
16
|
</bibdata>
|
17
17
|
<preface><foreword>
|
@@ -35,9 +35,9 @@ RSpec.describe IsoDoc do
|
|
35
35
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
36
36
|
<bibdata>
|
37
37
|
<title>
|
38
|
-
<title-intro language="en" format="text/plain">Cereals and pulses</title
|
39
|
-
<title-main language="en" format="text/plain">Specifications and test methods</title
|
40
|
-
<title-part language="en" format="text/plain">Rice</title
|
38
|
+
<title type="title-intro" language="en" format="text/plain">Cereals and pulses</title>
|
39
|
+
<title type="title-main" language="en" format="text/plain">Specifications and test methods</title>
|
40
|
+
<title type="title-part" language="en" format="text/plain">Rice</title>
|
41
41
|
</title>
|
42
42
|
</bibdata>
|
43
43
|
<preface><foreword>
|
@@ -485,7 +485,7 @@ RSpec.describe IsoDoc do
|
|
485
485
|
<p class="MsoNormal">Hello</p>
|
486
486
|
<p class="MsoNormal">Key</p>
|
487
487
|
<p class="MsoNormal"><b>Key</b></p><div class="figdl"><table class="figdl"><tr><td valign="top" align="left"><p align="left" style="margin-left:0pt;text-align:left;" class="MsoNormal"><p class="MsoNormal">A</p></p></td><td valign="top"><p class="MsoNormal">B</p></td></tr></table></div>
|
488
|
-
|
488
|
+
<p class="FigureTitle" align="center">Figure A.1</p></div>
|
489
489
|
</div>
|
490
490
|
</div>
|
491
491
|
<br clear="all" style="page-break-before:left;mso-break-type:section-break"/>
|
data/spec/spec_helper.rb
CHANGED
@@ -89,11 +89,7 @@ HDR
|
|
89
89
|
BLANK_HDR = <<~"HDR"
|
90
90
|
<?xml version="1.0" encoding="UTF-8"?>
|
91
91
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
92
|
-
<bibdata type="
|
93
|
-
<title>
|
94
|
-
</title>
|
95
|
-
<title>
|
96
|
-
</title>
|
92
|
+
<bibdata type="standard">
|
97
93
|
<contributor>
|
98
94
|
<role type="author"/>
|
99
95
|
<organization>
|
@@ -123,11 +119,14 @@ BLANK_HDR = <<~"HDR"
|
|
123
119
|
</organization>
|
124
120
|
</owner>
|
125
121
|
</copyright>
|
122
|
+
<ext>
|
123
|
+
<doctype>article</doctype>
|
126
124
|
<editorialgroup>
|
127
125
|
<technical-committee/>
|
128
126
|
<subcommittee/>
|
129
127
|
<workgroup/>
|
130
128
|
</editorialgroup>
|
129
|
+
</ext>
|
131
130
|
</bibdata>
|
132
131
|
HDR
|
133
132
|
|
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.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -44,42 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.10.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: iev
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 0.2.0
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 0.2.0
|
54
|
+
version: 0.10.0
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: metanorma-standoc
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
59
|
- - "~>"
|
74
60
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
61
|
+
version: 1.2.0
|
76
62
|
type: :runtime
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
66
|
- - "~>"
|
81
67
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.
|
68
|
+
version: 1.2.0
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: bundler
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -234,6 +220,20 @@ dependencies:
|
|
234
220
|
- - "~>"
|
235
221
|
- !ruby/object:Gem::Version
|
236
222
|
version: 0.3.0
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: iev
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - "~>"
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: 0.2.0
|
230
|
+
type: :development
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - "~>"
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: 0.2.0
|
237
237
|
description: |
|
238
238
|
metanorma-iso lets you write ISO standards in AsciiDoc syntax.
|
239
239
|
|
@@ -274,7 +274,6 @@ files:
|
|
274
274
|
- docs/outputs.adoc
|
275
275
|
- docs/quickstart.adoc
|
276
276
|
- docs/replacing-asciidoc.adoc
|
277
|
-
- docs/styling-output-html.adoc
|
278
277
|
- docs/styling-output-msword.adoc
|
279
278
|
- lib/asciidoctor/iso/base.rb
|
280
279
|
- lib/asciidoctor/iso/biblio.rng
|
@@ -290,6 +289,7 @@ files:
|
|
290
289
|
- lib/asciidoctor/iso/validate_requirements.rb
|
291
290
|
- lib/asciidoctor/iso/validate_section.rb
|
292
291
|
- lib/asciidoctor/iso/validate_style.rb
|
292
|
+
- lib/isodoc/iso/base_convert.rb
|
293
293
|
- lib/isodoc/iso/html/header.html
|
294
294
|
- lib/isodoc/iso/html/html_iso_intro.html
|
295
295
|
- lib/isodoc/iso/html/html_iso_titlepage.html
|
@@ -302,6 +302,9 @@ files:
|
|
302
302
|
- lib/isodoc/iso/html/word_iso_titlepage.html
|
303
303
|
- lib/isodoc/iso/html/wordstyle.scss
|
304
304
|
- lib/isodoc/iso/html_convert.rb
|
305
|
+
- lib/isodoc/iso/i18n-en.yaml
|
306
|
+
- lib/isodoc/iso/i18n-fr.yaml
|
307
|
+
- lib/isodoc/iso/i18n-zh-Hans.yaml
|
305
308
|
- lib/isodoc/iso/metadata.rb
|
306
309
|
- lib/isodoc/iso/word_convert.rb
|
307
310
|
- lib/metanorma-iso.rb
|
@@ -372,7 +375,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
372
375
|
requirements:
|
373
376
|
- - ">="
|
374
377
|
- !ruby/object:Gem::Version
|
375
|
-
version: 2.
|
378
|
+
version: 2.4.0
|
376
379
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
377
380
|
requirements:
|
378
381
|
- - ">="
|
@@ -1,37 +0,0 @@
|
|
1
|
-
= How can I style the resulting HTML output?
|
2
|
-
|
3
|
-
[TIP]
|
4
|
-
====
|
5
|
-
* Clone the metanorma-sample gem: https://github.com/metanorma/metanorma-sample.
|
6
|
-
* Edit the `html_sample_titlepage.html` and `html_sample_intro.html` pages to match your organisation's branding.
|
7
|
-
** Leave the Liquid Template instructions alone (`{{`, `{%`) unless you know what you're doing with them: they are how the pages are populated with metadata.
|
8
|
-
* Edit the `default_fonts()` method in your `IsoDoc::...::HtmlConvert` class, to match your desired fonts.
|
9
|
-
* Edit the `default_file_locations()` method in your `IsoDoc::...::HtmlConvert` class, to match your desired stylesheets and HTML templates.
|
10
|
-
* Edit the `htmlstyle.scss` stylesheet to match your organisation's branding. The classes already in place there are used to style existing blocks of text; refer to the sample documents included in the gem (`spec/examples`) for their use.
|
11
|
-
====
|
12
|
-
|
13
|
-
Styling of output is intended to be configurable.
|
14
|
-
HTML stylesheets are expressed in https://sass-lang.com/guide[SCSS], with their fonts populated through the `default_fonts()` method in the `IsoDoc::...::HtmlConvert` class.
|
15
|
-
Frontispiece content is templated, populated from the metadata parsed in the `IsoDoc::...::Metadata` class, via https://shopify.github.io/liquid/[Liquid templates].
|
16
|
-
The default stylesheets and HTML templates themselves are nominated in the `default_file_locations()` method in the `IsoDoc::...::HtmlConvert` class.
|
17
|
-
That means you can change the styling of output documents readily, so long as you are aware of the functionality of the stylesheet.
|
18
|
-
|
19
|
-
* Styling information is stored in the `.../lib/isodoc/html` folder of the gem, and applies to both Word and HTML content. For HTML content, the relevant files are `html_..._titlepage.html` (title page HTML template), `html_..._intro.html` (introductory HTML template, typically restricted to Table of Contents), `scripts.html` (Javascript scripts), and `htmlstyle.scss` (the HTML stylesheet).
|
20
|
-
* The styling files to be loaded in are set in the `default_file_locations()` method of `IsoDoc::...::HtmlConvert`. The files can be overridden through document variables in the Asciidoc document.
|
21
|
-
* Additional files (e.g. logos) can be loaded in the `initialize()` method of `IsoDoc::...::HtmlConvert`; for them to be access during document generation, they need to be copied to the working directory. (They can be removed subsequently by adding them to the `@files_to_delete` array. All image files are copied into an `_html` subdirectory.)
|
22
|
-
* The HTML templates are populated through Liquid Templates: variables in `{{` correspond to the hash keys for metadata extracted in `IsoDoc::...::Metadata`, and its superclass `IsoDoc::Metadata` in the isodoc gem.
|
23
|
-
* The SCSS stylesheets treat fonts as variables. Those variables are set in `default_fonts()`, which generates variable assignments for SCSS. Stylesheets normally recognise three fonts: `$bodyfont` for body text, `$headerfont` for headers and captions (which may be the same font as `$bodyfont`), and `$monospacefont` for monospace text. Note that `default_fonts()` takes the options passed to initialise `HtmlConvert` as a paremeter; the document language and script can be used to make different font choices for different document scripts. (The existing gems refer to `Latn`, Latin script, and `Hans`, Simplified Chinese script.)
|
24
|
-
* Javascript scripts are populated in `scripts.html`; the scripts already in place in any gem you modify are in live use, and you should work out what they do before removing them. The AnchorJS script, for example, is used to generate navigable anchors in the document.
|
25
|
-
* Additional scripts and fonts may be loaded in the document head through the `html_head()` method of `IsoDoc::...::HtmlConvert`. The existing gems use the document head to load Jquery, the Table of Contents generation script, Google Fonts, and Font Awesome.
|
26
|
-
* The classes in the SCSS stylesheet correspond to static HTML content in the HTML templates, and dynamic HTML content in the `IsoDoc::...::HtmlConvert` class, and its superclasses `IsoDoc::HtmlConvert` and `IsoDoc::Common` in the isodoc gem.
|
27
|
-
|
28
|
-
An HTML document is populated as follows:
|
29
|
-
|
30
|
-
* HTML Head wrapper (in `IsoDoc::HtmlConvert`)
|
31
|
-
** `html_head()` content
|
32
|
-
** `@htmlstylesheet` CSS stylesheet (expected to be in SCSS, generated from SCSS in the `generate_css()` method of `Isodoc::HtmlConvert`).
|
33
|
-
* HTML Body
|
34
|
-
** `@htmlcoverpage` HTML template (optional, corresponds to `html_..._titlepage.html`)
|
35
|
-
** `@htmlintropage` HTML template (optional, corresponds to `html_..._intro.html`)
|
36
|
-
** Document proper (converted from Standoc XML)
|
37
|
-
** `@scripts` Javascript Scripts (optional, corresponds to `scripts.html`)
|