metanorma-iec 1.4.5 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +4 -32
  3. data/.gitignore +14 -0
  4. data/Gemfile +4 -0
  5. data/lib/isodoc/iec/base_convert.rb +3 -2
  6. data/lib/isodoc/iec/html/htmlstyle.css +23 -17
  7. data/lib/isodoc/iec/html/htmlstyle.scss +9 -3
  8. data/lib/isodoc/iec/html/isodoc.css +1 -2
  9. data/lib/isodoc/iec/html/isodoc.scss +0 -1
  10. data/lib/isodoc/iec/html_convert.rb +2 -1
  11. data/lib/isodoc/iec/i18n-fr.yaml +1 -1
  12. data/lib/isodoc/iec/iec.international-standard.xsl +2198 -1850
  13. data/lib/isodoc/iec/word_convert.rb +2 -0
  14. data/lib/isodoc/iec/xref.rb +9 -8
  15. data/lib/{asciidoctor → metanorma}/iec/basicdoc.rng +5 -3
  16. data/lib/{asciidoctor → metanorma}/iec/biblio.rng +7 -5
  17. data/lib/{asciidoctor → metanorma}/iec/converter.rb +22 -8
  18. data/lib/{asciidoctor → metanorma}/iec/front.rb +1 -1
  19. data/lib/{asciidoctor → metanorma}/iec/iec.rng +0 -0
  20. data/lib/{asciidoctor → metanorma}/iec/iec_intro_en.xml +0 -0
  21. data/lib/{asciidoctor → metanorma}/iec/iec_intro_fr.xml +0 -0
  22. data/lib/{asciidoctor → metanorma}/iec/isodoc.rng +98 -1
  23. data/lib/{asciidoctor → metanorma}/iec/isostandard.rng +0 -0
  24. data/lib/{asciidoctor → metanorma}/iec/reqt.rng +0 -0
  25. data/lib/metanorma/iec/version.rb +1 -1
  26. data/lib/metanorma-iec.rb +1 -1
  27. data/metanorma-iec.gemspec +1 -1
  28. data/spec/isodoc/i18n_spec.rb +2 -2
  29. data/spec/isodoc/iev_spec.rb +6 -5
  30. data/spec/isodoc/ref_spec.rb +359 -353
  31. data/spec/{asciidoctor → metanorma}/base_spec.rb +1 -1
  32. data/spec/{asciidoctor → metanorma}/blocks_spec.rb +1 -1
  33. data/spec/{asciidoctor → metanorma}/cleanup_spec.rb +1 -1
  34. data/spec/{asciidoctor → metanorma}/iev_spec.rb +10 -2
  35. data/spec/{asciidoctor → metanorma}/inline_spec.rb +1 -1
  36. data/spec/{asciidoctor → metanorma}/lists_spec.rb +1 -1
  37. data/spec/{asciidoctor → metanorma}/section_spec.rb +1 -1
  38. data/spec/{asciidoctor → metanorma}/validate_spec.rb +1 -1
  39. data/spec/spec_helper.rb +2 -2
  40. metadata +22 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2cd54ae113583e981d0db28b08ed00eb92f1b07a79d395c1d907860270889b59
4
- data.tar.gz: bb89fee2a134f6affa9a94d21da24a9ef2c827bb5a5ea03991d405325fe101b0
3
+ metadata.gz: 4912b4a758eeb2ef870ccbf98c3b23701c63c691abaceab22220fde852ef53b0
4
+ data.tar.gz: 8904c263d8eaae36cb1ed8e463bdbe4d16aa8c114b740e27d19272b3bfb3251f
5
5
  SHA512:
6
- metadata.gz: 1b3b33b44d4f1434415774b9ceccdff08a48ce8983aee4e7717e5a217fb47bfbfa77b447d70dd4a4530e5fd0e36e9158ebc18ff9ff58a07d4e3a7d80aee82219
7
- data.tar.gz: 4aa8430cb7caa4450916cf7a677612c937183e62a77b938787f4baf76e4d63fa4de0630283bc761cdd30063aca1df8472a8e5098bc9b453121f9eec75038c684
6
+ metadata.gz: 8bbcea1b3012449f0c7b12b7c3031233cb87ee6f7c393e52dfa30d08b4792d8d9665c53ffb4481c827301b9db2b9cffa994bb837b4493ebd393e32d08366876c
7
+ data.tar.gz: 39849f14f5501bebb447d0188466a2eef1f2337a0f9fe376aba4b66cc1ca11dbccd2a35f884ac1f3066076eb2b3fcef5c951c67677cec7e4ebc0e6f8bc7213b5
@@ -9,35 +9,7 @@ on:
9
9
  pull_request:
