isodoc 3.0.0 → 3.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 80ff8ea483a997f4ff1e6168f6c3f921b9d589ad7f855a475ae4dd82424a0793
4
- data.tar.gz: cbb2f806aa2b7bd1d8aff9c412732a56a36619121cf27ef5fe57825037a25046
3
+ metadata.gz: a2fbbffe1ad377a78a633b5b7520737e4b623b3451b3475e9e4f9c7e9ecb2d5b
4
+ data.tar.gz: 6a8927c8585c3d35a2bfbeea8df4699b96b111a3a86c870588f524109e04938f
5
5
  SHA512:
6
- metadata.gz: 11bb2279603ad2b5045238fe562b233af74e5eb53fef0ec612b676cb3e7dff3ae575f7698d0294a1dd7e88ad8f47b31a5ef3bf00828fd16bde24383980841ad4
7
- data.tar.gz: 13353c87b7fe45e8007f73b1cdfb8f9728c84001dc4d37bdee14fd27894e80e1384a738e013ccd8af750d43938b2aea136766115dbcf5e107a949a7649e46dc3
6
+ metadata.gz: a6ab8147f4a8abfa5846772df470777d55a7f169d46d6fe6f5f83aaf0114812b5eac1f98dc69a41fb43bbfc0e7e4635b86394a30398b8262e71d7b82da7c65a2
7
+ data.tar.gz: 63be260dc909fdbac39e62d06cd28448e71fe968b237f542545057a6777b0b0f79bd01cc1faafb0467855c99d5d3b058371c62b76a592bd837140d546a9ccfa5
data/isodoc.gemspec CHANGED
@@ -53,7 +53,8 @@ Gem::Specification.new do |spec|
53
53
  spec.add_development_dependency "rake", "~> 13.0"
54
54
  spec.add_development_dependency "rspec", "~> 3.6"
55
55
  spec.add_development_dependency "rubocop", "~> 1.5.2"
56
- spec.add_development_dependency "sassc", "~> 2.4.0"
56
+ #spec.add_development_dependency "sassc", "~> 2.4.0"
57
+ spec.add_development_dependency "sassc-embedded", "~> 1"
57
58
  spec.add_development_dependency "simplecov", "~> 0.15"
58
59
  spec.add_development_dependency "timecop", "~> 0.9"
59
60
  spec.add_development_dependency "xml-c14n"
@@ -1,6 +1,6 @@
1
- @import 'base_style/reset';
2
- @import 'base_style/typography';
3
- @import 'base_style/nav';
4
- @import 'base_style/bands';
5
- @import 'base_style/blocks';
6
- @import 'base_style/coverpage';
1
+ @use 'base_style/reset';
2
+ @use 'base_style/typography';
3
+ @use 'base_style/nav';
4
+ @use 'base_style/bands';
5
+ @use 'base_style/blocks';
6
+ @use 'base_style/coverpage';
@@ -0,0 +1,135 @@
1
+ #standard-band {
2
+ background-color: #0AC442;
3
+ }
4
+
5
+ #standard {
6
+ border-bottom: solid 3px #0AC442;
7
+ }
8
+
9
+ #directive-band {
10
+ background-color: #540D6E;
11
+ }
12
+
13
+ #directive {
14
+ border-bottom: solid 3px #540D6E;
15
+ }
16
+
17
+ #guide-band {
18
+ background-color: #D183C9;
19
+ }
20
+
21
+ #guide {
22
+ border-bottom: solid 3px #D183C9;
23
+ }
24
+
25
+ #specification-band {
26
+ background-color: #65AFFF;
27
+ }
28
+
29
+ #specification {
30
+ border-bottom: solid 3px #65AFFF;
31
+ }
32
+
33
+ #report-band {
34
+ background-color: #3A405A;
35
+ }
36
+
37
+ #report {
38
+ border-bottom: solid 3px #3A405A;
39
+ }
40
+
41
+ #amendment-band {
42
+ background-color: #F26430;
43
+ }
44
+
45
+ #amendment {
46
+ border-bottom: solid 3px #F26430;
47
+ }
48
+
49
+ #corrigendum-band {
50
+ background-color: #C84630;
51
+ }
52
+
53
+ #corrigendum {
54
+ border-bottom: solid 3px #C84630;
55
+ }
56
+
57
+ #administrative-band {
58
+ background-color: #BFAE48;
59
+ }
60
+
61
+ #administrative {
62
+ border-bottom: solid 3px #BFAE48;
63
+ }
64
+
65
+ #advisory-band {
66
+ background-color: #BD9391;
67
+ }
68
+
69
+ #advisory {
70
+ border-bottom: solid 3px #BD9391;
71
+ }
72
+
73
+ #proposal-band {
74
+ background-color: #39A0ED;
75
+ }
76
+
77
+ #proposal {
78
+ border-bottom: solid 3px #39A0ED;
79
+ }
80
+
81
+ #working-draft-band {
82
+ background-color: #2D7393;
83
+ }
84
+
85
+ #working-draft {
86
+ border-bottom: solid 3px #2D7393;
87
+ }
88
+
89
+ #committee-draft-band {
90
+ background-color: #2A6B7C;
91
+ }
92
+
93
+ #committee-draft {
94
+ border-bottom: solid 3px #2A6B7C;
95
+ }
96
+
97
+ #draft-standard-band {
98
+ background-color: #1C7F7A;
99
+ }
100
+
101
+ #draft-standard {
102
+ border-bottom: solid 3px #1C7F7A;
103
+ }
104
+
105
+ #final-draft-band {
106
+ background-color: #53C170;
107
+ }
108
+
109
+ #final-draft {
110
+ border-bottom: solid 3px #53C170;
111
+ }
112
+
113
+ #published-band {
114
+ background-color: #069E2D;
115
+ }
116
+
117
+ #published {
118
+ border-bottom: solid 3px #069E2D;
119
+ }
120
+
121
+ #withdrawn-band {
122
+ background-color: #004E64;
123
+ }
124
+
125
+ #withdrawn {
126
+ border-bottom: solid 3px #004E64;
127
+ }
128
+
129
+ #cancelled-band {
130
+ background-color: #2E382E;
131
+ }
132
+
133
+ #cancelled {
134
+ border-bottom: solid 3px #2E382E;
135
+ }
@@ -1,9 +1,12 @@
1
+ @use "sass:string";
2
+ @use "defaults";
3
+
1
4
  @mixin docBandTitle($length, $fontWeight: 400, $fontFamily: null, $color: white) {
2
5
  position: relative;
3
6
  width: 25px;
4
7
 
5
8
  @if $fontFamily {
6
- font-family: unquote($fontFamily);
9
+ font-family: string.unquote($fontFamily);
7
10
  }
8
11
 
9
12
  font-weight: $fontWeight;
@@ -59,7 +62,7 @@
59
62
  }
