metanorma-iso 1.10.4 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +3 -33
  3. data/.github/workflows/ubuntu.yml +1 -1
  4. data/.gitignore +26 -0
  5. data/Makefile +1 -1
  6. data/lib/asciidoctor/iso/base.rb +2 -69
  7. data/lib/asciidoctor/iso/cleanup.rb +2 -175
  8. data/lib/asciidoctor/iso/converter.rb +2 -17
  9. data/lib/asciidoctor/iso/deprecated.rb +5 -0
  10. data/lib/asciidoctor/iso/front.rb +2 -156
  11. data/lib/asciidoctor/iso/front_id.rb +2 -221
  12. data/lib/asciidoctor/iso/section.rb +2 -48
  13. data/lib/asciidoctor/iso/validate.rb +2 -171
  14. data/lib/asciidoctor/iso/validate_image.rb +2 -96
  15. data/lib/asciidoctor/iso/validate_requirements.rb +2 -110
  16. data/lib/asciidoctor/iso/validate_section.rb +2 -246
  17. data/lib/asciidoctor/iso/validate_style.rb +2 -169
  18. data/lib/asciidoctor/iso/validate_title.rb +2 -104
  19. data/lib/isodoc/iso/base_convert.rb +14 -31
  20. data/lib/isodoc/iso/html/style-human.css +37 -22
  21. data/lib/isodoc/iso/html/style-human.scss +17 -10
  22. data/lib/isodoc/iso/html/style-iso.css +34 -20
  23. data/lib/isodoc/iso/html/style-iso.scss +13 -7
  24. data/lib/isodoc/iso/html/wordstyle.css +10 -8
  25. data/lib/isodoc/iso/html/wordstyle.scss +10 -8
  26. data/lib/isodoc/iso/html_convert.rb +6 -4
  27. data/lib/isodoc/iso/index.rb +53 -45
  28. data/lib/isodoc/iso/iso.amendment.xsl +1328 -1225
  29. data/lib/isodoc/iso/iso.international-standard.xsl +1328 -1225
  30. data/lib/isodoc/iso/metadata.rb +27 -22
  31. data/lib/isodoc/iso/presentation_xml_convert.rb +41 -16
  32. data/lib/isodoc/iso/sts_convert.rb +2 -4
  33. data/lib/isodoc/iso/word_convert.rb +2 -0
  34. data/lib/metanorma/iso/base.rb +70 -0
  35. data/lib/{asciidoctor → metanorma}/iso/basicdoc.rng +0 -0
  36. data/lib/{asciidoctor → metanorma}/iso/biblio.rng +0 -0
  37. data/lib/{asciidoctor → metanorma}/iso/boilerplate-fr.xml +0 -0
  38. data/lib/{asciidoctor → metanorma}/iso/boilerplate.xml +0 -0
  39. data/lib/metanorma/iso/cleanup.rb +176 -0
  40. data/lib/metanorma/iso/converter.rb +18 -0
  41. data/lib/metanorma/iso/front.rb +170 -0
  42. data/lib/metanorma/iso/front_id.rb +225 -0
  43. data/lib/{asciidoctor → metanorma}/iso/isodoc.rng +35 -2
  44. data/lib/{asciidoctor → metanorma}/iso/isostandard-amd.rng +0 -0
  45. data/lib/{asciidoctor → metanorma}/iso/isostandard.rnc +0 -0
  46. data/lib/{asciidoctor → metanorma}/iso/isostandard.rng +0 -0
  47. data/lib/{asciidoctor → metanorma}/iso/reqt.rng +0 -0
  48. data/lib/metanorma/iso/section.rb +49 -0
  49. data/lib/metanorma/iso/validate.rb +172 -0
  50. data/lib/metanorma/iso/validate_image.rb +97 -0
  51. data/lib/metanorma/iso/validate_requirements.rb +111 -0
  52. data/lib/metanorma/iso/validate_section.rb +247 -0
  53. data/lib/metanorma/iso/validate_style.rb +170 -0
  54. data/lib/metanorma/iso/validate_title.rb +105 -0
  55. data/lib/metanorma/iso/version.rb +1 -1
  56. data/lib/metanorma-iso.rb +1 -1
  57. data/metanorma-iso.gemspec +2 -2
  58. data/spec/isodoc/amd_spec.rb +261 -250
  59. data/spec/isodoc/inline_spec.rb +238 -212
  60. data/spec/isodoc/iso_spec.rb +3 -1
  61. data/spec/isodoc/ref_spec.rb +4 -2
  62. data/spec/isodoc/section_spec.rb +1 -1
  63. data/spec/isodoc/terms_spec.rb +4 -4
  64. data/spec/{asciidoctor → metanorma}/amd_spec.rb +1 -1
  65. data/spec/metanorma/base_spec.rb +1185 -0
  66. data/spec/{asciidoctor → metanorma}/blank_spec.rb +1 -1
  67. data/spec/{asciidoctor → metanorma}/blocks_spec.rb +1 -1
  68. data/spec/{asciidoctor → metanorma}/cleanup_spec.rb +1 -1
  69. data/spec/{asciidoctor → metanorma}/inline_spec.rb +1 -1
  70. data/spec/{asciidoctor → metanorma}/lists_spec.rb +1 -1
  71. data/spec/metanorma/processor_spec.rb +1 -1
  72. data/spec/{asciidoctor → metanorma}/refs_spec.rb +1 -1
  73. data/spec/{asciidoctor → metanorma}/section_spec.rb +1 -1
  74. data/spec/{asciidoctor → metanorma}/table_spec.rb +1 -1
  75. data/spec/{asciidoctor → metanorma}/validate_spec.rb +1 -1
  76. data/spec/spec_helper.rb +1 -1
  77. data/spec/vcr_cassettes/docrels.yml +34 -424
  78. metadata +39 -26
  79. data/spec/asciidoctor/base_spec.rb +0 -1333
