metanorma-iho 0.4.5 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +3 -31
- data/.gitignore +11 -0
- data/bin/console +1 -1
- data/lib/isodoc/iho/base_convert.rb +11 -9
- data/lib/isodoc/iho/html/htmlstyle.css +22 -17
- data/lib/isodoc/iho/html/htmlstyle.scss +8 -2
- data/lib/isodoc/iho/html/iho.css +1 -2
- data/lib/isodoc/iho/html/iho.scss +0 -1
- data/lib/isodoc/iho/iho.specification.xsl +2049 -1323
- data/lib/isodoc/iho/iho.standard.xsl +2049 -1323
- data/lib/{asciidoctor → metanorma}/iho/basicdoc.rng +5 -3
- data/lib/{asciidoctor → metanorma}/iho/biblio.rng +7 -5
- data/lib/{asciidoctor → metanorma}/iho/boilerplate.xml +0 -0
- data/lib/{asciidoctor → metanorma}/iho/converter.rb +4 -4
- data/lib/{asciidoctor → metanorma}/iho/iho.rng +0 -0
- data/lib/{asciidoctor → metanorma}/iho/isodoc.rng +98 -1
- data/lib/{asciidoctor → metanorma}/iho/reqt.rng +0 -0
- data/lib/metanorma/iho/version.rb +1 -1
- data/lib/metanorma-iho.rb +1 -1
- data/metanorma-iho.gemspec +1 -1
- data/metanorma.yml +1 -1
- metadata +11 -12
- data/lib/asciidoctor/iho.rb +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee0ce9c8c2bd6d95f99e1a81307f83751cea7086046359bf0c98c4567ba3c8e3
|
4
|
+
data.tar.gz: 0addeac4155072d4eed975211ad8ed40a3da6f3a6ff8f97c35f53be9422392ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 576967ae59fddeeadde1f4b18ecc7ac78f0fc32c3535920cd84164846534666a55e3104f0ba42d1f6a2a11c61ee379f22d1d7c71913974f5bbe9b870201219cf
|
7
|
+
data.tar.gz: d3842b851ccc0f122b2b5cb0b631078a611d87a836d722bedfa0d46b7bd226b8adc95c126221c728964f7e12e768948e47257476634d49ee3a704cab09c5e408
|
data/.github/workflows/rake.yml
CHANGED
@@ -10,34 +10,6 @@ on:
|
|
10
10
|
|
11
11
|
jobs:
|
12
12
|
rake:
|
13
|
-
|
14
|
-
|
15
|
-
|
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@master
|
24
|
-
|
25
|
-
- uses: ruby/setup-ruby@v1
|
26
|
-
with:
|
27
|
-
ruby-version: ${{ matrix.ruby }}
|
28
|
-
bundler-cache: true
|
29
|
-
|
30
|
-
- uses: metanorma/metanorma-build-scripts/plantuml-setup-action@master
|
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 }}"}'
|
13
|
+
uses: metanorma/metanorma-build-scripts/.github/workflows/generic-rake.yml@main
|
14
|
+
secrets:
|
15
|
+
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
data/.gitignore
CHANGED
data/bin/console
CHANGED
@@ -27,7 +27,7 @@ module IsoDoc
|
|
27
27
|
xml.span do |s|
|
28
28
|
node&.children&.each { |x| parse(x, s) }
|
29
29
|
end
|
30
|
-
end.join
|
30
|
+
end.join
|
31
31
|
end
|
32
32
|
|
33
33
|
def multiplenames_and(names)
|
@@ -56,13 +56,15 @@ module IsoDoc
|
|
56
56
|
def inline_bibitem_ref_code(bib)
|
57
57
|
id = bib.at(ns("./docidentifier[not(@type = 'DOI' or "\
|
58
58
|
"@type = 'metanorma' or @type = 'ISSN' or "\
|
59
|
-
"@type = 'ISBN' or @type = 'rfc-anchor'
|
60
|
-
|
61
|
-
|
59
|
+
"@type = 'ISBN' or @type = 'rfc-anchor' or "\
|
60
|
+
"@type = 'metanorma-ordinal')]"))
|
61
|
+
id ||= bib.at(ns("./docidentifier[not(@type = 'metanorma' or "\
|
62
|
+
"@type = 'metanorma-ordinal')]"))
|
63
|
+
return [nil, id, nil, nil] if id
|
62
64
|
|
63
65
|
id = Nokogiri::XML::Node.new("docidentifier", bib.document)
|
64
66
|
id << "(NO ID)"
|
65
|
-
[nil, id, nil]
|
67
|
+
[nil, id, nil, nil]
|
66
68
|
end
|
67
69
|
|
68
70
|
def extract_edition(bib)
|
@@ -101,9 +103,9 @@ module IsoDoc
|
|
101
103
|
c = p.at(ns("./completename")) and return c.text
|
102
104
|
s = p&.at(ns("./surname"))&.text or return
|
103
105
|
i = p.xpath(ns("./initial")) and
|
104
|
-
front = i.map { |e| e.text.gsub(/[^[:upper:]]/, "") }.join
|
106
|
+
front = i.map { |e| e.text.gsub(/[^[:upper:]]/, "") }.join
|
105
107
|
i.empty? and f = p.xpath(ns("./forename")) and
|
106
|
-
front = f.map { |e| e.text[0].upcase }.join
|
108
|
+
front = f.map { |e| e.text[0].upcase }.join
|
107
109
|
front ? "#{s} #{front}" : s
|
108
110
|
end
|
109
111
|
|
@@ -117,10 +119,10 @@ module IsoDoc
|
|
117
119
|
ftitle&.children&.each { |n| parse(n, out) }
|
118
120
|
else
|
119
121
|
id = render_identifier(inline_bibitem_ref_code(bib))
|
120
|
-
out << id[
|
122
|
+
out << id[:sdo] if id[:sdo]
|
121
123
|
ed = extract_edition(bib) if iho?(bib)
|
122
124
|
out << " edition #{ed}" if ed
|
123
|
-
out << ": " if id[
|
125
|
+
out << ": " if id[:sdo] || ed
|
124
126
|
iso_title(bib)&.children&.each { |n| parse(n, out) }
|
125
127
|
out << ", "
|
126
128
|
author = extract_author(bib)
|
@@ -248,51 +248,56 @@ body {
|
|
248
248
|
main {
|
249
249
|
margin: 0 3em 0 6em; }
|
250
250
|
|
251
|
-
#toc {
|
251
|
+
#toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
252
252
|
font-family: {{bodyfont}};
|
253
253
|
font-weight: 400; }
|
254
|
-
#toc ul {
|
254
|
+
#toc ul, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul {
|
255
255
|
margin: 0;
|
256
256
|
padding: 0;
|
257
257
|
list-style: none; }
|
258
|
-
#toc ul li a {
|
258
|
+
#toc ul li a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul li a {
|
259
259
|
padding: 5px 10px; }
|
260
|
-
#toc ul a {
|
260
|
+
#toc ul a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a {
|
261
261
|
color: #05164d;
|
262
262
|
text-decoration: none;
|
263
263
|
display: block; }
|
264
|
-
#toc ul a:hover {
|
264
|
+
#toc ul a:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
|
265
265
|
box-shadow: none;
|
266
266
|
color: #05164d; }
|
267
|
-
#toc .h2 {
|
267
|
+
#toc .h2, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h2 {
|
268
268
|
padding-left: 30px; }
|
269
|
-
#toc .h3 {
|
269
|
+
#toc .h3, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h3 {
|
270
270
|
padding-left: 50px; }
|
271
|
-
#toc .toc-active, #toc li:hover {
|
271
|
+
#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 {
|
272
272
|
background: #fedc5b;
|
273
273
|
box-shadow: inset -5px 0px 10px -5px #fedc5b !important; }
|
274
|
-
#toc .toc-active a, #toc li:hover a {
|
274
|
+
#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 {
|
275
275
|
color: #05164d; }
|
276
276
|
@media print {
|
277
|
-
#toc .toc-active, #toc li:hover {
|
277
|
+
#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 {
|
278
278
|
background: white;
|
279
279
|
box-shadow: none !important; }
|
280
|
-
#toc .toc-active a {
|
280
|
+
#toc .toc-active a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a {
|
281
281
|
color: #05164d; }
|
282
|
-
#toc li:hover a {
|
282
|
+
#toc li:hover a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
|
283
283
|
color: black; } }
|
284
284
|
@media screen and (max-width: 768px) {
|
285
|
-
#toc {
|
285
|
+
#toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
286
286
|
padding: 0 1.5em;
|
287
287
|
overflow: visible; } }
|
288
|
-
#toc .toc-active a {
|
288
|
+
#toc .toc-active a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a {
|
289
289
|
color: #05164d; }
|
290
|
-
#toc li a {
|
290
|
+
#toc li a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li a {
|
291
291
|
text-transform: uppercase; }
|
292
|
-
#toc ul a:hover {
|
292
|
+
#toc ul a:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
|
293
293
|
box-shadow: none;
|
294
294
|
color: #05164d; }
|
295
295
|
|
296
|
+
#toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
297
|
+
margin-top: 0;
|
298
|
+
margin-bottom: 0;
|
299
|
+
font-size: 100%; }
|
300
|
+
|
296
301
|
@media screen and (min-width: 768px) {
|
297
302
|
nav {
|
298
303
|
position: fixed;
|
@@ -377,7 +382,7 @@ main {
|
|
377
382
|
display: none; }
|
378
383
|
h1.toc-contents {
|
379
384
|
margin-top: 1em; }
|
380
|
-
ul#toc-list {
|
385
|
+
ul#toc-list, ul#toc-list > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
381
386
|
padding: 0;
|
382
387
|
margin: 0; } }
|
383
388
|
|
@@ -18,7 +18,7 @@ main {
|
|
18
18
|
margin: 0 3em 0 6em;
|
19
19
|
}
|
20
20
|
|
21
|
-
#toc {
|
21
|
+
#toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
22
22
|
@include toc(#05164d, #fedc5b, #05164d);
|
23
23
|
@include sidebarToc();
|
24
24
|
|
@@ -38,6 +38,12 @@ main {
|
|
38
38
|
}
|
39
39
|
}
|
40
40
|
|
41
|
+
#toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
42
|
+
margin-top: 0;
|
43
|
+
margin-bottom: 0;
|
44
|
+
font-size: 100%;
|
45
|
+
}
|
46
|
+
|
41
47
|
nav {
|
42
48
|
@include sidebarNav(#f7f7f7, 323px, 45px);
|
43
49
|
}
|
@@ -72,7 +78,7 @@ nav {
|
|
72
78
|
margin-top: 1em;
|
73
79
|
}
|
74
80
|
|
75
|
-
ul#toc-list {
|
81
|
+
ul#toc-list, ul#toc-list > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
76
82
|
padding: 0;
|
77
83
|
margin: 0;
|
78
84
|
}
|
data/lib/isodoc/iho/html/iho.css
CHANGED
@@ -785,8 +785,7 @@ div.example p.MsoListParagraph {
|
|
785
785
|
font-size: {{smallerfontsize}}; }
|
786
786
|
|
787
787
|
div.Note p.MsoListParagraph {
|
788
|
-
font-size: {{smallerfontsize}};
|
789
|
-
margin-left: 1.0cm; }
|
788
|
+
font-size: {{smallerfontsize}}; }
|
790
789
|
|
791
790
|
div.Note span.stem {
|
792
791
|
font-size: {{smallerfontsize}}; }
|