60
63
 
61
64
 
62
- @each $key, $val in $doctype-colors-list {
65
+ @each $key, $val in defaults.$doctype-colors-list {
63
66
  ##{$key}-band {
64
67
  background-color: #{$val};
65
68
  }
@@ -69,7 +72,7 @@
69
72
  }
70
73
 
71
74
 
72
- @each $key, $val in $docstage-colors-list {
75
+ @each $key, $val in defaults.$docstage-colors-list {
73
76
  ##{$key}-band {
74
77
  background-color: #{$val};
75
78
  }
@@ -1,4 +1,4 @@
1
- @import 'defaults';
1
+ @use 'defaults';
2
2
 
3
3
  @mixin blockTitle() {
4
4
  font-weight: 700;
@@ -1,56 +1,72 @@
1
1
  ol {
2
- margin-bottom: 0cm; }
2
+ margin-bottom: 0cm;
3
+ }
3
4
 
4
5
  ul {
5
- margin-bottom: 0cm; }
6
+ margin-bottom: 0cm;
7
+ }
6
8
 
7
9
  table.MsoISOTable tr {
8
- page-break-inside: avoid; }
10
+ page-break-inside: avoid;
11
+ }
9
12
 
10
13
  td {
11
- page-break-inside: avoid; }
14
+ page-break-inside: avoid;
15
+ }
12
16
 
13
17
  tr {
14
- page-break-after: avoid; }
18
+ page-break-after: avoid;
19
+ }
15
20
 
16
21
  table.MsoISOTableBig tr {
17
- page-break-inside: auto; }
22
+ page-break-inside: auto;
23
+ }
18
24
 
19
25
  table.MsoISOTableBig td {
20
- page-break-inside: auto; }
26
+ page-break-inside: auto;
27
+ }
21
28
 
22
29
  span.stem {
23
- font-family: "Cambria Math",serif;
30
+ font-family: "Cambria Math", serif;
24
31
  mso-ascii-font-family: "Cambria Math";
25
- font-style: italic; }
32
+ font-style: italic;
33
+ }
26
34
 
27
35
  dt {
28
36
  page-break-inside: avoid;
29
- page-break-after: avoid; }
37
+ page-break-after: avoid;
38
+ }
30
39
 
31
40
  br.section {
32
41
  page-break-before: always;
33
- mso-break-type: section-break; }
42
+ mso-break-type: section-break;
43
+ }
34
44
 
35
45
  br.pagebreak {
36
46
  page-break-before: always;
37
- mso-special-character: line-break; }
47
+ mso-special-character: line-break;
48
+ }
38
49
 
39
50
  span.addition {
40
- color: blue; }
51
+ color: blue;
52
+ }
41
53
 
42
54
  span.deletion {
43
55
  color: red;
44
- text-decoration: line-through; }
56
+ text-decoration: line-through;
57
+ }
45
58
 
46
59
  table.rouge-line-table {
47
60
  border: none;
48
61
  mso-border-alt: none;
49
62
  mso-border-insideh: none;
50
- mso-border-insidev: none; }
63
+ mso-border-insidev: none;
64
+ }
51
65
 
52
66
  td.rouge-code p.Sourcecode {
53
- margin: 0px; }
67
+ margin: 0px;
68
+ }
54
69
 