@@ -75,6 +75,12 @@ code *, pre *, tt *, kbd *, samp * {
75
75
  font-family: {{monospacefont}} !important;
76
76
  font-variant-ligatures: none; }
77
77
 
78
+ p code, dt code, li code, label code, legend code, caption code, th code, td code,
79
+ p tt, dt tt, li tt, label tt, legend tt, caption tt, th tt, td tt,
80
+ p kbd, dt kbd, li kbd, label kbd, legend kbd, caption kbd, th kbd, td kbd,
81
+ p samp, dt samp, li samp, label samp, legend samp, caption samp, th samp, td samp {
82
+ font-size: {{monospacefontsize}}; }
83
+
78
84
  article, aside, details, figcaption, figure,
79
85
  footer, header, hgroup, menu, nav, section {
80
86
  display: block; }
@@ -86,6 +92,9 @@ table {
86
92
  h1, h2, h3, h4, h5, h6 {
87
93
  font-family: {{headerfont}}; }
88
94
 
95
+ .h1, .h2, .h3, .h4, .h5, .h6 {
96
+ font-family: {{headerfont}}; }
97
+
89
98
  blockquote, q {
90
99
  quotes: none; }
91
100
  blockquote:before, blockquote:after, q:before, q:after {
@@ -338,23 +347,24 @@ span.title {
338
347
  font-size: 0.9em; }
339
348
 
340
349
  /* TYPOGRAPHY */
341
- h1 {
350
+ h1, .h1 {
342
351
  font-weight: 900; }
343
352
 
344
353
  h2,
345
354
  h3,
346
355
  h4,
347
356
  h5,
348
- h6 {
357
+ h6,
358
+ .h2, .h3, .h4, .h5, .h6 {
349
359
  font-weight: 700; }
350
360
 
351
- h1 {
361
+ h1, .h1 {
352
362
  font-size: 1.5em;
353
363
  line-height: 2em;
354
364
  margin-top: 2em;
355
365
  margin-bottom: 1em; }
356
366
 
357
- h2 {
367
+ h2, .h2 {
358
368
  font-size: 1.2em;
359
369
  line-height: 1.5em;
360
370
  margin-top: 2em;
@@ -365,12 +375,13 @@ h2,
365
375
  h3,
366
376
  h4,
367
377
  h5,
368
- h6 {
378
+ h6,
379
+ .h1, .h2, .h3, .h4, .h5, .h6 {
369
380
  line-height: 1.2; }
370
381
 
371
382
  /* override for amendments */
372
383
  {% if doctype == "Amendment" or doctype == "Technical Corrigendum" %}
373
- h1, h2, h3, h4, h5, h6 {
384
+ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
374
385
  font-weight: normal;
375
386
  font-size: initial;
376
387
  font-style: italic;
@@ -379,7 +390,7 @@ h1, h2, h3, h4, h5, h6 {
379
390
  margin-bottom: 1em; }
380
391
 
381
392
  {% endif %}
382
- h2 p {
393
+ h2 p, .h2 p {
383
394
  display: inline; }
384
395
 
385
396
  p {
@@ -401,7 +412,7 @@ a {
401
412
  color: black;
402
413
  text-decoration-color: black; }
403
414
 
404
- h2 p {
415
+ h2 p, .h2 p {
405
416
  display: inline; }
406
417
 
407
418
  ul > li {
@@ -432,44 +443,48 @@ p.Terms {
432
443
  margin-top: 0em; }
433
444
 
434
445
  /* Navigation*/
435
- #toc {
446
+ #toc, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
436
447
  font-family: {{bodyfont}};
437
448
  font-weight: 400; }
438
- #toc ul {
449
+ #toc ul, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) ul {
439
450
  margin: 0;
440
451
  padding: 0;
441
452
  list-style: none; }
442
- #toc ul li a {
453
+ #toc ul li a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) ul li a {
443
454
  padding: 5px 10px; }
444
- #toc ul a {
455
+ #toc ul a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a {
445
456
  text-decoration: none;
446
457
  display: block; }
447
- #toc ul a:hover {
458
+ #toc ul a:hover, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
448
459
  box-shadow: none;
449
460
  color: white; }
450
- #toc .h2 {
461
+ #toc .h2, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .h2 {
451
462
  padding-left: 30px; }
452
- #toc .h3 {
463
+ #toc .h3, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .h3 {
453
464
  padding-left: 50px; }
454
- #toc .toc-active, #toc li:hover {
465
+ #toc .toc-active, #toc li:hover, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
455
466
  background: #1d1d1d;
456
467
  box-shadow: inset -5px 0px 10px -5px #1d1d1d !important; }
457
- #toc .toc-active a, #toc li:hover a {
468
+ #toc .toc-active a, #toc li:hover a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
458
469
  color: white; }
459
470
  @media print {
460
- #toc .toc-active, #toc li:hover {
471
+ #toc .toc-active, #toc li:hover, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
461
472
  background: white;
462
473
  box-shadow: none !important; }
463
- #toc li:hover a {
474
+ #toc li:hover a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
464
475
  color: black; } }
465
476
  @media screen and (max-width: 768px) {
466
- #toc {
477
+ #toc, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
467
478
  padding: 0 1.5em;
468
479
  overflow: visible; } }
469
- #toc li:before {
480
+ #toc li:before, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) li:before {
470
481
  content: " ";
471
482
  display: none; }
472
483
 
484
+ #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
485
+ margin-top: 0;
486
+ margin-bottom: 0; }
487
+
473
488
  nav {
474
489
  line-height: 1.2em; }
