metanorma-iec 1.1.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +2 -0
  3. data/lib/asciidoctor/iec/converter.rb +6 -15
  4. data/lib/asciidoctor/iec/front.rb +4 -4
  5. data/lib/asciidoctor/iec/isodoc.rng +12 -6
  6. data/lib/isodoc/iec/base_convert.rb +9 -41
  7. data/lib/isodoc/iec/html/htmlstyle.css +962 -0
  8. data/lib/isodoc/iec/html/htmlstyle.scss +0 -3
  9. data/lib/isodoc/iec/html/isodoc.css +845 -0
  10. data/lib/isodoc/iec/html/isodoc.scss +0 -1
  11. data/lib/isodoc/iec/html/wordstyle.css +2013 -0
  12. data/lib/isodoc/iec/html/wordstyle.scss +0 -1
  13. data/lib/isodoc/iec/html_convert.rb +2 -0
  14. data/lib/isodoc/iec/i18n-en.yaml +13 -0
  15. data/lib/isodoc/iec/i18n-fr.yaml +13 -0
  16. data/lib/isodoc/iec/i18n-zh-Hans.yaml +11 -0
  17. data/lib/isodoc/iec/i18n.rb +19 -0
  18. data/lib/isodoc/iec/iec.international-standard.xsl +1460 -1247
  19. data/lib/isodoc/iec/init.rb +29 -0
  20. data/lib/isodoc/iec/presentation_xml_convert.rb +26 -1
  21. data/lib/isodoc/iec/word_convert.rb +3 -1
  22. data/lib/isodoc/iec/xref.rb +1 -1
  23. data/lib/metanorma/iec/version.rb +1 -1
  24. data/metanorma-iec.gemspec +3 -2
  25. data/spec/asciidoctor-iec/blocks_spec.rb +1 -1
  26. data/spec/asciidoctor-iec/cleanup_spec.rb +2 -2
  27. data/spec/asciidoctor-iec/iev_spec.rb +74 -1
  28. data/spec/asciidoctor-iec/inline_spec.rb +1 -1
  29. data/spec/asciidoctor-iec/section_spec.rb +17 -15
  30. data/spec/isodoc/blocks_spec.rb +66 -1
  31. data/spec/isodoc/i18n_spec.rb +296 -244
  32. data/spec/isodoc/iev_spec.rb +221 -14
  33. data/spec/isodoc/inline_spec.rb +97 -73
  34. data/spec/isodoc/iso_spec.rb +6 -0
  35. data/spec/isodoc/postproc_spec.rb +15 -29
  36. data/spec/isodoc/ref_spec.rb +129 -2
  37. data/spec/isodoc/section_spec.rb +112 -102
  38. data/spec/isodoc/terms_spec.rb +67 -53
  39. data/spec/metanorma/processor_spec.rb +2 -1
  40. metadata +25 -9
  41. data/lib/asciidoctor/iec/i18n-en.yaml +0 -12
  42. data/lib/asciidoctor/iec/i18n-fr.yaml +0 -11
  43. data/lib/asciidoctor/iec/i18n-zh-Hans.yaml +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1e123d7cd2fe3acbb04fbebfdf53976049971f8f9b88c8bfa349b64fbebaf79f
4
- data.tar.gz: d539598842323c7d723d5c02511bc7966cfd8642ccee84e02b76766ce358d125
3
+ metadata.gz: 45688db5644887e9b7ac5dc95fb4af57229a3c0d4b0cb1d931f19657e4473af7
4
+ data.tar.gz: b0d43cd6942cc0eb05c847406b0ab971b11bc76973e271c7b533ce99d86072c9
5
5
  SHA512:
6
- metadata.gz: 422de6d91b524f4a284bb9bdd8da449f150f17f7455d84c180e3150d26faf6ac87f2a0657e9aaea02fc76de25c9c3c9970c66840056faf83dcbc4381878a4a44
7
- data.tar.gz: a7cfba9b0accd255861edb7ac64e78aca4e7e54f3d0aff449d48dcd5463938866e83904d67152cacbf49d96db297414137a46a3d453b9f30397c7e6655fd9511
6
+ metadata.gz: 3e7eec9b4315b9471bc74160b53c8317858f24b0fd9f4ea302798fd93d15dd05fc61717ea657555b67d7d790664bda8e0f93919aafbd53e9e531e97a6f0811a9
7
+ data.tar.gz: 4304df37874a6fce41f69d88d85ada2e201a809137af439cad37ff76626a045367e8fb812b4c3fff639107bea49ba8bb545f61e69e4522476fe651fc6cf2f460
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
+ require 'isodoc/gem_tasks'
3
4
 
5
+ IsoDoc::GemTasks.install
4
6
  RSpec::Core::RakeTask.new(:spec)
5
7
 
6
8
  task default: :spec
@@ -38,20 +38,6 @@ module Asciidoctor
38
38
  File.join(File.dirname(__FILE__), "iec.rng"))
39
39
  end
40
40
 
41
- def load_yaml(lang, script)
42
- y = if @i18nyaml then YAML.load_file(@i18nyaml)
43
- elsif lang == "en"
44
- YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
45
- elsif lang == "fr"
46
- YAML.load_file(File.join(File.dirname(__FILE__), "i18n-fr.yaml"))
47
- elsif lang == "zh" && script == "Hans"
48
- YAML.load_file(File.join(File.dirname(__FILE__), "i18n-zh-Hans.yaml"))
49
- else
50
- YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
51
- end
52
- super.merge(y)
53
- end
54
-
55
41
  def html_converter(node)
56
42
  node.nil? ? IsoDoc::Iec::HtmlConvert.new({}) :
57
43
  IsoDoc::Iec::HtmlConvert.new(html_extract_attributes(node))
@@ -75,7 +61,7 @@ module Asciidoctor
75
61
  def norm_ref_preface(f)