55
70
  div.table_container {
56
- margin-bottom: 14pt; }
71
+ margin-bottom: 14pt;
72
+ }
@@ -1,4 +1,4 @@
1
- @import 'defaults';
1
+ @use 'defaults';
2
2
 
3
3
  @mixin toc($colorLink, $colorLinkActiveBg, $colorLinkActiveFg) {
4
4
  ul {
@@ -70,7 +70,7 @@
70
70
  @mixin sidebarNavContainer($offset) {
71
71
  // Expected to be applied to body.
72
72
 
73
- @media screen and (min-width: $bigscreenBreakpoint) {
73
+ @media screen and (min-width: defaults.$bigscreenBreakpoint) {
74
74
  padding-left: $offset;
75
75
  }
76
76
 
@@ -83,7 +83,7 @@
83
83
  font-family: $font;
84
84
  font-weight: $fontWeight;
85
85
 
86
- @media screen and (max-width: $bigscreenBreakpoint) {
86
+ @media screen and (max-width: defaults.$bigscreenBreakpoint) {
87
87
  padding: 0 1.5em;
88
88
  overflow: visible;
89
89
  }
@@ -95,7 +95,7 @@
95
95
  $offsetLeft,
96
96
  $lineHeight: null) {
97
97
 
98
- @media screen and (min-width: $bigscreenBreakpoint) {
98
+ @media screen and (min-width: defaults.$bigscreenBreakpoint) {
99
99
  position: fixed;
100
100
  top: 0;
101
101
  bottom: 0;
@@ -123,7 +123,7 @@
123
123
  }
124
124
 
125
125
  @mixin sidebarNavToggle($colorFg: white, $colorBg: black) {
126
- @media screen and (min-width: $bigscreenBreakpoint) {
126
+ @media screen and (min-width: defaults.$bigscreenBreakpoint) {
127
127
  position: fixed;
128
128
  height: 100%;
129
129
  width: 30px;
@@ -141,7 +141,7 @@
141
141
  }
142
142
  }
143
143
 
144
- @media screen and (max-width: $bigscreenBreakpoint) {
144
+ @media screen and (max-width: defaults.$bigscreenBreakpoint) {
145
145
  display: none;
146
146
  }
147
147
 
@@ -151,7 +151,7 @@
151
151
  }
152
152
 
153
153
  @mixin tocSeparator {
154
- @media screen and (min-width: $bigscreenBreakpoint) {
154
+ @media screen and (min-width: defaults.$bigscreenBreakpoint) {
155
155
  display: none;
156
156
  }
157
157
  }
@@ -13,7 +13,8 @@ figure, figcaption, footer, header, hgroup,
13
13
  menu, output, ruby, section, summary,
14
14
  time, mark, audio, video {
15
15
  margin: 0;
16
- padding: 0; }
16
+ padding: 0;
17
+ }
17
18
 
18
19
  html, body, div, span, applet, object, iframe,
19
20
  h1, h2, h3, h4, h5, h6, p, blockquote, pre,
@@ -29,7 +30,8 @@ figure, figcaption, footer, header, hgroup,
29
30
  menu, nav, output, ruby, section, summary,
30
31
  time, mark, audio, video {
31
32
  border: 0;
32
- font-size: 100%; }
33
+ font-size: 100%;
34
+ }
33
35
 
34
36
  html, body, div, span, applet, object, iframe,
35
37
  h1, h2, h3, h4, h5, h6, p, blockquote, pre,
@@ -44,7 +46,8 @@ article, aside, canvas, details, embed,
44
46
  figure, figcaption, footer, header, hgroup,
45
47
  menu, nav, output, ruby, section, summary,
46
48
  time, mark, audio, video {
47
- vertical-align: baseline; }
49
+ vertical-align: baseline;
50
+ }
48
51
 
49
52
  html, body, div, span, applet, object, iframe,
50
53
  p, blockquote,
@@ -59,90 +62,115 @@ article, aside, canvas, details, embed,
59
62
  figure, figcaption, footer, header, hgroup,
60
63
  menu, nav, output, ruby, section, summary,
61
64
  time, mark, audio, video {
62
- font-family: {{bodyfont}}; }
65
+ font-family: {{bodyfont}};
66
+ }
63
67
 
64
68
  code, pre, tt, kbd, samp {
65
69
  font-family: {{monospacefont}};
66
- font-variant-ligatures: none; }
70
+ font-variant-ligatures: none;
71
+ }
67
72
 
68
73
  code *, pre *, tt *, kbd *, samp * {
69
74
  font-family: {{monospacefont}} !important;
70
- font-variant-ligatures: none; }
75
+ font-variant-ligatures: none;
76
+ }
71
77
 
72
78
  p code, dt code, li code, label code, legend code, caption code, th code, td code,
73
79
  p tt, dt tt, li tt, label tt, legend tt, caption tt, th tt, td tt,
74
80
  p kbd, dt kbd, li kbd, label kbd, legend kbd, caption kbd, th kbd, td kbd,
75
81
  p samp, dt samp, li samp, label samp, legend samp, caption samp, th samp, td samp {
76
- font-size: {{monospacefontsize}}; }
82
+ font-size: {{monospacefontsize}};
83
+ }
77
84
 
78
85
  sub, sup {
79
- font-size: 0.75em; }
86
+ font-size: 0.75em;
87
+ }
80
88
 
