metanorma-gb 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 110b6ef6b6a174d04c98ba1a7275a6c0bb3e9f5c5b97e2690b5b4f718c2fec0a
4
- data.tar.gz: f063c6f9f38981719d774166a816d3a507126a05ad083be5021cf68984aee149
3
+ metadata.gz: d78f12193ca3356fc2302192db0411d79cf7087b08385bc2908fec1d0e118993
4
+ data.tar.gz: '078575b73a66f01e6650b8fd8a0d23ebc7dd89135e7f3dee2d88d0a0c0b146e8'
5
5
  SHA512:
6
- metadata.gz: 0adbf79cf6b413d962d5aa9bde4101b81f8ed89797a7a00bda80e448b14a0c4d3029e9a3e23f0e28da7bc2655a9b25347ff1161ffb2f5c26eb8b6b80452df141
7
- data.tar.gz: fce8f2ff2f7de990f91210065eaada65cfe789661a0845b3714ea406810977a5a53d67c269ba0a6a76b42e4c8f2e2ede2d7cf74047ab16288372ace3cd07c925
6
+ metadata.gz: 1c703597011e7a5425b1cd2ef3265e3350b91b906dc134b4a95e5adab43e519060897f4e6353fb2a7d67cf5e3ce7dbb0175f87dfacb02e0be4692b95e51f7121
7
+ data.tar.gz: 35e2141810194056040a4ce56599968718b0dbaf38823f845e85f4c0afa192f0749dd0723384bb47ab0e3132a84716d355fb286e0ac8db829fd32240f7623f39
@@ -177,7 +177,7 @@ module Asciidoctor
177
177
  end
178
178
 
179
179
  def fetch_ref(xml, code, year, **opts)