76
62
  return super unless @is_iev
77
63
  f.at("./title").next =
78
- "<p>#{@norm_empty_pref}</p>"
64
+ "<p>#{@i18n.norm_empty_pref}</p>"
79
65
  end
80
66
 
81
67
  def term_defs_boilerplate(div, source, term, preface, isodoc)
@@ -84,6 +70,11 @@ module Asciidoctor
84
70
 
85
71
  def sts_converter(node)
86
72
  end
73
+
74
+ def sections_names_cleanup(x)
75
+ super
76
+ @is_iev and replace_title(x, "//introduction", @i18n&.introduction_iev)
77
+ end
87
78
  end
88
79
  end
89
80
  end
@@ -3,7 +3,7 @@ module Asciidoctor
3
3
  class Converter < ISO::Converter
4
4
  def metadata_author(node, xml)
5
5
  publishers = node.attr("publisher") || "IEC"
6
- publishers.split(/,[ ]?/).each do |p|
6
+ csv_split(publishers)&.each do |p|
7
7
  xml.contributor do |c|
8
8
  c.role **{ type: "author" }
9
9
  c.organization { |a| organization(a, p) }
@@ -13,7 +13,7 @@ module Asciidoctor
13
13
 
14
14
  def metadata_publisher(node, xml)
15
15
  publishers = node.attr("publisher") || "IEC"
16
- publishers.split(/,[ ]?/).each do |p|
16
+ csv_split(publishers)&.each do |p|
17
17
  xml.contributor do |c|
18
18
  c.role **{ type: "publisher" }
19
19
  c.organization { |a| organization(a, p) }
@@ -22,8 +22,8 @@ module Asciidoctor
22
22
  end
23
23
 
24
24
  def metadata_copyright(node, xml)
25
- publishers = node.attr("publisher") || "IEC"
26
- publishers.split(/,[ ]?/).each do |p|
25
+ publishers = node.attr("copyright-holder") || node.attr("publisher") || "IEC"
26
+ csv_split(publishers)&.each do |p|
27
27
  xml.copyright do |c|
28
28
  c.from (node.attr("copyright-year") || Date.today.year)
29
29
  c.owner do |owner|
@@ -922,6 +922,9 @@
922
922
  <optional>
923
923
  <attribute name="script"/>
924
924
  </optional>
925
+ <optional>
926
+ <attribute name="type"/>
927
+ </optional>
925
928
  <optional>
926
929
  <attribute name="obligation">
927
930
  <choice>
@@ -961,9 +964,6 @@
961
964
  </define>
962
965
  <define name="content-subsection">
963
966
  <element name="clause">
964
- <optional>
965
- <attribute name="type"/>
966
- </optional>
967
967
  <ref name="Content-Section"/>
968
968
  </element>
969
969
  </define>
@@ -992,6 +992,9 @@
992
992
  </choice>
993
993
  </attribute>
994
994
  </optional>
995
+ <optional>
996
+ <attribute name="type"/>
997
+ </optional>
995
998
  <optional>
996
999
  <ref name="section-title"/>
997
1000
  </optional>
@@ -1011,9 +1014,6 @@
1011
1014
  </define>
1012
1015
  <define name="clause">
1013
1016
  <element name="clause">
1014
- <optional>
1015
- <attribute name="type"/>
1016
- </optional>
1017
1017
  <ref name="Clause-Section"/>
1018
1018
  </element>
1019
1019
  </define>
@@ -1042,6 +1042,9 @@
1042
1042
  </choice>
1043
1043
  </attribute>
1044
1044
  </optional>
1045
+ <optional>
1046
+ <attribute name="type"/>
1047
+ </optional>
1045
1048
  <optional>
1046
1049
  <ref name="section-title"/>
1047
1050
  </optional>
@@ -1180,6 +1183,9 @@
1180
1183
  <optional>
1181
1184
  <attribute name="script"/>
1182
1185
  </optional>
1186
+ <optional>
1187
+ <attribute name="type"/>
1188
+ </optional>
1183
1189
  <optional>
1184
1190
  <attribute name="obligation">
1185
1191
  <choice>
@@ -4,14 +4,6 @@ require "metanorma-iso"
4
4
  module IsoDoc
5
5
  module Iec
6
6
  module BaseConvert
7
- def metadata_init(lang, script, labels)
8
- @meta = Metadata.new(lang, script, labels)
9
- end
10
-
11
- def xref_init(lang, script, klass, labels, options)
12
- @xrefs = Xref.new(lang, script, klass, labels, options)
13
- end
14
-
15
7
  def boilerplate(node, out)
16
8
  # processed in foreword instead
17
9
  end
@@ -23,7 +15,7 @@ module IsoDoc
23
15
  iec_orgname(out)
24
16
  middle_title(out)
25
17
  out.div **attr_code(id: f ? f["id"] : "") do |s|
26
- s.h1(**{ class: "ForewordTitle" }) { |h1| h1 << @foreword_lbl }
18
+ s.h1(**{ class: "ForewordTitle" }) { |h1| h1 << @i18n.foreword }
27
19
  @meta.get[:doctype] == "Amendment" or
28
20
  s.div **attr_code(class: "boilerplate_legal") do |s1|
29
21
  b&.elements&.each { |e| parse(e, s1) }
@@ -33,7 +25,7 @@ module IsoDoc
33
25
  end
34
26
 
35
27
  def iec_orgname(out)
36
- out.p(**{ class: "zzSTDTitle1" }) { |p| p << @labels["IEC"] }
28
+ out.p(**{ class: "zzSTDTitle1" }) { |p| p << @i18n.get["IEC"] }
37
29
  out.p(**{ class: "zzSTDTitle1" }) { |p| p << "____________" }
38
30
  out.p(**{ class: "zzSTDTitle1" }) { |p| p << "&nbsp;" }
39
31
  end