81
89
  article, aside, details, figcaption, figure,
82
90
  footer, header, hgroup, menu, nav, section {
83
- display: block; }
91
+ display: block;
92
+ }
84
93
 
85
94
  table {
86
95
  border-collapse: collapse;
87
- border-spacing: 0; }
96
+ border-spacing: 0;
97
+ }
88
98
 
89
99
  h1, h2, h3, h4, h5, h6 {
90
- font-family: {{headerfont}}; }
100
+ font-family: {{headerfont}};
101
+ }
91
102
 
92
103
  .h1, .h2, .h3, .h4, .h5, .h6 {
93
- font-family: {{headerfont}}; }
104
+ font-family: {{headerfont}};
105
+ }
94
106
 
95
107
  blockquote, q {
96
- quotes: none; }
97
- blockquote::before, blockquote::after, q::before, q::after {
98
- content: '';
99
- content: none; }
108
+ quotes: none;
109
+ }
110
+ blockquote::before, blockquote::after, q::before, q::after {
111
+ content: "";
112
+ content: none;
113
+ }
100
114
 
101
115
  .h2Annex {
102
- font-family: {{headerfont}}; }
116
+ font-family: {{headerfont}};
117
+ }
103
118
 
104
119
  dl {
105
120
  display: grid;
106
- grid-template-columns: max-content auto; }
107
- dl dt p, dl dd p {
108
- margin-top: 0; }
109
- dl dt {
110
- grid-column-start: 1; }
111
- dl dd {
112
- grid-column-start: 2; }
121
+ grid-template-columns: max-content auto;
122
+ }
123
+ dl dt p, dl dd p {
124
+ margin-top: 0;
125
+ }
126
+ dl dt {
127
+ grid-column-start: 1;
128
+ }
129
+ dl dd {
130
+ grid-column-start: 2;
131
+ }
113
132
 
114
133
  b, strong {
115
- font-weight: bold; }
134
+ font-weight: bold;
135
+ }
116
136
 
117
137
  div.document-stage-band, div.document-type-band {
118
- background-color: #333333; }
138
+ background-color: #333333;
139
+ }
119
140
 
120
141
  a.FootnoteRef + a.FootnoteRef::before {
121
142
  content: ", ";
122
- vertical-align: super; }
143
+ vertical-align: super;
144
+ }
123
145
 
124
146
  a.TableFootnoteRef + a.TableFootnoteRef::before {
125
147
  content: ", ";
126
- vertical-align: super; }
148
+ vertical-align: super;
149
+ }
127
150
 
128
151
  a.TableFootnoteRef, span.TableFootnoteRef,
129
152
  a.FootnoteRef, span.FootnoteRef {
130
- vertical-align: super; }
153
+ vertical-align: super;
154
+ }
131
155
 
132
156
  .addition {
133
- color: blue; }
157
+ color: blue;
158
+ }
134
159
 
135
160
  .deletion {
136
161
  color: red;
137
- text-decoration: line-through; }
162
+ text-decoration: line-through;
163
+ }
138
164
 
139
165
  ruby {
140
166
  ruby-position: over;
141
- -webkit-ruby-position: before; }
167
+ -webkit-ruby-position: before;
168
+ }
142
169
 
143
170
  ruby ruby {
144
171
  ruby-position: under;
145
- -webkit-ruby-position: after; }
172
+ -webkit-ruby-position: after;
173
+ }
146
174
 
147
175
  /* code highlighting with line numbers */
148
176
  table.rouge-line-table td.rouge-gutter {
@@ -150,13 +178,15 @@ table.rouge-line-table td.rouge-gutter {
150
178
  -ms-user-select: none;
151
179
  -webkit-user-select: none;
152
180
  user-select: none;
153
- padding-right: 1em; }
181
+ padding-right: 1em;
182
+ }
154
183
 
155
184
  table.rouge-line-table td.rouge-code {
156
185
  -moz-user-select: all;
157
186
  -ms-user-select: all;
158
187
  -webkit-user-select: all;
159
- user-select: all; }
188
+ user-select: all;
189
+ }
160
190
 
161
191
  table.rouge-line-table,
162
192
  table.rouge-line-table th,
@@ -165,27 +195,32 @@ table.rouge-line-table td {
165
195
  border: none;
166
196
  margin: 0;
167
197
  padding: 0;
168
- font-size: 100%; }
198
+ font-size: 100%;
199
+ }
169
200
 
170
201
  table.rouge-line-table pre {
171
202
  margin: 0;
172
203
  padding: 0;
173
204
  overflow-x: visible;
174
- font-size: 100%; }
205
+ font-size: 100%;
206
+ }
175
207
 
176
208
  /* header § links */
177
209
  a.header {
178
210
  color: inherit;
179
- text-decoration: none; }
211
+ text-decoration: none;
212
+ }
180
213
 