10
10
 
11
11
  jobs:
12
- rake:
13
- name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
14
- runs-on: ${{ matrix.os }}
15
- continue-on-error: ${{ matrix.experimental }}
16
- strategy:
17
- fail-fast: false
18
- matrix:
19
- ruby: [ '3.0', '2.7', '2.6', '2.5' ]
20
- os: [ ubuntu-latest, windows-latest, macos-latest ]
21
- experimental: [ false ]
22
- steps:
23
- - uses: actions/checkout@v2
24
- with:
25
- submodules: true
26
-
27
- - uses: ruby/setup-ruby@v1
28
- with:
29
- ruby-version: ${{ matrix.ruby }}
30
- bundler-cache: true
31
-
32
- - run: bundle exec rake
33
-
34
- tests-passed:
35
- needs: rake
36
- runs-on: ubuntu-latest
37
- steps:
38
- - uses: peter-evans/repository-dispatch@v1
39
- with:
40
- token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
41
- repository: ${{ github.repository }}
42
- event-type: tests-passed
43
- client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
12
+ notify:
13
+ uses: metanorma/metanorma-build-scripts/.github/workflows/mn-processor-rake.yml@main
14
+ secrets:
15
+ pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
data/.gitignore CHANGED
@@ -4,3 +4,17 @@
4
4
  coverage/
5
5
 
6
6
  .rubocop-https--*
7
+
8
+ /Gemfile.devel
9
+ /Gemfile.lock
10
+ /spec/assets/iso.doc
11
+ /spec/assets/iso.html
12
+ /spec/assets/iso.pdf
13
+ /test.doc
14
+ /test.err
15
+ /test.html
16
+ /test.pdf
17
+ /test.presentation.xml
18
+ /test.sts.xml
19
+ /test.xml
20
+ /test_alt.html
data/Gemfile CHANGED
@@ -7,3 +7,7 @@ source "https://rubygems.org"
7
7
  gemspec
8
8
 
9
9
  gem "reline", "~> 0.2.8.pre.11"
10
+
11
+ if File.exist? "Gemfile.devel"
12
+ eval File.read("Gemfile.devel"), nil, "Gemfile.devel" # rubocop:disable Security/Eval
13
+ end
@@ -48,7 +48,7 @@ module IsoDoc
48
48
  out.p(**{ class: "zzSTDTitle1" }) { |p| p << "&nbsp;" }
49
49
  end
50
50
 
51
- def middle_title_parts(out)
51
+ def middle_title_parts(_out)
52
52
  title1 = @meta.get[:doctitlemain]&.sub(/\s+$/, "")
53
53
  @meta.get[:doctitleintro] and
54
54
  title1 = "#{@meta.get[:doctitleintro]} &mdash; #{title1}"
@@ -79,7 +79,8 @@ module IsoDoc
79
79
 
80
80
  page_break(out)
81
81
  out.div **attr_code(id: node["id"]) do |div|
82
- out.p(**{ class: "zzSTDTitle2" }) do |p|
82
+ depth = clause_title_depth(node, nil)
83
+ out.send "h#{depth}", **{ class: "zzSTDTitle2" } do |p|
83
84
  p.b do |b|
84
85
  node&.at(ns("./title"))&.children&.each { |c2| parse(c2, b) }
85
86
  end
@@ -331,7 +331,7 @@ p.zzSTDTitle1 {
331
331
  font-size: 1.5em;
332
332
  text-transform: uppercase; }
333
333
 
334
- p.zzSTDTitle2 {
334
+ .zzSTDTitle2 {
335
335
  font-weight: 700;
336
336
  font-size: 1.5em; }
337
337
 
@@ -426,52 +426,58 @@ p.TermNum {
426
426
  #toggle {
427
427
  display: none; } }
428
428
 
429
- #toc {
429
+ #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
430
430
  font-family: {{bodyfont}};
431
431
  font-weight: 400; }
432
- #toc ul {
432
+ #toc ul, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul {
433
433
  margin: 0;
434
434
  padding: 0;
435
435
  list-style: none; }
436
- #toc ul li a {
436
+ #toc ul li a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul li a {
437
437
  padding: 5px 10px; }
438
- #toc ul a {
438
+ #toc ul a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a {
439
439
  color: black;
440
440
  text-decoration: none;
441
441
  display: block; }
442
- #toc ul a:hover {
442
+ #toc ul a:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
443
443
  box-shadow: none;
444
444
  color: black; }
445
- #toc .h2 {
445
+ #toc .h2, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h2 {
446
446
  padding-left: 30px; }
447
- #toc .h3 {
447
+ #toc .h3, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h3 {
448
448
  padding-left: 50px; }