@@ -60,39 +52,20 @@ module IsoDoc
60
52
  out.p(**{ class: "zzSTDTitle1" }) { |p| p << "&nbsp;" }
61
53
  end
62
54
 
63
- def load_yaml(lang, script)
64
- y = if @i18nyaml then YAML.load_file(@i18nyaml)
65
- elsif lang == "en"
66
- YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
67
- elsif lang == "fr"
68
- YAML.load_file(File.join(File.dirname(__FILE__), "i18n-fr.yaml"))
69
- elsif lang == "zh" && script == "Hans"
70
- YAML.load_file(File.join(File.dirname(__FILE__),
71
- "i18n-zh-Hans.yaml"))
72
- else
73
- YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
74
- end
75
- super.merge(y)
76
- end
77
-
78
- def convert1(docxml, filename, dir)
79
- id = docxml&.at(ns("//bibdata/docnumber"))&.text
80
- @is_iev = id == "60050"
81
- super
82
- end
83
-
55
+ =begin
84
56
  def introduction(isoxml, out)
85
57
  return super unless @is_iev
86
58
  f = isoxml.at(ns("//introduction")) || return
87
59
  title_attr = { class: "IntroTitle" }
88
60
  page_break(out)
89
61
  out.div **{ class: "Section3", id: f["id"] } do |div|
90
- clause_name(nil, @labels["introduction_iev"], div, title_attr)
62
+ clause_name(nil, @i18n.get["introduction_iev"], div, title_attr)
91
63
  f.elements.each do |e|
92
64
  parse(e, div) unless e.name == "title"
93
65
  end
94
66
  end
95
67
  end
68
+ =end
96
69
 
97
70
  def bibliography(isoxml, out)
98
71
  return super unless @is_iev
@@ -112,7 +85,6 @@ module IsoDoc
112
85
  out.div **attr_code(id: node["id"]) do |div|
113
86
  out.p(**{ class: "zzSTDTitle2" }) do |p|
114
87
  p.b do |b|
115
- b << "#{@xrefs.anchor(node['id'], :label)} "
116
88
  node&.at(ns("./title"))&.children&.each { |c2| parse(c2, b) }
117
89
  end
118
90
  end
@@ -126,10 +98,10 @@ module IsoDoc
126
98
  return super unless @is_iev
127
99
  docxml.
128
100
  gsub(%r{\s*\[/TERMREF\]\s*</p>\s*<p>\s*\[TERMREF\]}, "; ").
129
- gsub(/\[TERMREF\]\s*/, l10n("#{@source_lbl}: ")).
130
- gsub(/\s*\[MODIFICATION\]\s*\[\/TERMREF\]/, l10n(", #{@modified_lbl} [/TERMREF]")).
101
+ gsub(/\[TERMREF\]\s*/, l10n("#{@i18n.source}: ")).
102
+ gsub(/\s*\[MODIFICATION\]\s*\[\/TERMREF\]/, l10n(", #{@i18n.modified} [/TERMREF]")).
131
103
  gsub(/\s*\[\/TERMREF\]\s*/, l10n("")).
132
- gsub(/\s*\[MODIFICATION\]/, l10n(", #{@modified_lbl} &mdash; "))
104
+ gsub(/\s*\[MODIFICATION\]/, l10n(", #{@i18n.modified} &mdash; "))
133
105
  end
134
106
 
135
107
  def set_termdomain(termdomain)
@@ -145,7 +117,7 @@ module IsoDoc
145
117
 
146
118
  def deprecated_term_parse(node, out)
147
119
  out.p **{ class: "DeprecatedTerms", style:"text-align:left;" } do |p|
148
- p << l10n("#{@deprecated_lbl}: ")
120
+ p << l10n("#{@i18n.deprecated}: ")
149
121
  node.children.each { |c| parse(c, p) }
150
122
  term_suffix(node, p)
151
123
  end
@@ -166,10 +138,6 @@ module IsoDoc
166
138
  end
167
139
  end
168
140
 
169
- def clause_parse_title(node, div, c1, out)
170
- IsoDoc::Common.instance_method(:clause_parse_title).bind(self).call(node, div, c1, out)
171
- end
172
-
173
141
  def biblio_list(f, div, biblio)
174
142
  biblio = false
175
143
  super