181
214
  a.header:hover {
182
215
  color: #a53221 !important;
183
216
  background: inherit;
184
- box-shadow: none; }
217
+ box-shadow: none;
218
+ }
185
219
 
186
220
  a.header:visited {
187
221
  color: inherit;
188
- text-decoration: none; }
222
+ text-decoration: none;
223
+ }
189
224
 
190
225
  a.anchor {
191
226
  position: absolute;
@@ -196,18 +231,21 @@ a.anchor {
196
231
  text-decoration: none !important;
197
232
  visibility: hidden;
198
233
  text-align: center;
199
- font-weight: 400; }
234
+ font-weight: 400;
235
+ }
200
236
 
201
237
  a.anchor::before {
202
- content: "\00A7";
203
- font-size: .85em;
238
+ content: "§";
239
+ font-size: 0.85em;
204
240
  display: block;
205
- padding-top: .1em; }
241
+ padding-top: 0.1em;
242
+ }
206
243
 
207
244
  a.anchor:hover {
208
245
  color: #a53221;
209
246
  background: inherit;
210
- box-shadow: none; }
247
+ box-shadow: none;
248
+ }
211
249
 
212
250
  h1 > a.anchor:hover,
213
251
  h2 > a.anchor:hover,
@@ -223,13 +261,15 @@ h4:hover > a.anchor,
223
261
  h5:hover > a.anchor,
224
262
  h6:hover > a.anchor,
225
263
  .inline-header:hover > a.anchor {
226
- visibility: visible; }
264
+ visibility: visible;
265
+ }
227
266
 
228
267
  /* collapsible snippets: collapsible before hidable */
229
268
  .hidable {
230
269
  max-height: 0;
231
270
  overflow: hidden;
232
- transition: max-height 0.2s ease-out; }
271
+ transition: max-height 0.2s ease-out;
272
+ }
233
273
 
234
274
  .collapsible {
235
275
  background-color: #777;
@@ -241,26 +281,32 @@ h6:hover > a.anchor,
241
281
  border: none;
242
282
  text-align: left;
243
283
  outline: none;
244
- font-size: 15px; }
284
+ font-size: 15px;
285
+ }
245
286
 
246
287
  .active, .collapsible:hover {
247
- background-color: #555; }
288
+ background-color: #555;
289
+ }
248
290
 
249
291
  .collapsible:after {
250
- content: '\25bc';
292
+ content: "▼";
251
293
  color: white;
252
294
  font-weight: bold;
253
295
  float: right;
254
296
  margin-left: 12px;
255
- margin-right: 12px; }
297
+ margin-right: 12px;
298
+ }
256
299
 
257
300
  .active:after {
258
- content: "\25b2"; }
301
+ content: "";
302
+ }
259
303
 
260
304
  /* collapsible: */
261
305
  .collapsible + .hidable {
262
- margin-top: 0; }
306
+ margin-top: 0;
307
+ }
263
308
 
264
309
  .collapsible:not(.active) + .hidable {
265
310
  overflow: hidden;
266
- padding: 0; }
311
+ padding: 0;
312
+ }
data/lib/isodoc/css.rb CHANGED
@@ -75,7 +75,7 @@ module IsoDoc
75
75
  end
76
76
 
77
77
  def convert_scss(filename, stylesheet, stripwordcss)
78
- require "sassc"
78
+ require "sassc-embedded"
79
79
  require "isodoc/sassc_importer"
80
80
 
81
81
  [File.join(Gem.loaded_specs["isodoc"].full_gem_path,
@@ -175,7 +175,7 @@ module IsoDoc
175
175
 
176
176
  def is_clause?(name)
177
177
  %w(clause references definitions terms foreword introduction abstract
178
- acknowledgements).include? name
178
+ acknowledgements indexsect).include? name
179
179
  end
180
180
 
181
181
  def single_term_clause?(elem)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "sassc"
3
+ require "sassc-embedded"
4
4
  require "isodoc/sassc_importer"
5
5
  require "rake/clean"
6
6
 
data/lib/isodoc/init.rb CHANGED
@@ -55,6 +55,7 @@ module IsoDoc
55
55
  @sectionsplit = options[:sectionsplit] == "true"
56
56
  @bare = options[:bare]
57
57
  @semantic_xml_insert = options[:semanticxmlinsert] != "false"
58
+ @log = options[:log]
58
59
  end
59
60
 
60
61
  def init_i18n(options)
@@ -12,7 +12,7 @@ module IsoDoc
12
12
  ret = ""
13
13
  @sourcehighlighter and ret += rouge_css_location
14
14
  a = docxml.at(ns("//metanorma-extension/" \
15
- "clause[title = 'user-css']/sourcecode")) and
15
+ "clause[title = 'user-css']/sourcecode/body")) and
16
16
  ret += "\n#{to_xml(a.children)}"
17
17
  ret
18
18
  end
@@ -51,6 +51,7 @@ module IsoDoc
51
51
 
52
52
  def sourcecode1(elem)
53
53
  ret1 = semx_fmt_dup(elem)