449
- #toc .toc-active, #toc li:hover {
449
+ #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 {
450
450
  background: black;
451
451
  box-shadow: inset -5px 0px 10px -5px black !important; }
452
- #toc .toc-active a, #toc li:hover a {
452
+ #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 {
453
453
  color: black; }
454
454
  @media print {
455
- #toc .toc-active, #toc li:hover {
455
+ #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 {
456
456
  background: white;
457
457
  box-shadow: none !important; }
458
- #toc .toc-active a {
458
+ #toc .toc-active a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a {
459
459
  color: black; }
460
- #toc li:hover a {
460
+ #toc li:hover a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
461
461
  color: black; } }
462
462
  @media screen and (max-width: 768px) {
463
- #toc {
463
+ #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
464
464
  padding: 0 1.5em;
465
465
  overflow: visible; } }
466
466
  #toc .toc-active,
467
- #toc li:hover {
467
+ #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active,
468
+ #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
468
469
  box-shadow: 0px 1px 0px 0px black !important;
469
470
  color: black;
470
471
  background: none; }
471
- #toc ul a:hover {
472
+ #toc ul a:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
472
473
  box-shadow: none;
473
474
  color: black; }
474
475
 
476
+ #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
477
+ margin-top: 0;
478
+ margin-bottom: 0;
479
+ font-size: 100%; }
480
+
475
481
  @media screen and (min-width: 768px) {
476
482
  nav {
477
483
  line-height: 1.2em; }
@@ -485,7 +491,7 @@ p.TermNum {
485
491
  display: none; }
486
492
  h1.toc-contents {
487
493
  margin-top: 1em; }
488
- ul#toc-list {
494
+ ul#toc-list, ul#toc-list > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
489
495
  padding: 0;
490
496
  margin: 0; } }
491
497
 
@@ -133,7 +133,7 @@ p.zzSTDTitle1 {
133
133
  text-transform: uppercase;
134
134
  }
135
135
 
136
- p.zzSTDTitle2 {
136
+ .zzSTDTitle2 {
137
137
  font-weight: 700;
138
138
  font-size: 1.5em;
139
139
  }
@@ -205,7 +205,7 @@ nav {
205
205
  @include sidebarNavToggle(black, #f5faff)
206
206
  }
207
207
 
208
- #toc {
208
+ #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
209
209
  @include toc(black, black, black);
210
210
  @include sidebarToc();
211
211
 
@@ -224,6 +224,12 @@ nav {
224
224
  }
225
225
  }
226
226
 
227
+ #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
228
+ margin-top: 0;
229
+ margin-bottom: 0;
230
+ font-size: 100%;
231
+ }
232
+
227
233
  @media screen and (min-width: 768px) {
228
234
  nav {
229
235
  line-height: 1.2em;
@@ -247,7 +253,7 @@ nav {
247
253
  margin-top: 1em;
248
254
  }
249
255
 
250
- ul#toc-list {
256
+ ul#toc-list, ul#toc-list > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
251
257
  padding:0;
252
258
  margin:0;
253
259
  }
@@ -831,8 +831,7 @@ div.example p.MsoListParagraph {
831
831
  font-size: {{normalfontsize}}; }
832
832
 
833
833
  div.Note p.MsoListParagraph {
834
- font-size: {{smallerfontsize}};
835
- margin-left: 1.0cm; }
834
+ font-size: {{smallerfontsize}}; }
836
835
 
837
836
  div.Note span.stem {
838
837
  font-size: {{smallerfontsize}}; }
@@ -817,7 +817,6 @@ div.example p.MsoListParagraph {
817
817
 
818
818
  div.Note p.MsoListParagraph {
819
819
  font-size: $smallerfontsize;
820
- margin-left: 1.0cm;
821
820
  }
822
821
 
823
822
  div.Note span.stem {
@@ -38,7 +38,8 @@ module IsoDoc
38
38
  end
39
39
 
40
40
  def authority_cleanup(docxml)
41
- auth = docxml.at("//div[@id = 'boilerplate-feedback' or @class = 'boilerplate-feedback']")
41
+ auth = docxml.at("//div[@id = 'boilerplate-feedback' or "\
42
+ "@class = 'boilerplate-feedback']")
42
43
  auth&.remove
43
44
  super
44
45
  end
@@ -18,7 +18,7 @@ term_def_boilerplate: |
18
18
  <link target="http://www.iso.org/obp"/></p> </li>
19
19
  </ul>
20
20
  doctype_dict:
21
- international-standard: Norme international
21
+ international-standard: Norme internationale
22
22
  technical-specification: Spécification technique
23
23
  technical-report: Rapport technique
24
24
  publicly-available-specification: Spécification disponible publiquement