180
- code = "GB Standard " + code if /^#{GBCODE}[^A-Za-z]/.match? code
180
+ code = "CN(#{code})" if !/^CN\(/.match(code) && /^#{GBCODE}[^A-Za-z]/.match(code)
181
181
  hit = @bibdb&.fetch(code, year, opts)
182
182
  return nil if hit.nil?
183
183
  xml.parent.add_child(hit.to_xml)
@@ -1,5 +1,5 @@
1
1
  module Asciidoctor
2
2
  module Gb
3
- VERSION = "1.0.2"
3
+ VERSION = "1.0.3"
4
4
  end
5
5
  end
@@ -81,6 +81,10 @@ module IsoDoc
81
81
  end
82
82
  @labels = @labels.merge(y)
83
83
  end
84
+
85
+ def omit_docid_prefix(prefix)
86
+ super || prefix == "Chinese Standard"
87
+ end
84
88
  end
85
89
  end
86
90
  end
@@ -195,6 +195,7 @@ module IsoDoc
195
195
  #div << @term_def_boilerplate unless preface
196
196
  end
197
197
 
198
+ =begin
198
199
  def reference_names(ref)
199
200
  isopub = ref.at(ns(ISO_PUBLISHER_XPATH))
200
201
  docid = ref.at(ns("./docidentifier"))
@@ -203,6 +204,7 @@ module IsoDoc
203
204
  reference = format_ref(docid.text, isopub, date, allparts)
204
205
  @anchors[ref["id"]] = { xref: reference }
205
206
  end
207
+ =end
206
208
  end
207
209
  end
208
210
  end
@@ -133,6 +133,10 @@ module IsoDoc
133
133
  @cleanup.title_cleanup(docxml.at('//div[@class="WordSection2"]'))
134
134
  docxml
135
135
  end
136
+
137
+ def omit_docid_prefix(prefix)
138
+ super || prefix == "Chinese Standard"
139
+ end
136
140
  end
137
141
  end
138
142
  end
@@ -193,6 +193,7 @@ module IsoDoc
193
193
  #div << @term_def_boilerplate unless preface
194
194
  end
195
195
 
196
+ =begin
196
197
  def reference_names(ref)
197
198
  isopub = ref.at(ns(ISO_PUBLISHER_XPATH))
198
199
  docid = ref.at(ns("./docidentifier"))
@@ -200,6 +201,7 @@ module IsoDoc
200
201
  reference = format_ref(docid.text, isopub, date)
201
202
  @anchors[ref["id"]] = { xref: reference }
202
203
  end
204
+ =end
203
205
  end
204
206
  end
205
207
  end
@@ -59,10 +59,10 @@ time, mark, audio, video {
59
59
 
60
60
 
61
61
  html, body, div, span, applet, object, iframe,
62
- p, blockquote, pre,
63
- a, abbr, acronym, address, big, cite, code,
64
- del, dfn, em, img, ins, kbd, q, s, samp,
65
- small, strike, strong, sub, sup, tt, var,
62
+ p, blockquote,
63
+ a, abbr, acronym, address, big, cite,
64
+ del, dfn, em, img, ins, q, s,
65
+ small, strike, strong, sub, sup, var,
66
66
  b, u, i, center,
67
67
  dl, dt, dd, ol, ul, li,
68
68
  fieldset, form, label, legend,
@@ -73,7 +73,11 @@ menu, nav, output, ruby, section, summary,
73
73
  time, mark, audio, video {
74
74
  font-family: $bodyfont;
75
75
  }
76
-
76
+
77
+ code, pre, tt, kbd, samp {
78
+ font-family: $monospacefont;
79
+ }
80
+
77
81
  h1, h2, h3, h4, h5, h6, .h2Annex {
78
82
  margin-top: 1.5em;
79
83
  margin-bottom: 0.3em;
@@ -641,7 +645,7 @@ p.DeprecatedTerms {
641
645
 
642
646
  /* Navigation*/
643
647
 
644
- @media (min-width: 768px) {
648
+ @media screen and (min-width: 768px) {
645
649
  nav {
646
650
  position: fixed;
647
651
  top: 0;
@@ -695,7 +699,7 @@ p.DeprecatedTerms {
695
699
  }
696
700
  }
697
701
 
698
- @media (max-width: 768px) {
702
+ @media screen and (max-width: 768px) {
699
703
  #toc {
700
704
  padding: 0 1.5em 0 1.5em;
701
705
  overflow: visible;
@@ -59,10 +59,10 @@ time, mark, audio, video {
59
59
 
60
60
 
61
61
  html, body, div, span, applet, object, iframe,
62
- p, blockquote, pre,
63
- a, abbr, acronym, address, big, cite, code,
64
- del, dfn, em, img, ins, kbd, q, s, samp,
65
- small, strike, strong, sub, sup, tt, var,
62
+ p, blockquote,
63
+ a, abbr, acronym, address, big, cite,
64
+ del, dfn, em, img, ins, q, s,
65
+ small, strike, strong, sub, sup, var,
66
66
  b, u, i, center,
67
67
  dl, dt, dd, ol, ul, li,
68
68
  fieldset, form, label, legend,
@@ -73,6 +73,10 @@ menu, nav, output, ruby, section, summary,
73
73
  time, mark, audio, video {
74
74
  font-family: $bodyfont;
75
75
  }
76
+
77
+ code, pre, tt, kbd, samp {
78
+ font-family: $monospacefont;
79
+ }
76
80
 
77
81
  h1, h2, h3, h4, h5, h6, .h2Annex {
78
82
  font-family: $headerfont;
@@ -481,7 +485,7 @@ p.DeprecatedTerms {
481
485
 
482
486
  /* Navigation*/
483
487
 
484
- @media (min-width: 768px) {
488
+ @media screen and (min-width: 768px) {
485
489
  nav {
486
490
  position: fixed;
487
491
  top: 0;
@@ -533,7 +537,7 @@ p.DeprecatedTerms {
533
537
  }
534
538
  }
535
539
 
536
- @media (max-width: 768px) {
540
+ @media screen and (max-width: 768px) {
537
541
  #toc {
538
542
  padding: 0 1.5em 0 1.5em;
539
543
  overflow: visible;
@@ -23,10 +23,10 @@ module IsoDoc
23
23
  end
24
24
 
25
25
  def title(isoxml, _out)
26
- intro = isoxml.at(ns("//title-intro[@language='zh']"))
27
- main = isoxml.at(ns("//title-main[@language='zh']"))
28
- part = isoxml.at(ns("//title-part[@language='zh']"))
29
- partnumber = isoxml.at(ns("//project-number/@part"))
26
+ intro = isoxml.at(ns("//bibdata//title-intro[@language='zh']"))
27
+ main = isoxml.at(ns("//bibdata//title-main[@language='zh']"))
28
+ part = isoxml.at(ns("//bibdata//title-part[@language='zh']"))
29
+ partnumber = isoxml.at(ns("//bibdata/docidentifier/project-number/@part"))
30
30
  intro.nil? || set(:docmaintitlezh, intro.text + "&nbsp;")
31
31
  main.nil? || set(:docsubtitlezh, main.text)
32
32
  partnum = partnumber ? "#{part_label(partnumber, 'zh')}:" : ""
@@ -45,10 +45,10 @@ module IsoDoc
45
45
  end
46
46
 
47
47
  def subtitle(isoxml, _out)
48
- intro = isoxml.at(ns("//title-intro[@language='en']"))
49
- main = isoxml.at(ns("//title-main[@language='en']"))
50
- part = isoxml.at(ns("//title-part[@language='en']"))
51
- partnumber = isoxml.at(ns("//project-number/@part"))
48
+ intro = isoxml.at(ns("//bibdata//title-intro[@language='en']"))
49
+ main = isoxml.at(ns("//bibdata//title-main[@language='en']"))
50
+ part = isoxml.at(ns("//bibdata//title-part[@language='en']"))
51
+ partnumber = isoxml.at(ns("//bibdata/docidentifier/project-number/@part"))
52
52
  intro.nil? || set(:docmaintitleen, intro.text + "&mdash;")
53
53
  main.nil? || set(:docsubtitleen, main.text)
54
54
  partnum = partnumber ? "#{part_label(partnumber, 'en')}: " : ""
@@ -115,10 +115,10 @@ module IsoDoc
115
115
  end
116
116
 
117
117
  def docstatus(isoxml, _out)
118
- docstatus = isoxml.at(ns("//status/stage"))
118
+ docstatus = isoxml.at(ns("//bibdata/status/stage"))
119
119
  if docstatus
120
120
  set(:stage, docstatus.text.to_i)
121
- abbr = stage_abbrev_cn(docstatus.text, isoxml.at(ns("//status/iteration")),
121
+ abbr = stage_abbrev_cn(docstatus.text, isoxml.at(ns("//bibdata/status/iteration")),
122
122
  isoxml.at(ns("//version/draft")))
123
123
  set(:stageabbr, abbr)
124
124
  set(:status, STATUS_CSS[docstatus.text.to_sym])
@@ -129,7 +129,7 @@ module IsoDoc
129
129
  dn = docnumber(isoxml)
130
130
  docstatus = get[:stage]
131
131
  if docstatus
132
- abbr = stage_abbrev(docstatus.to_s, isoxml.at(ns("//status/iteration")),
132
+ abbr = stage_abbrev(docstatus.to_s, isoxml.at(ns("//bibdata/status/iteration")),
133
133
  isoxml.at(ns("//version/draft")))
134
134
  (docstatus.to_i < 60) && dn = abbr + " " + dn
135
135
  end
@@ -167,10 +167,10 @@ module IsoDoc
167
167
  end
168
168
 
169
169
  def gb_identifier(isoxml)
170
- scope = isoxml.at(ns("//gbscope"))&.text || "national"
171
- mandate = isoxml.at(ns("//gbmandate"))&.text || "mandatory"
172
- prefix = isoxml.at(ns("//gbprefix"))&.text || "XXX"
173
- docyear = isoxml&.at(ns("//copyright/from"))&.text
170
+ scope = isoxml.at(ns("//bibdata/gbtype/gbscope"))&.text || "national"
171
+ mandate = isoxml.at(ns("//bibdata/gbtype/gbmandate"))&.text || "mandatory"
172
+ prefix = isoxml.at(ns("//bibdata/gbtype/gbprefix"))&.text || "XXX"
173
+ docyear = isoxml&.at(ns("//bibdata/copyright/from"))&.text
174
174
  issuer = isoxml&.at(ns("//bibdata/contributor[role/@type = 'issuer']/"\
175
175
  "organization/name"))&.text || "GB"
176
176
  @agencies = GbAgencies::Agencies.new(@lang, @labels, issuer)
data/metanorma-gb.gemspec CHANGED
@@ -29,8 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.require_paths = ["lib"]
30
30
 
31
31
  spec.add_dependency "metanorma-iso", "~> 1.0.1"
32
- spec.add_dependency "gbbib", "~> 0.2.2"
33
- spec.add_dependency "isodoc", "~> 0.8.8"
32
+ spec.add_dependency "isodoc", "~> 0.9.0"
34
33
  spec.add_dependency "twitter_cldr"
35
34
  spec.add_dependency "gb-agencies", "~> 0.0.1"
36
35
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-gb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-01 00:00:00.000000000 Z
11
+ date: 2018-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-iso
@@ -24,34 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.0.1
27
- - !ruby/object:Gem::Dependency
28
- name: gbbib
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 0.2.2
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 0.2.2
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: isodoc
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: 0.8.8
33
+ version: 0.9.0
48
34
  type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: 0.8.8
40
+ version: 0.9.0
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: twitter_cldr
57
43
  requirement: !ruby/object:Gem::Requirement