54
+ b = ret1.at(ns(".//body")) and b.replace(b.children)
54
55
  #sourcecode_annot_id(elem)
55
56
  source_label(elem)
56
57
  source_highlight(ret1, elem["linenums"] == "true", elem["lang"])
@@ -28,9 +28,27 @@ module IsoDoc
28
28
  @xrefs.klass.info docxml, nil
29
29
  conversions(docxml)
30
30
  docxml.root["type"] = "presentation"
31
+ repeat_id_validate(docxml.root)
31
32
  docxml.to_xml.gsub("<", "<").gsub(">", ">")
32
33
  end
33
34
 
35
+ def repeat_id_validate1(elem)
36
+ if @doc_ids[elem["id"]]
37
+ @log.add("Anchors", elem,
38
+ "Anchor #{elem['id']} has already been " \
39
+ "used at line #{@doc_ids[elem['id']]}", severity: 0)
40
+ end
41
+ @doc_ids[elem["id"]] = elem.line
42
+ end
43
+
44
+ def repeat_id_validate(doc)
45
+ @log or return
46
+ @doc_ids = {}
47
+ doc.xpath("//*[@id]").each do |x|
48
+ repeat_id_validate1(x)
49
+ end
50
+ end
51
+
34
52
  def bibitem_lookup(docxml)
35
53
  @bibitem_lookup ||= docxml.xpath(ns("//references/bibitem"))
36
54
  .each_with_object({}) do |b, m|
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "sassc"
3
+ require "sassc-embedded"
4
4
 
5
5
  class SasscImporter < SassC::Importer
6
6
  def imports(path, _parent_path)
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "3.0.0".freeze
2
+ VERSION = "3.0.1".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-16 00:00:00.000000000 Z
11
+ date: 2025-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64
@@ -291,19 +291,19 @@ dependencies:
291
291
  - !ruby/object:Gem::Version
292
292
  version: 1.5.2
293
293
  - !ruby/object:Gem::Dependency
294
- name: sassc
294
+ name: sassc-embedded
295
295
  requirement: !ruby/object:Gem::Requirement
296
296
  requirements:
297
297
  - - "~>"
298
298
  - !ruby/object:Gem::Version
299
- version: 2.4.0
299
+ version: '1'
300
300
  type: :development
301
301
  prerelease: false
302
302
  version_requirements: !ruby/object:Gem::Requirement
303
303
  requirements:
304
304
  - - "~>"
305
305
  - !ruby/object:Gem::Version
306
- version: 2.4.0
306
+ version: '1'
307
307
  - !ruby/object:Gem::Dependency
308
308
  name: simplecov
309
309
  requirement: !ruby/object:Gem::Requirement
@@ -375,8 +375,8 @@ files:
375
375
  - lib/isodoc-yaml/i18n-ru.yaml
376
376
  - lib/isodoc-yaml/i18n-zh-Hans.yaml
377
377
  - lib/isodoc.rb
378
- - lib/isodoc/base_style/all.css
379
378
  - lib/isodoc/base_style/all.scss
379
+ - lib/isodoc/base_style/bands.css
380
380
  - lib/isodoc/base_style/bands.scss
381
381
  - lib/isodoc/base_style/blocks.css
382
382
  - lib/isodoc/base_style/blocks.scss
