metanorma-iec 1.0.8 → 1.1.3

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/.github/workflows/macos.yml +0 -1
  3. data/.github/workflows/ubuntu.yml +10 -7
  4. data/.github/workflows/windows.yml +0 -1
  5. data/Rakefile +2 -0
  6. data/lib/asciidoctor/iec/biblio.rng +1 -1
  7. data/lib/asciidoctor/iec/converter.rb +5 -0
  8. data/lib/asciidoctor/iec/front.rb +1 -1
  9. data/lib/asciidoctor/iec/isodoc.rng +427 -0
  10. data/lib/asciidoctor/iec/isostandard.rng +3 -0
  11. data/lib/asciidoctor/iec/reqt.rng +23 -0
  12. data/lib/isodoc/iec/base_convert.rb +10 -65
  13. data/lib/isodoc/iec/html/htmlstyle.css +962 -0
  14. data/lib/isodoc/iec/html/htmlstyle.scss +0 -3
  15. data/lib/isodoc/iec/html/isodoc.css +845 -0
  16. data/lib/isodoc/iec/html/isodoc.scss +0 -1
  17. data/lib/isodoc/iec/html/wordstyle.css +2013 -0
  18. data/lib/isodoc/iec/html/wordstyle.scss +0 -1
  19. data/lib/isodoc/iec/iec.international-standard.xsl +1130 -524
  20. data/lib/isodoc/iec/pdf_convert.rb +2 -12
  21. data/lib/isodoc/iec/presentation_xml_convert.rb +10 -0
  22. data/lib/isodoc/iec/word_convert.rb +4 -4
  23. data/lib/isodoc/iec/xref.rb +45 -0
  24. data/lib/metanorma-iec.rb +2 -0
  25. data/lib/metanorma/iec/processor.rb +6 -8
  26. data/lib/metanorma/iec/version.rb +1 -1
  27. data/metanorma-iec.gemspec +3 -2
  28. data/spec/asciidoctor-iec/base_spec.rb +5 -5
  29. data/spec/asciidoctor-iec/cleanup_spec.rb +1 -1
  30. data/spec/asciidoctor-iec/iev_spec.rb +2 -2
  31. data/spec/isodoc/blocks_spec.rb +12 -18
  32. data/spec/isodoc/i18n_spec.rb +4 -4
  33. data/spec/isodoc/iev_spec.rb +7 -10
  34. data/spec/isodoc/inline_spec.rb +9 -9
  35. data/spec/isodoc/iso_spec.rb +4 -4
  36. data/spec/isodoc/metadata_spec.rb +2 -2
  37. data/spec/isodoc/postproc_spec.rb +3 -3
  38. data/spec/isodoc/ref_spec.rb +5 -5
  39. data/spec/isodoc/section_spec.rb +9 -9
  40. data/spec/isodoc/terms_spec.rb +10 -12
  41. data/spec/metanorma/processor_spec.rb +2 -5
  42. data/spec/spec_helper.rb +7 -0
  43. metadata +29 -11
@@ -362,6 +362,9 @@
362
362
  <data type="boolean"/>
363
363
  </attribute>
364
364
  </optional>
365
+ <optional>
366
+ <attribute name="number"/>
367
+ </optional>
365
368
  <optional>
366
369
  <attribute name="subsequence"/>
367
370
  </optional>
@@ -30,9 +30,22 @@
30
30
  <data type="boolean"/>
31
31
  </attribute>
32
32
  </optional>
33
+ <optional>
34
+ <attribute name="number"/>
35
+ </optional>
33
36
  <optional>
34
37
  <attribute name="subsequence"/>
35
38
  </optional>
39
+ <optional>
40
+ <attribute name="keep-with-next">
41
+ <data type="boolean"/>
42
+ </attribute>
43
+ </optional>
44
+ <optional>
45
+ <attribute name="keep-lines-together">
46
+ <data type="boolean"/>
47
+ </attribute>
48
+ </optional>
36
49
  <attribute name="id">
37
50
  <data type="ID"/>
38
51
  </attribute>
@@ -141,6 +154,16 @@
141
154
  <data type="boolean"/>
142
155
  </attribute>
143
156
  </optional>
157
+ <optional>
158
+ <attribute name="keep-with-next">
159
+ <data type="boolean"/>
160
+ </attribute>
161
+ </optional>
162
+ <optional>
163
+ <attribute name="keep-lines-together">
164
+ <data type="boolean"/>
165
+ </attribute>
166
+ </optional>
144
167
  <oneOrMore>
145
168
  <ref name="BasicBlock"/>
146
169
  </oneOrMore>
@@ -8,6 +8,10 @@ module IsoDoc
8
8
  @meta = Metadata.new(lang, script, labels)
9
9
  end
10
10
 
11
+ def xref_init(lang, script, klass, labels, options)
12
+ @xrefs = Xref.new(lang, script, klass, labels, options)
13
+ end
14
+
11
15
  def boilerplate(node, out)
12
16
  # processed in foreword instead
13
17
  end
@@ -16,6 +20,7 @@ module IsoDoc
16
20
  f = isoxml.at(ns("//foreword"))
17
21
  b = isoxml.at(ns("//boilerplate/legal-statement"))