475
490
  @media screen and (min-width: 768px) {
@@ -523,7 +538,7 @@ nav {
523
538
  display: none; }
524
539
  h1.toc-contents {
525
540
  margin-top: 1em; }
526
- ul#toc-list {
541
+ ul#toc-list, ul#toc-list > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
527
542
  padding: 0;
528
543
  margin: 0; } }
529
544
 
@@ -140,7 +140,7 @@ span.title {
140
140
 
141
141
  /* TYPOGRAPHY */
142
142
 
143
- h1 {
143
+ h1, .h1 {
144
144
  font-weight: 900;
145
145
  }
146
146
 
@@ -148,18 +148,19 @@ h2,
148
148
  h3,
149
149
  h4,
150
150
  h5,
151
- h6 {
151
+ h6,
152
+ .h2, .h3, .h4, .h5, .h6{
152
153
  font-weight: 700;
153
154
  }
154
155
 
155
- h1 {
156
+ h1, .h1 {
156
157
  font-size: 1.5em;
157
158
  line-height: 2em;
158
159
  margin-top: 2em;
159
160
  margin-bottom: 1em;
160
161
  }
161
162
 
162
- h2 {
163
+ h2, .h2 {
163
164
  font-size: 1.2em;
164
165
  line-height: 1.5em;
165
166
  margin-top: 2em;
@@ -171,7 +172,8 @@ h2,
171
172
  h3,
172
173
  h4,
173
174
  h5,
174
- h6 {
175
+ h6,
176
+ .h1, .h2, .h3, .h4, .h5, .h6 {
175
177
  line-height: 1.2;
176
178
  }
177
179
 
@@ -179,7 +181,7 @@ h6 {
179
181
 
180
182
  {% if doctype == "Amendment" or doctype == "Technical Corrigendum" %}
181
183
 
182
- h1, h2, h3, h4, h5, h6 {
184
+ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
183
185
  font-weight: normal;
184
186
  font-size: initial;
185
187
  font-style: italic;
@@ -190,7 +192,7 @@ h1, h2, h3, h4, h5, h6 {
190
192
 
191
193
  {% endif %}
192
194
 
193
- h2 p {
195
+ h2 p, .h2 p {
194
196
  display: inline;
195
197
  }
196
198
 
@@ -218,7 +220,7 @@ a {
218
220
  text-decoration-color: black;
219
221
  }
220
222
 
221
- h2 p {
223
+ h2 p, .h2 p {
222
224
  display: inline;
223
225
  }
224
226
 
@@ -257,7 +259,7 @@ p.Terms {
257
259
 
258
260
  /* Navigation*/
259
261
 
260
- #toc {
262
+ #toc, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
261
263
  @include toc(null, #1d1d1d, white);
262
264
  @include sidebarToc();
263
265
 
@@ -273,6 +275,11 @@ p.Terms {
273
275
  }
274
276
  }
275
277
 
278
+ #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
279
+ margin-top: 0;
280
+ margin-bottom: 0;
281
+ }
282
+
276
283
  nav {
277
284
  @include sidebarNav(#f7f7f7, 278px, 20px);
278
285
  line-height: 1.2em;
@@ -297,7 +304,7 @@ nav {
297
304
  margin-top: 1em;
298
305
  }
299
306
 
300
- ul#toc-list {
307
+ ul#toc-list, ul#toc-list > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
301
308
  padding: 0;
302
309
  margin: 0;
303
310
  }
@@ -75,6 +75,12 @@ code *, pre *, tt *, kbd *, samp * {
75
75
  font-family: {{monospacefont}} !important;
76
76
  font-variant-ligatures: none; }
77
77
 
78
+ p code, dt code, li code, label code, legend code, caption code, th code, td code,
79
+ p tt, dt tt, li tt, label tt, legend tt, caption tt, th tt, td tt,
80
+ p kbd, dt kbd, li kbd, label kbd, legend kbd, caption kbd, th kbd, td kbd,
81
+ p samp, dt samp, li samp, label samp, legend samp, caption samp, th samp, td samp {
82
+ font-size: {{monospacefontsize}}; }
83
+
78
84
  article, aside, details, figcaption, figure,
79
85
  footer, header, hgroup, menu, nav, section {
80
86
  display: block; }
@@ -86,6 +92,9 @@ table {
86
92
  h1, h2, h3, h4, h5, h6 {
87
93
  font-family: {{headerfont}}; }
88
94
 
95
+ .h1, .h2, .h3, .h4, .h5, .h6 {
96
+ font-family: {{headerfont}}; }
97
+
89
98
  blockquote, q {
90
99
  quotes: none; }
91
100
  blockquote:before, blockquote:after, q:before, q:after {
@@ -315,23 +324,23 @@ span.partlabel {
315
324
  font-size: 0.9em; }
316
325
 
317
326
  /* TYPOGRAPHY */
318
- h1 {
327
+ h1, .h1 {
319
328
  font-size: 1.5em;
320
329
  line-height: 2em;
321
330
  margin-top: 2em;
322
331
  margin-bottom: 1em; }
323
332
 
324
- h2 {
333
+ h2, .h2 {
325
334
  font-size: 1.2em;
326
335
  line-height: 1.5em;
327
336
  margin-top: 2em;
328
337
  margin-bottom: 1em; }
329
338
 
330
- h1, h2, h3, h4, h5, h6 {
339
+ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
331
340
  line-height: 1.2; }
332
341
 
333
342
  {% if doctype == "Amendment" or doctype == "Technical Corrigendum" %}
334
- h1, h2, h3, h4, h5, h6 {
343
+ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
335
344
  font-weight: normal;
336
345
  font-size: initial;
337
346
  font-style: italic; }
@@ -355,7 +364,7 @@ a {
355
364
  color: black;
356
365
  text-decoration-color: black; }
357
366
 
358
- h2 p {
367
+ h2 p, .h2 p {
359
368
  display: inline; }
360
369
 
361
370
  ul > li {
@@ -381,48 +390,53 @@ p.Terms {
381
390
  margin-top: 0em; }
382
391
 
383
392
  /* Navigation*/
384
- #toc {
393
+ #toc, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
385
394
  font-family: {{bodyfont}};
386
395
  font-weight: 400; }
387
- #toc ul {
396
+ #toc ul, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) ul {
388
397
  margin: 0;
389
398
  padding: 0;
390
399
  list-style: none; }
391
- #toc ul li a {
400
+ #toc ul li a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) ul li a {
392
401
  padding: 5px 10px; }
393
- #toc ul a {
402
+ #toc ul a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a {
394
403
  text-decoration: none;
395
404
  display: block; }
396
- #toc ul a:hover {
405
+ #toc ul a:hover, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
397
406
  box-shadow: none;
398
407
  color: black; }
399
- #toc .h2 {
408
+ #toc .h2, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .h2 {
400
409
  padding-left: 30px; }
401
- #toc .h3 {
410
+ #toc .h3, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .h3 {
402
411
  padding-left: 50px; }
403
- #toc .toc-active, #toc li:hover {
412
+ #toc .toc-active, #toc li:hover, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
404
413
  background: #f7f7f7;
405
414
  box-shadow: inset -5px 0px 10px -5px #f7f7f7 !important; }
406
- #toc .toc-active a, #toc li:hover a {
415
+ #toc .toc-active a, #toc li:hover a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
407
416
  color: black; }
408
417
  @media print {
409
- #toc .toc-active, #toc li:hover {
418
+ #toc .toc-active, #toc li:hover, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
410
419
  background: white;
411
420
  box-shadow: none !important; }
412
- #toc li:hover a {
421
+ #toc li:hover a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
413
422
  color: black; } }
414
423
  @media screen and (max-width: 768px) {
415
- #toc {
424
+ #toc, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
416
425
  padding: 0 1.5em;
417
426
  overflow: visible; } }
418
427
  #toc .toc-active,
419
- #toc li:hover {
428
+ #toc li:hover, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active,
429
+ #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
420
430
  box-shadow: 0px 1px 0px 0px black !important;
421
431
  background: none; }
422
- #toc li:before {
432
+ #toc li:before, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) li:before {
423
433
  content: " ";
424
434
  display: none; }
425
435
 
436
+ #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
437
+ margin-top: 0;
438
+ margin-bottom: 0; }
439
+
426
440
  nav {
427
441
  line-height: 1.2em; }
428
442
  @media screen and (min-width: 768px) {
@@ -477,7 +491,7 @@ nav {
477
491
  display: none; }
478
492
  h1.toc-contents {
479
493
  margin-top: 1em; }
480
- ul#toc-list {
494
+ ul#toc-list, ul#toc-list > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
481
495
  padding: 0;
482
496
  margin: 0; } }
483
497
 
@@ -112,27 +112,27 @@ span.partlabel {
112
112
 
113
113
  /* TYPOGRAPHY */
114
114
 
115
- h1 {
115
+ h1, .h1 {
116
116
  font-size: 1.5em;
117
117
  line-height: 2em;
118
118
  margin-top: 2em;
119
119
  margin-bottom: 1em;
120
120
  }
121
121
 
122
- h2 {
122
+ h2, .h2 {
123
123
  font-size: 1.2em;
124
124
  line-height: 1.5em;
125
125
  margin-top: 2em;
126
126
  margin-bottom: 1em;
127
127
  }
128
128
 
129
- h1, h2, h3, h4, h5, h6 {
129
+ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
130
130
  line-height: 1.2;
131
131
  }
132
132
 
133
133
  {% if doctype == "Amendment" or doctype == "Technical Corrigendum" %}
134
134
 
135
- h1, h2, h3, h4, h5, h6 {
135
+ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
136
136
  font-weight: normal;
137
137
  font-size: initial;
138
138
  font-style: italic;
@@ -164,7 +164,7 @@ a {
164
164
  text-decoration-color: black;
165
165
  }
166
166
 
167
- h2 p {
167
+ h2 p, .h2 p {
168
168
  display: inline;
169
169
  }
170
170
 
@@ -198,7 +198,7 @@ p.Terms {
198
198
 
199
199
  /* Navigation*/
200
200
 
201
- #toc {
201
+ #toc, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
202
202
  @include toc(null, #f7f7f7, black);
203
203
  @include sidebarToc();
204
204
 
@@ -214,6 +214,12 @@ p.Terms {
214
214
  }
215
215
  }
216
216
 
217
+ #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
218
+ margin-top: 0;
219
+ margin-bottom: 0;
220
+ }
221
+
222
+
217
223
  nav {
218
224
  @include sidebarNav(#f7f7f7, 278px, 20px);
219
225
  line-height: 1.2em;
@@ -239,7 +245,7 @@ nav {
239
245
  margin-top: 1em;
240
246
  }
241
247
 
242
- ul#toc-list {
248
+ ul#toc-list, ul#toc-list > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
243
249
  padding:0;
244
250
  margin:0;
245
251
  }
@@ -289,7 +289,7 @@ p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxS
289
289
  div.figure, p.figure {
290
290
  text-align: center; }
291
291
 
292
- h1 {
292
+ h1, .h1 {
293
293
  mso-style-priority: 1;
294
294
  mso-style-unhide: no;
295
295
  mso-style-qformat: yes;
@@ -304,8 +304,6 @@ h1 {
304
304
  line-height: 13.5pt;
305
305
  mso-pagination: widow-orphan;
306
306
  page-break-after: avoid;
307
- mso-outline-level: 1;
308
- mso-list: l1 level1 lfo6;
309
307
  mso-hyphenate: none;
310
308
  tab-stops: 20.0pt list 21.6pt left 28.0pt;
311
309
  {% if doctype == "Amendment" or doctype == "Technical Corrigendum" %}
@@ -324,6 +322,10 @@ h1 {
324
322
  mso-fareast-language: JA;
325
323
  mso-bidi-font-weight: normal; }
326
324
 
325
+ h1 {
326
+ mso-outline-level: 1;
327
+ mso-list: l1 level1 lfo6; }
328
+
327
329
  h1.ForewordTitle {
328
330
  font-size: 13.0pt;
329
331
  font-style: normal;
@@ -358,7 +360,7 @@ h1.Annex {
358
360
  mso-fareast-language: JA;
359
361
  mso-bidi-font-weight: normal; }
360
362
 
361
- .h2Annex, h2 {
363
+ .h2Annex, h2, .h2 {
362
364
  mso-style-priority: 2;
363
365
  mso-style-unhide: no;
364
366
  mso-style-qformat: yes;
@@ -395,7 +397,7 @@ h2 {
395
397
  mso-list: l1 level2 lfo6;
396
398
  mso-outline-level: 2; }
397
399
 
398
- .h3Annex, h3 {
400
+ .h3Annex, h3, .h3 {
399
401
  mso-style-priority: 3;
400
402
  mso-style-unhide: no;
401
403
  mso-style-qformat: yes;
@@ -432,7 +434,7 @@ h3 {
432
434
  mso-list: l1 level3 lfo6;
433
435
  mso-outline-level: 3; }
434
436
 
435
- .h4Annex, h4 {
437
+ .h4Annex, h4, .h4 {
436
438
  mso-style-priority: 4;
437
439
  mso-style-unhide: no;
438
440
  mso-style-qformat: yes;
@@ -467,7 +469,7 @@ h4 {
467
469
  mso-list: l1 level4 lfo6;
468
470
  mso-outline-level: 4; }
469
471
 
470
- .h5Annex, h5 {
472
+ .h5Annex, h5, .h5 {
471
473
  mso-style-priority: 5;
472
474
  mso-style-unhide: no;
473
475
  mso-style-qformat: yes;
@@ -502,7 +504,7 @@ h5 {
502
504
  mso-list: l1 level5 lfo6;
503
505
  mso-outline-level: 5; }
504
506
 
505
- h6 {
507
+ h6, .h6 {
506
508
  mso-style-priority: 6;
507
509
  mso-style-unhide: no;
508
510
  mso-style-qformat: yes;
@@ -269,7 +269,7 @@ p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxS
269
269
  div.figure, p.figure
270
270
  {text-align: center;}
271
271
 
272
- h1
272
+ h1, .h1
273
273
  {mso-style-priority:1;
274
274
  mso-style-unhide:no;
275
275
  mso-style-qformat:yes;
@@ -284,8 +284,6 @@ h1
284
284
  line-height:13.5pt;
285
285
  mso-pagination:widow-orphan;
286
286
  page-break-after:avoid;
287
- mso-outline-level:1;
288
- mso-list:l1 level1 lfo6;
289
287
  mso-hyphenate:none;
290
288
  tab-stops:20.0pt list 21.6pt left 28.0pt;
291
289
  {% if doctype == "Amendment" or doctype == "Technical Corrigendum" %}
@@ -303,6 +301,10 @@ h1
303
301
  mso-ansi-language:EN-GB;
304
302
  mso-fareast-language:JA;
305
303
  mso-bidi-font-weight:normal;}
304
+ h1 {
305
+ mso-outline-level:1;
306
+ mso-list:l1 level1 lfo6;
307
+ }
306
308
  h1.ForewordTitle {
307
309
  font-size:13.0pt;
308
310
  font-style: normal ;
@@ -336,7 +338,7 @@ h1.Annex
336
338
  mso-ansi-language:EN-GB;
337
339
  mso-fareast-language:JA;
338
340
  mso-bidi-font-weight:normal;}
339
- .h2Annex, h2
341
+ .h2Annex, h2, .h2
340
342
  {mso-style-priority:2;
341
343
  mso-style-unhide:no;
342
344
  mso-style-qformat:yes;
@@ -372,7 +374,7 @@ h2
372
374
  { mso-list:l1 level2 lfo6;
373
375
  mso-outline-level:2;
374
376
  }
375
- .h3Annex, h3
377
+ .h3Annex, h3, .h3
376
378
  {mso-style-priority:3;
377
379
  mso-style-unhide:no;
378
380
  mso-style-qformat:yes;
@@ -407,7 +409,7 @@ h2
407
409
  h3 {mso-list:l1 level3 lfo6;
408
410
  mso-outline-level:3;
409
411
  }
410
- .h4Annex, h4
412
+ .h4Annex, h4, .h4
411
413
  {mso-style-priority:4;
412
414
  mso-style-unhide:no;
413
415
  mso-style-qformat:yes;
@@ -440,7 +442,7 @@ h3 {mso-list:l1 level3 lfo6;
440
442
  h4 {mso-list:l1 level4 lfo6;
441
443
  mso-outline-level:4;
442
444
  }
443
- .h5Annex, h5
445
+ .h5Annex, h5, .h5
444
446
  {mso-style-priority:5;
445
447
  mso-style-unhide:no;
446
448
  mso-style-qformat:yes;
@@ -473,7 +475,7 @@ h4 {mso-list:l1 level4 lfo6;
473
475
  h5 {mso-list:l1 level5 lfo6;
474
476
  mso-outline-level:5;
475
477
  }
476
- h6
478
+ h6, .h6
477
479
  {mso-style-priority:6;
478
480
  mso-style-unhide:no;
479
481
  mso-style-qformat:yes;
@@ -58,15 +58,17 @@ module IsoDoc
58
58
  end
59
59
 
60
60
  def html_toc_entry(level, header)
61
- if level == "h1" && header.parent.at(".//h2[not(@class = 'TermNum')]"\
62
- "[not(@class = 'noTOC')][text()]")
61
+ content = header.at("./following-sibling::p"\
62
+ "[@class = 'variant-title-toc']") || header
63
+ if level == "h1" &&
64
+ header.parent.at(".//h2#{toc_exclude_class}")
63
65
  <<~HDR
64
- <li class="#{level}"><div class="collapse-group"><a href="##{header['id']}">#{header_strip(header)}</a></li>
66
+ <li class="#{level}"><div class="collapse-group"><a href="##{header['id']}">#{header_strip(content)}</a></li>
65
67
  <div class="collapse-button"></div></div>
66
68
  HDR
67
69
  else
68
70
  %(<li class="#{level}"><a href="##{header['id']}">\
69
- #{header_strip(header)}</a></li>)
71
+ #{header_strip(content)}</a></li>)
70
72
  end
71
73
  end
72
74