@@ -0,0 +1,962 @@
1
+ /*
2
+ 0 CSS RESET
3
+ */
4
+ /* http://meyerweb.com/eric/tools/css/reset/
5
+ v2.0 | 20110126
6
+ License: none (public domain)
7
+ */
8
+ html, body, div, span, applet, object, iframe,
9
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
10
+ a, abbr, acronym, address, big, cite, code,
11
+ del, dfn, em, img, ins, kbd, q, s, samp,
12
+ small, strike, strong, sub, sup, tt, var,
13
+ b, u, i, center,
14
+ ol, ul, li,
15
+ fieldset, form, label, legend,
16
+ table, caption, tbody, tfoot, thead, tr, th, td,
17
+ article, aside, canvas, details, embed,
18
+ figure, figcaption, footer, header, hgroup,
19
+ menu, nav, output, ruby, section, summary,
20
+ time, mark, audio, video {
21
+ margin: 0;
22
+ padding: 0; }
23
+
24
+ html, body, div, span, applet, object, iframe,
25
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
26
+ a, abbr, acronym, address, big, cite, code,
27
+ del, dfn, em, img, ins, kbd, q, s, samp,
28
+ small, strike, strong, sub, sup, tt, var,
29
+ b, u, i, center,
30
+ dl, dt, dd, ol, ul, li,
31
+ fieldset, form, label, legend,
32
+ table, caption, tbody, tfoot, thead, tr, th, td,
33
+ article, aside, canvas, details, embed,
34
+ figure, figcaption, footer, header, hgroup,
35
+ menu, nav, output, ruby, section, summary,
36
+ time, mark, audio, video {
37
+ border: 0;
38
+ font-size: 100%; }
39
+
40
+ html, body, div, span, applet, object, iframe,
41
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
42
+ a, abbr, acronym, address, big, cite, code,
43
+ del, dfn, em, img, ins, kbd, q, s, samp,
44
+ small, strike, strong, tt, var,
45
+ b, u, i, center,
46
+ dl, dd, ol, ul, li,
47
+ fieldset, form, label, legend,
48
+ table, caption, tbody, tfoot, thead, tr, th, td,
49
+ article, aside, canvas, details, embed,
50
+ figure, figcaption, footer, header, hgroup,
51
+ menu, nav, output, ruby, section, summary,
52
+ time, mark, audio, video {
53
+ vertical-align: baseline; }
54
+
55
+ html, body, div, span, applet, object, iframe,
56
+ p, blockquote,
57
+ a, abbr, acronym, address, big, cite,
58
+ del, dfn, em, img, ins, q, s,
59
+ small, strike, strong, sub, sup, var,
60
+ b, u, i, center,
61
+ dl, dt, dd, ol, ul, li,
62
+ fieldset, form, label, legend,
63
+ table, caption, tbody, tfoot, thead, tr, th, td,
64
+ article, aside, canvas, details, embed,
65
+ figure, figcaption, footer, header, hgroup,
66
+ menu, nav, output, ruby, section, summary,
67
+ time, mark, audio, video {
68
+ font-family: {{bodyfont}}; }
69
+
70
+ code, pre, tt, kbd, samp {
71
+ font-family: {{monospacefont}};
72
+ font-variant-ligatures: none; }
73
+
74
+ code *, pre *, tt *, kbd *, samp * {
75
+ font-family: {{monospacefont}} !important;
76
+ font-variant-ligatures: none; }
77
+
78
+ article, aside, details, figcaption, figure,
79
+ footer, header, hgroup, menu, nav, section {
80
+ display: block; }
81
+
82
+ table {
83
+ border-collapse: collapse;
84
+ border-spacing: 0; }
85
+
86
+ h1, h2, h3, h4, h5, h6 {
87
+ font-family: {{headerfont}}; }
88
+
89
+ blockquote, q {
90
+ quotes: none; }
91
+ blockquote:before, blockquote:after, q:before, q:after {
92
+ content: '';
93
+ content: none; }
94
+
95
+ .h2Annex {
96
+ font-family: {{headerfont}}; }
97
+
98
+ dl {
99
+ display: grid;
100
+ grid-template-columns: max-content auto; }
101
+ dl dt p, dl dd p {
102
+ margin-top: 0; }
103
+ dl dt {
104
+ grid-column-start: 1; }
105
+ dl dd {
106
+ grid-column-start: 2; }
107
+
108
+ b, strong {
109
+ font-weight: bold; }
110
+
111
+ div.document-stage-band, div.document-type-band {
112
+ background-color: #333333; }
113
+
114
+ #standard-band {
115
+ background-color: #0AC442; }
116
+
117
+ #standard {
118
+ border-bottom: solid 3px #0AC442; }
119
+
120
+ #directive-band {
121
+ background-color: #540D6E; }
122
+
123
+ #directive {
124
+ border-bottom: solid 3px #540D6E; }
125
+
126
+ #guide-band {
127
+ background-color: #D183C9; }
128
+
129
+ #guide {
130
+ border-bottom: solid 3px #D183C9; }
131
+
132
+ #specification-band {
133
+ background-color: #65AFFF; }
134
+
135
+ #specification {
136
+ border-bottom: solid 3px #65AFFF; }
137
+
138
+ #report-band {
139
+ background-color: #3A405A; }
140
+
141
+ #report {
142
+ border-bottom: solid 3px #3A405A; }
143
+
144
+ #amendment-band {
145
+ background-color: #F26430; }
146
+
147
+ #amendment {
148
+ border-bottom: solid 3px #F26430; }
149
+
150
+ #corrigendum-band {
151
+ background-color: #C84630; }
152
+
153
+ #corrigendum {
154
+ border-bottom: solid 3px #C84630; }
155
+
156
+ #administrative-band {
157
+ background-color: #BFAE48; }
158
+
159
+ #administrative {
160
+ border-bottom: solid 3px #BFAE48; }
161
+
162
+ #advisory-band {
163
+ background-color: #BD9391; }
164
+
165
+ #advisory {
166
+ border-bottom: solid 3px #BD9391; }
167
+
168
+ #proposal-band {
169
+ background-color: #39A0ED; }
170
+
171
+ #proposal {
172
+ border-bottom: solid 3px #39A0ED; }
173
+
174
+ #working-draft-band {
175
+ background-color: #2D7393; }
176
+
177
+ #working-draft {
178
+ border-bottom: solid 3px #2D7393; }
179
+
180
+ #committee-draft-band {
181
+ background-color: #2A6B7C; }
182
+
183
+ #committee-draft {
184
+ border-bottom: solid 3px #2A6B7C; }
185
+
186
+ #draft-standard-band {
187
+ background-color: #1C7F7A; }
188
+
189
+ #draft-standard {
190
+ border-bottom: solid 3px #1C7F7A; }
191
+
192
+ #final-draft-band {
193
+ background-color: #53C170; }
194
+
195
+ #final-draft {
196
+ border-bottom: solid 3px #53C170; }
197
+
198
+ #published-band {
199
+ background-color: #069E2D; }
200
+
201
+ #published {
202
+ border-bottom: solid 3px #069E2D; }
203
+
204
+ #withdrawn-band {
205
+ background-color: #004E64; }
206
+
207
+ #withdrawn {
208
+ border-bottom: solid 3px #004E64; }
209
+
210
+ #cancelled-band {
211
+ background-color: #2E382E; }
212
+
213
+ #cancelled {
214
+ border-bottom: solid 3px #2E382E; }
215
+
216
+ body {
217
+ line-height: 1.3; }
218
+
219
+ /* New CSS */
220
+ body {
221
+ margin-left: 298px;
222
+ margin-right: 2em; }
223
+
224
+ main {
225
+ padding-left: 4em;
226
+ padding-right: 2em; }
227
+
228
+ .title-section, .prefatory-section {
229
+ padding-left: 4em;
230
+ padding-top: 2em; }
231
+
232
+ .coverpage_docnumber, .coverpage_techcommittee {
233
+ text-align: right;
234
+ font-size: 0.9em;
235
+ line-height: 0.5em; }
236
+
237
+ .doctitle-en, .doctitle-fr {
238
+ margin-top: 2em;
239
+ text-align: left; }
240
+
241
+ .doctitle-en {
242
+ padding-left: 3em;
243
+ margin-left: -3em;
244
+ /*padding-top: 2em;*/
245
+ padding-bottom: 2em; }
246
+
247
+ .doctitle-en span {
248
+ font-size: 2em;
249
+ line-height: 1.5em; }
250
+
251
+ .doctitle-fr span {
252
+ font-size: 1.5em;
253
+ line-height: 1.2em;
254
+ font-style: italic; }
255
+
256
+ .doctitle-part {
257
+ margin-top: 1em; }
258
+
259
+ /*
260
+ span.title {
261
+ text-transform: uppercase;
262
+ font-size: 1em;
263
+ font-weight: 800;
264
+ }
265
+ */
266
+ span.title, span.subtitle, span.part {
267
+ font-weight: 800; }
268
+
269
+ span.partlabel {
270
+ display: block; }
271
+
272
+ .coverpage_docstage {
273
+ margin-top: 2em;
274
+ margin-bottom: 2em; }
275
+
276
+ .coverpage_warning {
277
+ font-size: 0.9em;
278
+ font-style: italic;
279
+ padding-bottom: 1em; }
280
+
281
+ .boilerplate-copyright p {
282
+ margin-top: 1em;
283
+ display: block; }
284
+
285
+ #boilerplate-message, #boilerplate-name,
286
+ #boilerplate-address {
287
+ font-size: 0.9em; }
288
+
289
+ /* TYPOGRAPHY */
290
+ h1 {
291
+ font-size: 1.5em;
292
+ line-height: 2em;
293
+ margin-top: 2em;
294
+ margin-bottom: 1em; }
295
+
296
+ h2 {
297
+ font-size: 1.2em;
298
+ line-height: 1.5em;
299
+ margin-top: 2em;
300
+ margin-bottom: 1em; }
301
+
302
+ h1, h2, h3, h4, h5, h6 {
303
+ line-height: 1.2; }
304
+
305
+ p {
306
+ margin-top: 1em;
307
+ margin-bottom: 1em; }
308
+
309
+ p.zzSTDTitle1 {
310
+ font-weight: 700;
311
+ font-size: 1.5em;
312
+ text-transform: uppercase; }
313
+
314
+ p.zzSTDTitle2 {
315
+ font-weight: 700;
316
+ font-size: 1.5em; }
317
+
318
+ span.obligation {
319
+ font-weight: 400; }
320
+
321
+ a {
322
+ color: black;
323
+ text-decoration-color: black; }
324
+
325
+ nav a {
326
+ text-decoration: none;
327
+ color: black; }
328
+
329
+ h2 p {
330
+ display: inline; }
331
+
332
+ ul > li {
333
+ list-style: none; }
334
+
335
+ ul > li > p:first-child:before {
336
+ content: "\2014";
337
+ display: inline-block;
338
+ width: 1em;
339
+ margin-left: -1.5em;
340
+ margin-right: 0.5em; }
341
+
342
+ li p {
343
+ /* display: inline-block; */
344
+ margin-bottom: 0.6em;
345
+ line-height: 1.2; }
346
+
347
+ #toc li:before {
348
+ content: " ";
349
+ display: none; }
350
+
351
+ p.AltTerms {
352
+ margin-bottom: 0;
353
+ font-style: italic;
354
+ margin-left: 2em; }
355
+
356
+ p.Terms {
357
+ font-weight: bold;
358
+ margin-top: 0em; }
359
+
360
+ /* Navigation*/
361
+ @media screen and (min-width: 768px) {
362
+ nav {
363
+ position: fixed;
364
+ top: 0;
365
+ bottom: 0;
366
+ left: 0;
367
+ width: 278px;
368
+ font-size: 0.9em;
369
+ overflow: auto;
370
+ padding: 0 0 0 20px;
371
+ background-color: #f5faff; } }
372
+
373
+ @media print {
374
+ nav {
375
+ position: relative;
376
+ width: auto;
377
+ font-size: 0.9em;
378
+ overflow: auto;
379
+ padding: 0;
380
+ margin-right: 0;
381
+ background-color: white; } }
382
+
383
+ @media screen and (min-width: 768px) {
384
+ #toggle {
385
+ position: fixed;
386
+ height: 100%;
387
+ width: 30px;
388
+ background-color: #f5faff;
389
+ color: black !important;
390
+ cursor: pointer;
391
+ z-index: 100; }
392
+ #toggle span {
393
+ text-align: center;
394
+ width: 100%;
395
+ position: absolute;
396
+ top: 50%;
397
+ transform: translate(0, -50%); } }
398
+
399
+ @media screen and (max-width: 768px) {
400
+ #toggle {
401
+ display: none; } }
402
+
403
+ @media print {
404
+ #toggle {
405
+ display: none; } }
406
+
407
+ #toc {
408
+ font-family: {{bodyfont}};
409
+ font-weight: 400; }
410
+ #toc ul {
411
+ margin: 0;
412
+ padding: 0;
413
+ list-style: none; }
414
+ #toc ul li a {
415
+ padding: 5px 10px; }
416
+ #toc ul a {
417
+ color: black;
418
+ text-decoration: none;
419
+ display: block; }
420
+ #toc ul a:hover {
421
+ box-shadow: none;
422
+ color: black; }
423
+ #toc .h2 {
424
+ padding-left: 30px; }
425
+ #toc .h3 {
426
+ padding-left: 50px; }
427
+ #toc .toc-active, #toc li:hover {
428
+ background: black;
429
+ box-shadow: inset -5px 0px 10px -5px black !important; }
430
+ #toc .toc-active a, #toc li:hover a {
431
+ color: black; }
432
+ @media print {
433
+ #toc .toc-active, #toc li:hover {
434
+ background: white;
435
+ box-shadow: none !important; }
436
+ #toc .toc-active a {
437
+ color: black; }
438
+ #toc li:hover a {
439
+ color: black; } }
440
+ @media screen and (max-width: 768px) {
441
+ #toc {
442
+ padding: 0 1.5em;
443
+ overflow: visible; } }
444
+ #toc .toc-active,
445
+ #toc li:hover {
446
+ box-shadow: 0px 1px 0px 0px black !important;
447
+ color: black;
448
+ background: none; }
449
+ #toc ul a:hover {
450
+ box-shadow: none;
451
+ color: black; }
452
+
453
+ @media screen and (min-width: 768px) {
454
+ nav {
455
+ line-height: 1.2em; }
456
+ #toggle {
457
+ border-right: solid black 1px;
458
+ margin-left: -4em;
459
+ margin-top: -2em; }
460
+ .container {
461
+ padding-left: 360px; }
462
+ .rule.toc {
463
+ display: none; }
464
+ h1.toc-contents {
465
+ margin-top: 1em; }
466
+ ul#toc-list {
467
+ padding: 0;
468
+ margin: 0; } }
469
+
470
+ @media screen and (max-width: 768px) {
471
+ #toggle {
472
+ display: none;
473
+ margin-left: -4em;
474
+ margin-top: -2em; }
475
+ body {
476
+ margin-left: 2em; }
477
+ main {
478
+ padding: 0; }
479
+ .title-section, .prefatory-section {
480
+ padding-left: 0;
481
+ padding-top: 0;
482
+ width: 100%; } }
483
+
484
+ div.figure > img {
485
+ margin-left: auto;
486
+ margin-right: auto;
487
+ display: block;
488
+ max-width: 100%;
489
+ height: auto; }
490
+
491
+ /*
492
+ Document types + stages
493
+ */
494
+ .document-type-band {
495
+ left: 0;
496
+ top: 180px;
497
+ height: 100%;
498
+ position: fixed;
499
+ display: block;
500
+ z-index: 102; }
501
+ .document-type-band > :first-child {
502
+ position: relative;
503
+ width: 25px;
504
+ font-weight: 400;
505
+ color: white;
506
+ text-transform: uppercase;
507
+ font-size: 0.9em;
508
+ font-weight: 400;
509
+ letter-spacing: 0.05em;
510
+ margin: 0;
511
+ margin-left: 6px;
512
+ writing-mode: tb-rl;
513
+ -webkit-transform: rotate(180deg);
514
+ -moz-transform: rotate(180deg);
515
+ -o-transform: rotate(180deg);
516
+ white-space: nowrap;
517
+ display: block;
518
+ bottom: 0; }
519
+ @media print {
520
+ .document-type-band {
521
+ display: none; } }
522
+ .document-type-band .document-type {
523
+ top: 20px; }
524
+
525
+ .document-stage-band {
526
+ left: 0;
527
+ top: 0;
528
+ height: 100%;
529
+ position: fixed;
530
+ display: block;
531
+ z-index: 101;
532
+ box-shadow: -5px 0px 10px #1d1d1d; }
533
+ .document-stage-band > :first-child {
534
+ position: relative;
535
+ width: 25px;
536
+ font-weight: 400;
537
+ height: 210px;
538
+ color: white;
539
+ text-transform: uppercase;
540
+ font-size: 0.9em;
541
+ font-weight: 400;
542
+ letter-spacing: 0.05em;
543
+ margin: 0;
544
+ margin-left: 6px;
545
+ writing-mode: tb-rl;
546
+ -webkit-transform: rotate(180deg);
547
+ -moz-transform: rotate(180deg);
548
+ -o-transform: rotate(180deg);
549
+ white-space: nowrap;
550
+ display: block;
551
+ bottom: 0; }
552
+ @media print {
553
+ .document-stage-band {
554
+ display: none; } }
555
+ p.document-stage {
556
+ position: relative;
557
+ width: 25px;
558
+ font-weight: 400;
559
+ height: 210px;
560
+ color: white;
561
+ text-transform: uppercase;
562
+ font-size: 0.9em;
563
+ font-weight: 400;
564
+ letter-spacing: 0.05em;
565
+ margin: 0;
566
+ margin-left: 6px;
567
+ writing-mode: tb-rl;
568
+ -webkit-transform: rotate(180deg);
569
+ -moz-transform: rotate(180deg);
570
+ -o-transform: rotate(180deg);
571
+ white-space: nowrap;
572
+ display: block;
573
+ bottom: 0; }
574
+
575
+ #governance-band p.document-type {
576
+ font-weight: 400;
577
+ height: 230px !important; }
578
+
579
+ p.document-stage {
580
+ font-weight: 300;
581
+ height: 160px; }
582
+
583
+ #standard-band {
584
+ background-color: #0ac442; }
585
+
586
+ #standard {
587
+ border-bottom: solid 3px #0ac442; }
588
+
589
+ #governance {
590
+ border-bottom: solid 3px #750697; }
591
+
592
+ #governance-band {
593
+ background-color: #750697; }
594
+
595
+ #guide {
596
+ border-bottom: solid 3px #48a0e7; }
597
+
598
+ #guide-band {
599
+ background-color: #48a0e7; }
600
+
601
+ .coverpage-maturity {
602
+ font-family: 'Overpass', sans-serif;
603
+ font-weight: 400;
604
+ font-size: 1em;
605
+ margin: 0 0 2em 0;
606
+ text-transform: uppercase; }
607
+
608
+ #working-draft {
609
+ border-bottom: solid 3px #fda706; }
610
+
611
+ #working-draft-band {
612
+ background-color: #fda706; }
613
+
614
+ #committee-draft {
615
+ border-bottom: solid 3px #fd06fd; }
616
+
617
+ #committee-draft-band {
618
+ background-color: #fd06fd; }
619
+
620
+ #draft-standard {
621
+ border-bottom: solid 3px #fdf906; }
622
+
623
+ #draft-standard {
624
+ border-bottom: solid 3px #fdf906; }
625
+
626
+ #standard {
627
+ border-bottom: solid 3px #0ac442; }
628
+
629
+ #standard-band {
630
+ background-color: #0ac442; }
631
+
632
+ #obsolete {
633
+ border-bottom: solid 3px #7e0d13; }
634
+
635
+ #obsolete-band {
636
+ background-color: #7e0d13; }
637
+
638
+ /* 3 Other styles */
639
+ /*
640
+ 3.3 Lists
641
+ */
642
+ ul, ol {
643
+ margin-left: 2em; }
644
+
645
+ #toc-list ul {
646
+ margin-bottom: 0.25em; }
647
+
648
+ #toc-list ol li {
649
+ list-style-type: none; }
650
+
651
+ /* https://github.com/metanorma/metanorma-iso/issues/319 : ordered list rendering */
652
+ ol[type="alphabet"] {
653
+ counter-reset: alphabet; }
654
+
655
+ ol[type="arabic"] {
656
+ counter-reset: arabic; }
657
+
658
+ ol[type="roman"] {
659
+ counter-reset: roman; }
660
+
661
+ ol[type="alphabet_upper"] {
662
+ counter-reset: alphabet_upper; }
663
+
664
+ ol[type="roman_upper"] {
665
+ counter-reset: roman_upper; }
666
+
667
+ ol[type="alphabet"] ol[type="alphabet"] {
668
+ counter-reset: alphabet2; }
669
+
670
+ ol[type="arabic"] ol[type="arabic"] {
671
+ counter-reset: arabic2; }
672
+
673
+ ol[type="roman"] ol[type="roman"] {
674
+ counter-reset: roman2; }
675
+
676
+ ol[type="alphabet_upper"] ol[type="alphabet_upper"] {
677
+ counter-reset: alphabet_upper2; }
678
+
679
+ ol[type="roman_upper"] ol[type="roman_upper"] {
680
+ counter-reset: roman_upper2; }
681
+
682
+ ol {
683
+ counter-reset: alphabet; }
684
+
685
+ ol > li {
686
+ list-style: none;
687
+ position: relative; }
688
+
689
+ ol > li:before {
690
+ position: absolute;
691
+ left: -1.4em; }
692
+
693
+ ol[type="roman"] > li:before {
694
+ left: -2.0em; }
695
+
696
+ ol[type="roman_upper"] > li:before {
697
+ left: -2.3em; }
698
+
699
+ ol[type="alphabet"] > li:before {
700
+ counter-increment: alphabet;
701
+ content: counter(alphabet, lower-alpha) ") "; }
702
+
703
+ ol[type="arabic"] > li:before {
704
+ counter-increment: arabic;
705
+ content: counter(arabic, decimal) ") "; }
706
+
707
+ ol[type="roman"] > li:before {
708
+ counter-increment: roman;
709
+ content: counter(roman, lower-roman) ") "; }
710
+
711
+ ol[type="alphabet_upper"] > li:before {
712
+ counter-increment: alphabet_upper;
713
+ content: counter(alphabet_upper, upper-alpha) ") "; }
714
+
715
+ ol[type="roman_upper"] > li:before {
716
+ counter-increment: roman_upper;
717
+ content: counter(roman_upper, upper-roman) ") "; }
718
+
719
+ ol > li:before {
720
+ counter-increment: alphabet;
721
+ content: counter(alphabet, lower-alpha) ") "; }
722
+
723
+ ol[type="alphabet"] ol[type="alphabet"] > li:before {
724
+ counter-increment: alphabet2;
725
+ content: counter(alphabet2, lower-alpha) ") "; }
726
+
727
+ ol[type="arabic"] ol[type="arabic"] > li:before {
728
+ counter-increment: arabic2;
729
+ content: counter(arabic2, decimal) ") "; }
730
+
731
+ ol[type="roman"] ol[type="roman"] > li:before {
732
+ counter-increment: roman2;
733
+ content: counter(roman2, lower-roman) ") "; }
734
+
735
+ ol[type="alphabet_upper"] ol[type="alphabet_upper"] > li:before {
736
+ counter-increment: alphabet_upper2;
737
+ content: counter(alphabet_upper2, upper-alpha) ") "; }
738
+
739
+ ol[type="roman_upper"] ol[type="roman_upper"] > li:before {
740
+ counter-increment: roman_upper2;
741
+ content: counter(roman_upper2, upper-roman) ") "; }
742
+
743
+ /*
744
+ 3.4 Rules
745
+ */
746
+ .rule {
747
+ width: 100%;
748
+ height: 1px;
749
+ background-color: #0e1a85;
750
+ margin: 2em 0; }
751
+
752
+ /*
753
+ 3.5 Bibliograhy
754
+ */
755
+ p.Biblio,
756
+ p.NormRef {
757
+ margin-top: 1em;
758
+ margin-left: 2em; }
759
+
760
+ /*
761
+ 3.6 Source Code + figures
762
+ */
763
+ .figure,
764
+ pre,
765
+ .pseudocode {
766
+ background-color: #f5faff;
767
+ font-size: 0.8em;
768
+ line-height: 1.6em;
769
+ padding: 1.5em;
770
+ margin: 2em 0 1em 0;
771
+ overflow: auto;
772
+ font-size: 1em; }
773
+ .figure .SourceTitle,
774
+ pre .SourceTitle,
775
+ .pseudocode .SourceTitle {
776
+ font-weight: 700;
777
+ font-size: 1em;
778
+ text-align: center; }
779
+
780
+ pre {
781
+ font-family: {{monospacefont}};
782
+ font-variant-ligatures: none; }
783
+
784
+ .AdmonitionTitle {
785
+ font-weight: 700;
786
+ font-size: 1em;
787
+ text-align: center; }
788
+
789
+ .RecommendationTitle {
790
+ font-weight: 700;
791
+ font-size: 1em;
792
+ text-align: center; }
793
+
794
+ .FigureTitle,
795
+ .SourceTitle {
796
+ font-weight: 700;
797
+ font-size: 1em;
798
+ text-align: center; }
799
+
800
+ /*
801
+ 3.7 Notes
802
+ */
803
+ .Note, .note {
804
+ background-color: #fff495;
805
+ color: #47430c;
806
+ padding: 0.5em;
807
+ margin: 1.5em 0 1.5em 0;
808
+ text-align: left; }
809
+
810
+ .Note p, .note p {
811
+ margin: 0; }
812
+
813
+ .Admonition {
814
+ background-color: #ffcccc;
815
+ color: #47430c;
816
+ padding: 0.5em;
817
+ margin: 1.5em 0 1.5em 0;
818
+ text-align: left; }
819
+
820
+ .Admonition p {
821
+ margin: 0; }
822
+
823
+ /*
824
+ 3.8 Examples
825
+ */
826
+ .example {
827
+ background-color: #e1eef1;
828
+ padding: 0.5em;
829
+ margin: 2em 0 1em 0;
830
+ text-align: left;
831
+ color: #424242;
832
+ padding-left: 2em;
833
+ text-align: left; }
834
+ .example p {
835
+ margin: 0; }
836
+ .example .example-title {
837
+ font-weight: 700;
838
+ text-transform: uppercase;
839
+ margin-left: -1.5em; }
840
+ .example .example-title {
841
+ margin-top: 0; }
842
+ .example pre,
843
+ .example .pseudocode {
844
+ background: none; }
845
+
846
+ /*
847
+ 3.9 Tables
848
+ */
849
+ /*
850
+ 3.9 Tables
851
+ */
852
+ table {
853
+ width: 100%;
854
+ font-weight: 300;
855
+ margin: 1em 0 2em 0;
856
+ margin-left: auto;
857
+ margin-right: auto;
858
+ padding-right: 2em;
859
+ text-align: center; }
860
+ table, table th, table td {
861
+ border: 1px solid black;
862
+ font-size: 0.95em; }
863
+ table th, table td {
864
+ padding: 1em; }
865
+ table td.header {
866
+ font-weigth: 400; }
867
+ table td,
868
+ table th {
869
+ font-size: 0.95em;
870
+ padding: 1em !important; }
871
+
872
+ p.TableTitle {
873
+ text-align: center;
874
+ margin-top: 2.5em;
875
+ font-weight: 800;
876
+ font-size: 1.1em; }
877
+
878
+ .TableFootnote {
879
+ text-align: left !important; }
880
+
881
+ /*
882
+ 3.10 Footnotes
883
+ */
884
+ a.footnote-number, a.TableFootnoteRef, span.TableFootnoteRef {
885
+ vertical-align: super;
886
+ font-size: 0.8em; }
887
+
888
+ .footnote {
889
+ font-size: 0.9em; }
890
+
891
+ sup a {
892
+ vertical-align: super;
893
+ font-size: 0.8em; }
894
+
895
+ #footnote_box {
896
+ font-size: 14px;
897
+ background: white;
898
+ padding: 0 10px;
899
+ margin: 10px;
900
+ border: 1px solid #888;
901
+ -moz-box-shadow: 0px 0px 5px #888;
902
+ -webkit-box-shadow: 0px 0px 5px #888;
903
+ box-shadow: 0px 0px 5px #888; }
904
+
905
+ ol.footnotes-list, aside.footnote {
906
+ margin-left: 1em; }
907
+
908
+ ol.footnotes-list li, aside.footnote {
909
+ font-size: 0.9em;
910
+ vertical-align: top;
911
+ list-style: decimal;
912
+ margin-bottom: 1em; }
913
+
914
+ ol.footnotes-list:first-child {
915
+ margin-top: 2em; }
916
+
917
+ ol.footnotes-list p, aside.footnote p {
918
+ display: inline; }
919
+
920
+ ol > li > p:before {
921
+ content: "";
922
+ display: none; }
923
+
924
+ /*
925
+ 3.11 Blockquotes
926
+ */
927
+ .Quote {
928
+ background-color: #f5faff;
929
+ font-style: italic;
930
+ width: 80%;
931
+ padding: 1.5em;
932
+ margin-top: 2em;
933
+ margin-left: auto;
934
+ margin-right: auto; }
935
+
936
+ /*
937
+ 3.12 Formulas
938
+ */
939
+ .formula {
940
+ background-color: #f5faff;
941
+ padding: 1.5em;
942
+ margin-top: 2em;
943
+ text-align: center; }
944
+
945
+ dl.formula_dl {
946
+ background-color: #f5faff; }
947
+
948
+ /*
949
+ Keywords
950
+ */
951
+ span.keyword {
952
+ font-weight: 600; }
953
+
954
+ .Admonition, .admonition {
955
+ background-color: #ffb3b3;
956
+ /* color: #47430c;*/
957
+ padding: 0.5em;
958
+ margin: 1.5em 0 1.5em 0;
959
+ text-align: left; }
960
+
961
+ .Admonition p, .admonition p {
962
+ margin: 0; }