18
22
  page_break(out)
23
+ iec_orgname(out)
19
24
  middle_title(out)
20
25
  out.div **attr_code(id: f ? f["id"] : "") do |s|
21
26
  s.h1(**{ class: "ForewordTitle" }) { |h1| h1 << @foreword_lbl }
@@ -27,10 +32,13 @@ module IsoDoc
27
32
  end
28
33
  end
29
34
 
30
- def middle_title(out)
35
+ def iec_orgname(out)
31
36
  out.p(**{ class: "zzSTDTitle1" }) { |p| p << @labels["IEC"] }
32
37
  out.p(**{ class: "zzSTDTitle1" }) { |p| p << "____________" }
33
38
  out.p(**{ class: "zzSTDTitle1" }) { |p| p << "&nbsp;" }
39
+ end
40
+
41
+ def middle_title(out)
34
42
  title1 = @meta.get[:doctitlemain]&.sub(/\s+$/, "")
35
43
  @meta.get[:doctitleintro] and
36
44
  title1 = "#{@meta.get[:doctitleintro]} &mdash; #{title1}"
@@ -67,17 +75,9 @@ module IsoDoc
67
75
  super.merge(y)
68
76
  end
69
77
 
70
- def annex_name_lbl(clause, num)
71
- obl = l10n("(#{@inform_annex_lbl})")
72
- obl = l10n("(#{@norm_annex_lbl})") if clause["obligation"] == "normative"
73
- l10n("<b>#{@annex_lbl} #{num}</b><br/><br/>#{obl}")
74
- end
75
-
76
78
  def convert1(docxml, filename, dir)
77
79
  id = docxml&.at(ns("//bibdata/docnumber"))&.text
78
80
  @is_iev = id == "60050"
79
- id = docxml&.at(ns("//bibdata/docidentifier[@type = 'iso']"))&.text
80
- m = /60050-(\d+)/.match(id) and @iev_part = m[1]
81
81
  super
82
82
  end
83
83
 
@@ -94,10 +94,6 @@ module IsoDoc
94
94
  end
95
95
  end
96
96
 
97
- def introduction_names(clause)
98
- return super unless @is_iev
99
- end
100
-
101
97
  def bibliography(isoxml, out)
102
98
  return super unless @is_iev
103
99
  end
@@ -116,7 +112,7 @@ module IsoDoc
116
112
  out.div **attr_code(id: node["id"]) do |div|
117
113
  out.p(**{ class: "zzSTDTitle2" }) do |p|
118
114
  p.b do |b|
119
- b << "#{anchor(node['id'], :label)} "
115
+ b << "#{@xrefs.anchor(node['id'], :label)} "
120
116
  node&.at(ns("./title"))&.children&.each { |c2| parse(c2, b) }
121
117
  end
122
118
  end
@@ -126,28 +122,6 @@ module IsoDoc
126
122
  end
127
123
  end
128
124
 
129
- def initial_anchor_names(d)
130
- super
131
- return unless @is_iev
132
- terms_iev_names(d)
133
- middle_section_asset_names(d)
134
- termnote_anchor_names(d)
135
- termexample_anchor_names(d)
136
- end
137
-
138
- def terms_iev_names(d)
139
- d.xpath(ns("//sections/clause/terms")).each_with_index do |t, i|
140
- num = "#{@iev_part}-%02d" % [i+1]
141
- @anchors[t["id"]] =
142
- { label: num, xref: l10n("#{@labels["section_iev"]}-#{num}"), level: 2,
143
- type: "clause" }
144
- t.xpath(ns("./term")).each_with_index do |c, i|
145
- num2 = "%02d" % [i+1]
146
- section_names1(c, "#{num}-#{num2}", 3)
147
- end
148
- end
149
- end
150
-
151
125
  def termref_cleanup(docxml)
152
126
  return super unless @is_iev
153
127
  docxml.
@@ -192,35 +166,6 @@ module IsoDoc
192
166
  end
193
167
  end
194
168
 
195
- def admonition_parse(node, out)
196
- type = node["type"]
197
- name = admonition_name(node, type)
198
- out.div **{ id: node["id"], class: admonition_class(node) } do |div|
199
- node.first_element_child.name == "p" ?
200
- admonition_p_parse(node, div, name) : admonition_parse1(node, div, name)
201
- end
202
- end
203
-
204
- def admonition_parse1(node, div, name)
205
- div.p do |p|
206
- admonition_name_parse(node, p, name) if name
207
- end
208
- node.children.each { |n| parse(n, div) unless n.name == "name" }
209
- end
210
-
211
- def admonition_p_parse(node, div, name)
212
- div.p do |p|
213
- admonition_name_parse(node, p, name) if name
214
- node.first_element_child.children.each { |n| parse(n, p) }
215
- end
216
- node.element_children[1..-1].each { |n| parse(n, div) }
217
- end
218
-
219
- def admonition_name_parse(_node, div, name)
220
- name.children.each { |n| parse(n, div) }
221
- div << " &mdash; "
222
- end
223
-
224
169
  def clause_parse_title(node, div, c1, out)
225
170
  IsoDoc::Common.instance_method(:clause_parse_title).bind(self).call(node, div, c1, out)
226
171
  end
@@ -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; }