isodoc 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +34 -0
- data/.github/workflows/ubuntu.yml +34 -0
- data/.github/workflows/windows.yml +37 -0
- data/Gemfile.lock +19 -21
- data/README.adoc +4 -3
- data/lib/isodoc/base_style/all.scss +6 -0
- data/lib/isodoc/base_style/bands.scss +76 -0
- data/lib/isodoc/base_style/blocks.scss +108 -0
- data/lib/isodoc/base_style/coverpage.scss +7 -0
- data/lib/isodoc/base_style/defaults.scss +26 -0
- data/lib/isodoc/base_style/nav.scss +180 -0
- data/lib/isodoc/base_style/reset.scss +98 -0
- data/lib/isodoc/base_style/typography.scss +89 -0
- data/lib/isodoc/class_utils.rb +2 -2
- data/lib/isodoc/convert.rb +3 -0
- data/lib/isodoc/function/blocks.rb +17 -13
- data/lib/isodoc/function/references.rb +25 -26
- data/lib/isodoc/function/utils.rb +12 -8
- data/lib/isodoc/function/xref_sect_gen.rb +2 -2
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_function/body.rb +3 -2
- data/spec/isodoc/blocks_spec.rb +4 -2
- data/spec/isodoc/postproc_spec.rb +1 -1
- data/spec/isodoc/ref_spec.rb +12 -0
- data/spec/isodoc/section_spec.rb +2 -0
- data/spec/isodoc/table_spec.rb +14 -1
- metadata +13 -4
- data/.travis.yml +0 -22
- data/appveyor.yml +0 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1da91b764e9a65a186bbc41b0d5fe260d77d15219b5d09cc4b4795653eded399
|
4
|
+
data.tar.gz: 475fb17801429b31abb5a12a1605b6ba01961c1e3d51d4502d6813691797025d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 967d2118b8144444fb35aa87cf6663a79a97ec7f958d2fc8e25ee87b66a10150d32a7d588e285917a791fa8f91e1f25af612fd5bf06c65014d2bc801ac47d96c
|
7
|
+
data.tar.gz: d9bf4df272be714d6a877a9a5c203146a82657c1fc3f22260fca295b394db118dd0e3c215b9cd138b46890b69331d94d202ecb16ee29e1f6b28f848c085f2e85
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# Auto-generated !!! Do not edit it manually
|
2
|
+
# use ci-master https://github.com/metanorma/metanorma-build-scripts
|
3
|
+
name: macos
|
4
|
+
|
5
|
+
on: [push]
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
test-macos:
|
9
|
+
name: Test on Ruby ${{ matrix.ruby }} macOS
|
10
|
+
runs-on: macos-latest
|
11
|
+
strategy:
|
12
|
+
matrix:
|
13
|
+
ruby: [ '2.6', '2.5', '2.4' ]
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@master
|
16
|
+
- name: Use Ruby
|
17
|
+
uses: actions/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: ${{ matrix.ruby }}
|
20
|
+
architecture: 'x64'
|
21
|
+
- name: Update gems
|
22
|
+
run: |
|
23
|
+
sudo gem install bundler -v "~> 2" --force
|
24
|
+
bundle install --jobs 4 --retry 3
|
25
|
+
- name: Use Node
|
26
|
+
uses: actions/setup-node@v1
|
27
|
+
with:
|
28
|
+
node-version: '8'
|
29
|
+
- name: Install Puppeteer
|
30
|
+
run: |
|
31
|
+
npm install -g puppeteer
|
32
|
+
- name: Run specs
|
33
|
+
run: |
|
34
|
+
bundle exec rake
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# Auto-generated !!! Do not edit it manually
|
2
|
+
# use ci-master https://github.com/metanorma/metanorma-build-scripts
|
3
|
+
name: ubuntu
|
4
|
+
|
5
|
+
on: [push]
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
test-linux:
|
9
|
+
name: Test on Ruby ${{ matrix.ruby }} Ubuntu
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
strategy:
|
12
|
+
matrix:
|
13
|
+
ruby: [ '2.6', '2.5', '2.4' ]
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@master
|
16
|
+
- name: Use Ruby
|
17
|
+
uses: actions/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: ${{ matrix.ruby }}
|
20
|
+
architecture: 'x64'
|
21
|
+
- name: Update gems
|
22
|
+
run: |
|
23
|
+
gem install bundler -v "~> 2"
|
24
|
+
bundle install --jobs 4 --retry 3
|
25
|
+
- name: Use Node
|
26
|
+
uses: actions/setup-node@v1
|
27
|
+
with:
|
28
|
+
node-version: '8'
|
29
|
+
- name: Install Puppeteer
|
30
|
+
run: |
|
31
|
+
npm install -g puppeteer
|
32
|
+
- name: Run specs
|
33
|
+
run: |
|
34
|
+
bundle exec rake
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Auto-generated !!! Do not edit it manually
|
2
|
+
# use ci-master https://github.com/metanorma/metanorma-build-scripts
|
3
|
+
name: windows
|
4
|
+
|
5
|
+
on: [push]
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
test-windows:
|
9
|
+
name: Test on Ruby ${{ matrix.ruby }} Windows
|
10
|
+
runs-on: windows-latest
|
11
|
+
strategy:
|
12
|
+
matrix:
|
13
|
+
ruby: [ '2.6', '2.5', '2.4' ]
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@master
|
16
|
+
- name: Use Ruby
|
17
|
+
uses: actions/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: ${{ matrix.ruby }}
|
20
|
+
architecture: 'x64'
|
21
|
+
- name: Update gems
|
22
|
+
shell: pwsh
|
23
|
+
run: |
|
24
|
+
gem install bundler -v "~> 2"
|
25
|
+
bundle config --local path vendor/bundle
|
26
|
+
bundle update
|
27
|
+
bundle install --jobs 4 --retry 3
|
28
|
+
- name: Use Node
|
29
|
+
uses: actions/setup-node@v1
|
30
|
+
with:
|
31
|
+
node-version: '8'
|
32
|
+
- name: Install Puppeteer
|
33
|
+
run: |
|
34
|
+
npm install -g puppeteer
|
35
|
+
- name: Run specs
|
36
|
+
run: |
|
37
|
+
bundle exec rake
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
isodoc (1.0.
|
4
|
+
isodoc (1.0.4)
|
5
5
|
asciimath
|
6
6
|
html2doc (~> 0.8.11)
|
7
7
|
htmlentities (~> 4.3.4)
|
@@ -54,18 +54,17 @@ GEM
|
|
54
54
|
image_size (2.0.2)
|
55
55
|
json (2.2.0)
|
56
56
|
liquid (4.0.3)
|
57
|
-
listen (3.
|
58
|
-
rb-fsevent (~> 0.
|
59
|
-
rb-inotify (~> 0.9, >= 0.9.
|
60
|
-
ruby_dep (~> 1.2)
|
57
|
+
listen (3.2.0)
|
58
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
59
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
61
60
|
lumberjack (1.0.13)
|
62
|
-
metanorma (0.3.
|
61
|
+
metanorma (0.3.15)
|
63
62
|
asciidoctor
|
64
63
|
htmlentities
|
65
64
|
method_source (0.9.2)
|
66
65
|
mime-types (3.3)
|
67
66
|
mime-types-data (~> 3.2015)
|
68
|
-
mime-types-data (3.2019.
|
67
|
+
mime-types-data (3.2019.1009)
|
69
68
|
mini_portile2 (2.4.0)
|
70
69
|
nenv (0.3.0)
|
71
70
|
nokogiri (1.10.4)
|
@@ -73,8 +72,8 @@ GEM
|
|
73
72
|
notiffany (0.1.3)
|
74
73
|
nenv (~> 0.1)
|
75
74
|
shellany (~> 0.0)
|
76
|
-
parallel (1.
|
77
|
-
parser (2.6.
|
75
|
+
parallel (1.18.0)
|
76
|
+
parser (2.6.5.0)
|
78
77
|
ast (~> 2.4.0)
|
79
78
|
powerpack (0.1.2)
|
80
79
|
pry (0.12.2)
|
@@ -86,19 +85,19 @@ GEM
|
|
86
85
|
rb-inotify (0.10.0)
|
87
86
|
ffi (~> 1.0)
|
88
87
|
roman-numerals (0.3.0)
|
89
|
-
rspec (3.
|
90
|
-
rspec-core (~> 3.
|
91
|
-
rspec-expectations (~> 3.
|
92
|
-
rspec-mocks (~> 3.
|
93
|
-
rspec-core (3.
|
94
|
-
rspec-support (~> 3.
|
95
|
-
rspec-expectations (3.
|
88
|
+
rspec (3.9.0)
|
89
|
+
rspec-core (~> 3.9.0)
|
90
|
+
rspec-expectations (~> 3.9.0)
|
91
|
+
rspec-mocks (~> 3.9.0)
|
92
|
+
rspec-core (3.9.0)
|
93
|
+
rspec-support (~> 3.9.0)
|
94
|
+
rspec-expectations (3.9.0)
|
96
95
|
diff-lcs (>= 1.2.0, < 2.0)
|
97
|
-
rspec-support (~> 3.
|
98
|
-
rspec-mocks (3.
|
96
|
+
rspec-support (~> 3.9.0)
|
97
|
+
rspec-mocks (3.9.0)
|
99
98
|
diff-lcs (>= 1.2.0, < 2.0)
|
100
|
-
rspec-support (~> 3.
|
101
|
-
rspec-support (3.
|
99
|
+
rspec-support (~> 3.9.0)
|
100
|
+
rspec-support (3.9.0)
|
102
101
|
rubocop (0.54.0)
|
103
102
|
parallel (~> 1.10)
|
104
103
|
parser (>= 2.5)
|
@@ -107,7 +106,6 @@ GEM
|
|
107
106
|
ruby-progressbar (~> 1.7)
|
108
107
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
109
108
|
ruby-progressbar (1.10.1)
|
110
|
-
ruby_dep (1.5.0)
|
111
109
|
sassc (2.2.1)
|
112
110
|
ffi (~> 1.9)
|
113
111
|
shellany (0.0.1)
|
data/README.adoc
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
= isodoc:
|
1
|
+
= isodoc: Processor to generate HTML/Word from Metanorma XML
|
2
2
|
|
3
3
|
image:https://img.shields.io/gem/v/isodoc.svg["Gem Version", link="https://rubygems.org/gems/isodoc"]
|
4
|
-
image:https://
|
5
|
-
image:https://
|
4
|
+
image:https://github.com/metanorma/isodoc/workflows/macos/badge.svg["Build Status", link="https://github.com/metanorma/isodoc/actions?workflow=macos"]
|
5
|
+
image:https://github.com/metanorma/isodoc/workflows/ubuntu/badge.svg["Build Status", link="https://github.com/metanorma/isodoc/actions?workflow=ubuntu"]
|
6
|
+
image:https://github.com/metanorma/isodoc/workflows/windows/badge.svg["Build Status", link="https://github.com/metanorma/isodoc/actions?workflow=windows"]
|
6
7
|
image:https://codeclimate.com/github/metanorma/isodoc/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/isodoc"]
|
7
8
|
|
8
9
|
== Purpose
|
@@ -0,0 +1,76 @@
|
|
1
|
+
@mixin docBandTitle($length, $fontWeight: 400, $fontFamily: null, $color: white) {
|
2
|
+
position: relative;
|
3
|
+
width: 25px;
|
4
|
+
|
5
|
+
@if $fontFamily {
|
6
|
+
font-family: unquote($fontFamily);
|
7
|
+
}
|
8
|
+
|
9
|
+
font-weight: $fontWeight;
|
10
|
+
height: $length;
|
11
|
+
|
12
|
+
color: $color;
|
13
|
+
text-transform: uppercase;
|
14
|
+
font-size: 0.9em;
|
15
|
+
font-weight: 400;
|
16
|
+
letter-spacing: 0.05em;
|
17
|
+
margin: 0;
|
18
|
+
margin-left: 6px;
|
19
|
+
writing-mode: tb-rl;
|
20
|
+
-webkit-transform: rotate(180deg);
|
21
|
+
-moz-transform: rotate(180deg);
|
22
|
+
-o-transform: rotate(180deg);
|
23
|
+
white-space: nowrap;
|
24
|
+
display: block;
|
25
|
+
bottom: 0;
|
26
|
+
}
|
27
|
+
|
28
|
+
|
29
|
+
@mixin docBand(
|
30
|
+
$order,
|
31
|
+
$textLength,
|
32
|
+
$offset: 0,
|
33
|
+
$color: white,
|
34
|
+
$fontWeight: 400,
|
35
|
+
$fontFamily: null) {
|
36
|
+
|
37
|
+
left: 0;
|
38
|
+
top: $offset;
|
39
|
+
height: 100%;
|
40
|
+
position: fixed;
|
41
|
+
display: block;
|
42
|
+
|
43
|
+
z-index: 100 + $order;
|
44
|
+
|
45
|
+
@if $order == 1 {
|
46
|
+
box-shadow: -5px 0px 10px #1d1d1d;
|
47
|
+
}
|
48
|
+
|
49
|
+
> :first-child {
|
50
|
+
@include docBandTitle($textLength, $fontWeight, $fontFamily, $color);
|
51
|
+
}
|
52
|
+
|
53
|
+
@media print {
|
54
|
+
display: none;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
|
59
|
+
@each $key, $val in $doctype-colors-list {
|
60
|
+
##{$key}-band {
|
61
|
+
background-color: #{$val};
|
62
|
+
}
|
63
|
+
##{$key} {
|
64
|
+
border-bottom: solid 3px #{$val};
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
|
69
|
+
@each $key, $val in $docstage-colors-list {
|
70
|
+
##{$key}-band {
|
71
|
+
background-color: #{$val};
|
72
|
+
}
|
73
|
+
##{$key} {
|
74
|
+
border-bottom: solid 3px #{$val};
|
75
|
+
}
|
76
|
+
}
|
@@ -0,0 +1,108 @@
|
|
1
|
+
@import 'defaults';
|
2
|
+
|
3
|
+
@mixin blockTitle() {
|
4
|
+
font-weight: 700;
|
5
|
+
font-size: 1em;
|
6
|
+
text-align: center;
|
7
|
+
}
|
8
|
+
|
9
|
+
@mixin monospaceBlockStyle() {
|
10
|
+
font-family: $monospacefont;
|
11
|
+
font-variant-ligatures: none;
|
12
|
+
}
|
13
|
+
|
14
|
+
@mixin admonitionBlock() {
|
15
|
+
.AdmonitionTitle {
|
16
|
+
@include blockTitle();
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
@mixin figureBlock() {
|
21
|
+
.FigureTitle, .figure-title {
|
22
|
+
@include blockTitle();
|
23
|
+
}
|
24
|
+
|
25
|
+
> img {
|
26
|
+
margin-left: auto;
|
27
|
+
margin-right: auto;
|
28
|
+
display: block;
|
29
|
+
max-width: 100%;
|
30
|
+
height: auto;
|
31
|
+
}
|
32
|
+
|
33
|
+
line-height: 1.6em;
|
34
|
+
padding: 1.5em;
|
35
|
+
margin: 2em 0 1em 0;
|
36
|
+
overflow: auto;
|
37
|
+
}
|
38
|
+
|
39
|
+
@mixin sourceBlock($colorBg, $colorFg: null) {
|
40
|
+
@include monospaceBlockStyle();
|
41
|
+
|
42
|
+
.SourceTitle {
|
43
|
+
@include blockTitle();
|
44
|
+
}
|
45
|
+
|
46
|
+
@if $colorFg {
|
47
|
+
color: $colorFg;
|
48
|
+
}
|
49
|
+
|
50
|
+
background-color: $colorBg;
|
51
|
+
font-size: 0.8em;
|
52
|
+
line-height: 1.6em;
|
53
|
+
padding: 1.5em;
|
54
|
+
margin: 2em 0 1em 0;
|
55
|
+
overflow: auto;
|
56
|
+
}
|
57
|
+
|
58
|
+
@mixin exampleBlock($colorBg, $colorText, $padding: .5em, $offsetContent: 1.5em) {
|
59
|
+
background-color: $colorBg;
|
60
|
+
|
61
|
+
padding: $padding;
|
62
|
+
margin: 2em 0 1em 0;
|
63
|
+
text-align: left;
|
64
|
+
|
65
|
+
p {
|
66
|
+
margin: 0;
|
67
|
+
}
|
68
|
+
|
69
|
+
@if $colorText {
|
70
|
+
color: #424242;
|
71
|
+
}
|
72
|
+
|
73
|
+
@if $offsetContent {
|
74
|
+
padding-left: $padding + $offsetContent;
|
75
|
+
}
|
76
|
+
|
77
|
+
.example-title {
|
78
|
+
font-weight: 700;
|
79
|
+
text-transform: uppercase;
|
80
|
+
|
81
|
+
@if $offsetContent {
|
82
|
+
margin-left: -$offsetContent;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
@mixin formulaBlock($colorBg) {
|
88
|
+
background-color: $colorBg;
|
89
|
+
padding: 1.5em;
|
90
|
+
margin-top: 2em;
|
91
|
+
text-align: center;
|
92
|
+
}
|
93
|
+
|
94
|
+
@mixin blockquoteBlock($colorBg, $rightAlignAttribution: false) {
|
95
|
+
background-color: $colorBg;
|
96
|
+
font-style: italic;
|
97
|
+
width: 80%;
|
98
|
+
padding: 1.5em;
|
99
|
+
margin-top: 2em;
|
100
|
+
margin-left: auto;
|
101
|
+
margin-right: auto;
|
102
|
+
|
103
|
+
@if $rightAlignAttribution {
|
104
|
+
.QuoteAttribution {
|
105
|
+
text-align: right;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
$bigscreenBreakpoint: 768px !default;
|
2
|
+
|
3
|
+
|
4
|
+
$doctype-colors-list: (
|
5
|
+
standard: #0AC442,
|
6
|
+
directive: #540D6E,
|
7
|
+
guide: #D183C9,
|
8
|
+
specification: #65AFFF,
|
9
|
+
report: #3A405A,
|
10
|
+
amendment: #F26430,
|
11
|
+
corrigendum: #C84630,
|
12
|
+
administrative: #BFAE48,
|
13
|
+
advisory: #BD9391,
|
14
|
+
) !default;
|
15
|
+
|
16
|
+
|
17
|
+
$docstage-colors-list: (
|
18
|
+
proposal: #39A0ED,
|
19
|
+
working-draft: #2D7393,
|
20
|
+
committee-draft: #2A6B7C,
|
21
|
+
draft-standard: #1C7F7A,
|
22
|
+
final-draft: #53C170,
|
23
|
+
published: #069E2D,
|
24
|
+
withdrawn: #004E64,
|
25
|
+
cancelled: #2E382E,
|
26
|
+
) !default;
|