@@ -1,368 +0,0 @@
1
- @charset "UTF-8";
2
- html, body, div, span, applet, object, iframe,
3
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
4
- a, abbr, acronym, address, big, cite, code,
5
- del, dfn, em, img, ins, kbd, q, s, samp,
6
- small, strike, strong, sub, sup, tt, var,
7
- b, u, i, center,
8
- ol, ul, li,
9
- fieldset, form, label, legend,
10
- table, caption, tbody, tfoot, thead, tr, th, td,
11
- article, aside, canvas, details, embed,
12
- figure, figcaption, footer, header, hgroup,
13
- menu, output, ruby, section, summary,
14
- time, mark, audio, video {
15
- margin: 0;
16
- padding: 0; }
17
-
18
- html, body, div, span, applet, object, iframe,
19
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
20
- a, abbr, acronym, address, big, cite, code,
21
- del, dfn, em, img, ins, kbd, q, s, samp,
22
- small, strike, strong, sub, sup, tt, var,
23
- b, u, i, center,
24
- dl, dt, dd, ol, ul, li,
25
- fieldset, form, label, legend,
26
- table, caption, tbody, tfoot, thead, tr, th, td,
27
- article, aside, canvas, details, embed,
28
- figure, figcaption, footer, header, hgroup,
29
- menu, nav, output, ruby, section, summary,
30
- time, mark, audio, video {
31
- border: 0;
32
- font-size: 100%; }
33
-
34
- html, body, div, span, applet, object, iframe,
35
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
36
- a, abbr, acronym, address, big, cite, code,
37
- del, dfn, em, img, ins, kbd, q, s, samp,
38
- small, strike, strong, tt, var,
39
- b, u, i, center,
40
- dl, dd, ol, ul, li,
41
- fieldset, form, label, legend,
42
- table, caption, tbody, tfoot, thead, tr, th, td,
43
- article, aside, canvas, details, embed,
44
- figure, figcaption, footer, header, hgroup,
45
- menu, nav, output, ruby, section, summary,
46
- time, mark, audio, video {
47
- vertical-align: baseline; }
48
-
49
- html, body, div, span, applet, object, iframe,
50
- p, blockquote,
51
- a, abbr, acronym, address, big, cite,
52
- del, dfn, em, img, ins, q, s,
53
- small, strike, strong, sub, sup, var,
54
- b, u, i, center,
55
- dl, dt, dd, ol, ul, li,
56
- fieldset, form, label, legend,
57
- table, caption, tbody, tfoot, thead, tr, th, td,
58
- article, aside, canvas, details, embed,
59
- figure, figcaption, footer, header, hgroup,
60
- menu, nav, output, ruby, section, summary,
61
- time, mark, audio, video {
62
- font-family: {{bodyfont}}; }
63
-
64
- code, pre, tt, kbd, samp {
65
- font-family: {{monospacefont}};
66
- font-variant-ligatures: none; }
67
-
68
- code *, pre *, tt *, kbd *, samp * {
69
- font-family: {{monospacefont}} !important;
70
- font-variant-ligatures: none; }
71
-
72
- p code, dt code, li code, label code, legend code, caption code, th code, td code,
73
- p tt, dt tt, li tt, label tt, legend tt, caption tt, th tt, td tt,
74
- p kbd, dt kbd, li kbd, label kbd, legend kbd, caption kbd, th kbd, td kbd,
75
- p samp, dt samp, li samp, label samp, legend samp, caption samp, th samp, td samp {
76
- font-size: {{monospacefontsize}}; }
77
-
78
- sub, sup {
79
- font-size: 0.75em; }
80
-
81
- article, aside, details, figcaption, figure,
82
- footer, header, hgroup, menu, nav, section {
83
- display: block; }
84
-
85
- table {
86
- border-collapse: collapse;
87
- border-spacing: 0; }
88
-
89
- h1, h2, h3, h4, h5, h6 {
90
- font-family: {{headerfont}}; }
91
-
92
- .h1, .h2, .h3, .h4, .h5, .h6 {
93
- font-family: {{headerfont}}; }
94
-
95
- blockquote, q {
96
- quotes: none; }
97
- blockquote::before, blockquote::after, q::before, q::after {
98
- content: '';
99
- content: none; }
100
-
101
- .h2Annex {
102
- font-family: {{headerfont}}; }
103
-
104
- dl {
105
- display: grid;
106
- grid-template-columns: max-content auto; }
107
- dl dt p, dl dd p {
108
- margin-top: 0; }
109
- dl dt {
110
- grid-column-start: 1; }
111
- dl dd {
112
- grid-column-start: 2; }
113
-
114
- b, strong {
115
- font-weight: bold; }
116
-
117
- div.document-stage-band, div.document-type-band {
118
- background-color: #333333; }
119
-
120
- a.FootnoteRef + a.FootnoteRef::before {
121
- content: ", ";
122
- vertical-align: super; }
123
-
124
- a.TableFootnoteRef + a.TableFootnoteRef::before {
125
- content: ", ";
126
- vertical-align: super; }
127
-
128
- a.TableFootnoteRef, span.TableFootnoteRef,
129
- a.FootnoteRef, span.FootnoteRef {
130
- vertical-align: super; }
131
-
132
- .addition {
133
- color: blue; }
134
-
135
- .deletion {
136
- color: red;
137
- text-decoration: line-through; }
138
-
139
- ruby {
140
- ruby-position: over;
141
- -webkit-ruby-position: before; }
142
-
143
- ruby ruby {
144
- ruby-position: under;
145
- -webkit-ruby-position: after; }
146
-
147
- /* code highlighting with line numbers */
148
- table.rouge-line-table td.rouge-gutter {
149
- -moz-user-select: none;
150
- -ms-user-select: none;
151
- -webkit-user-select: none;
152
- user-select: none;
153
- padding-right: 1em; }
154
-
155
- table.rouge-line-table td.rouge-code {
156
- -moz-user-select: all;
157
- -ms-user-select: all;
158
- -webkit-user-select: all;
159
- user-select: all; }
160
-
161
- table.rouge-line-table,
162
- table.rouge-line-table th,
163
- table.rouge-line-table td {
164
- width: auto;
165
- border: none;
166
- margin: 0;
167
- padding: 0;
168
- font-size: 100%; }
169
-
170
- table.rouge-line-table pre {
171
- margin: 0;
172
- padding: 0;
173
- overflow-x: visible;
174
- font-size: 100%; }
175
-
176
- /* header § links */
177
- a.header {
178
- color: inherit;
179
- text-decoration: none; }
180
-
181
- a.header:hover {
182
- color: #a53221 !important;
183
- background: inherit;
184
- box-shadow: none; }
185
-
186
- a.header:visited {
187
- color: inherit;
188
- text-decoration: none; }
189
-
190
- a.anchor {
191
- position: absolute;
192
- z-index: 1001;
193
- width: 1.5ex;
194
- margin-left: -1.5ex;
195
- display: block;
196
- text-decoration: none !important;
197
- visibility: hidden;
198
- text-align: center;
199
- font-weight: 400; }
200
-
201
- a.anchor::before {
202
- content: "\00A7";
203
- font-size: .85em;
204
- display: block;
205
- padding-top: .1em; }
206
-
207
- a.anchor:hover {
208
- color: #a53221;
209
- background: inherit;
210
- box-shadow: none; }
211
-
212
- h1 > a.anchor:hover,
213
- h2 > a.anchor:hover,
214
- h3 > a.anchor:hover,
215
- h4 > a.anchor:hover,
216
- h5 > a.anchor:hover,
217
- h6 > a.anchor:hover,
218
- .inline-header > a.anchor:hover,
219
- h1:hover > a.anchor,
220
- h2:hover > a.anchor,
221
- h3:hover > a.anchor,
222
- h4:hover > a.anchor,
223
- h5:hover > a.anchor,
224
- h6:hover > a.anchor,
225
- .inline-header:hover > a.anchor {
226
- visibility: visible; }
227
-
228
- /* collapsible snippets: collapsible before hidable */
229
- .hidable {
230
- max-height: 0;
231
- overflow: hidden;
232
- transition: max-height 0.2s ease-out; }
233
-
234
- .collapsible {
235
- background-color: #777;
236
- color: white;
237
- cursor: pointer;
238
- padding: 3px 0;
239
- margin: 0;
240
- width: 100%;
241
- border: none;
242
- text-align: left;
243
- outline: none;
244
- font-size: 15px; }
245
-
246
- .active, .collapsible:hover {
247
- background-color: #555; }
248
-
249
- .collapsible:after {
250
- content: '\25bc';
251
- color: white;
252
- font-weight: bold;
253
- float: right;
254
- margin-left: 12px;
255
- margin-right: 12px; }
256
-
257
- .active:after {
258
- content: "\25b2"; }
259
-
260
- /* collapsible: */
261
- .collapsible + .hidable {
262
- margin-top: 0; }
263
-
264
- .collapsible:not(.active) + .hidable {
265
- overflow: hidden;
266
- padding: 0; }
267
-
268
- #standard-band {
269
- background-color: #0AC442; }
270
-
271
- #standard {
272
- border-bottom: solid 3px #0AC442; }
273
-
274
- #directive-band {
275
- background-color: #540D6E; }
276
-
277
- #directive {
278
- border-bottom: solid 3px #540D6E; }
279
-
280
- #guide-band {
281
- background-color: #D183C9; }
282
-
283
- #guide {
284
- border-bottom: solid 3px #D183C9; }
285
-
286
- #specification-band {
287
- background-color: #65AFFF; }
288
-
289
- #specification {
290
- border-bottom: solid 3px #65AFFF; }
291
-
292
- #report-band {
293
- background-color: #3A405A; }
294
-
295
- #report {
296
- border-bottom: solid 3px #3A405A; }
297
-
298
- #amendment-band {
299
- background-color: #F26430; }
300
-
301
- #amendment {
302
- border-bottom: solid 3px #F26430; }
303
-
304
- #corrigendum-band {
305
- background-color: #C84630; }
306
-
307
- #corrigendum {
308
- border-bottom: solid 3px #C84630; }
309
-
310
- #administrative-band {
311
- background-color: #BFAE48; }
312
-
313
- #administrative {
314
- border-bottom: solid 3px #BFAE48; }
315
-
316
- #advisory-band {
317
- background-color: #BD9391; }
318
-
319
- #advisory {
320
- border-bottom: solid 3px #BD9391; }
321
-
322
- #proposal-band {
323
- background-color: #39A0ED; }
324
-
325
- #proposal {
326
- border-bottom: solid 3px #39A0ED; }
327
-
328
- #working-draft-band {
329
- background-color: #2D7393; }
330
-
331
- #working-draft {
332
- border-bottom: solid 3px #2D7393; }
333
-
334
- #committee-draft-band {
335
- background-color: #2A6B7C; }
336
-
337
- #committee-draft {
338
- border-bottom: solid 3px #2A6B7C; }
339
-
340
- #draft-standard-band {
341
- background-color: #1C7F7A; }
342
-
343
- #draft-standard {
344
- border-bottom: solid 3px #1C7F7A; }
345
-
346
- #final-draft-band {
347
- background-color: #53C170; }
348
-
349
- #final-draft {
350
- border-bottom: solid 3px #53C170; }
351
-
352
- #published-band {
353
- background-color: #069E2D; }
354
-
355
- #published {
356
- border-bottom: solid 3px #069E2D; }
357
-
358
- #withdrawn-band {
359
- background-color: #004E64; }
360
-
361
- #withdrawn {
362
- border-bottom: solid 3px #004E64; }
363
-
364
- #cancelled-band {
365
- background-color: #2E382E; }
366
-
367
- #cancelled {
368
- border-bottom: solid 3px #2E382E; }