metanorma-bipm 0.0.3 → 0.0.4
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 +27 -8
- data/README.adoc +7 -138
- data/lib/asciidoctor/bipm/boilerplate-en.xml +1 -2
- data/lib/asciidoctor/bipm/boilerplate-fr.xml +2 -3
- data/lib/asciidoctor/bipm/converter.rb +30 -3
- data/lib/asciidoctor/bipm/isodoc.rng +13 -0
- data/lib/isodoc/bipm/base_convert.rb +10 -3
- data/lib/isodoc/bipm/bipm.brochure.xsl +1215 -470
- data/lib/isodoc/bipm/bipm.guide.xsl +7099 -0
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +7099 -0
- data/lib/isodoc/bipm/bipm.rapport.xsl +7099 -0
- data/lib/isodoc/bipm/html/html_bipm_titlepage.html +16 -3
- data/lib/isodoc/bipm/html/htmlstyle.css +47 -57
- data/lib/isodoc/bipm/html/htmlstyle.scss +50 -74
- data/lib/isodoc/bipm/html_convert.rb +17 -0
- data/lib/isodoc/bipm/i18n-en.yaml +14 -0
- data/lib/isodoc/bipm/i18n-fr.yaml +14 -0
- data/lib/isodoc/bipm/metadata.rb +16 -8
- data/lib/isodoc/bipm/pdf_convert.rb +4 -1
- data/lib/isodoc/bipm/presentation_xml_convert.rb +17 -6
- data/lib/isodoc/bipm/xref.rb +7 -3
- data/lib/metanorma/bipm/version.rb +1 -1
- metadata +5 -2
data/lib/isodoc/bipm/xref.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
module IsoDoc
|
2
2
|
module BIPM
|
3
3
|
class Xref < IsoDoc::Xref
|
4
|
+
def initialize(lang, script, klass, i18n, options = {})
|
5
|
+
super
|
6
|
+
end
|
7
|
+
|
4
8
|
def clause_names(docxml, sect_num)
|
5
9
|
sect_num = 0
|
6
10
|
docxml.xpath(ns("//sections/clause[not(@unnumbered = 'true')] | "\
|
@@ -56,7 +60,7 @@ module IsoDoc
|
|
56
60
|
|
57
61
|
def section_names1(clause, num, level)
|
58
62
|
@anchors[clause["id"]] =
|
59
|
-
{ label: num, level: level, xref: l10n("#{@labels["
|
63
|
+
{ label: num, level: level, xref: l10n("#{@labels["subclause"]} #{num}"),
|
60
64
|
type: "clause" }
|
61
65
|
clause.xpath(ns(NUMBERED_SUBCLAUSES)).each_with_index do |c, i|
|
62
66
|
section_names1(c, "#{num}.#{i + 1}", level + 1)
|
@@ -86,7 +90,7 @@ module IsoDoc
|
|
86
90
|
def annex_names(clause, num)
|
87
91
|
@anchors[clause["id"]] =
|
88
92
|
{ label: annex_name_lbl(clause, num), type: "clause", value: num.to_s,
|
89
|
-
xref: "#{@labels["annex"]} #{num}", level: 1 }
|
93
|
+
xref: l10n("#{@labels["annex"]} #{num}"), level: 1 }
|
90
94
|
if a = single_annex_special_section(clause)
|
91
95
|
annex_names1(a, "#{num}", 1)
|
92
96
|
else
|
@@ -117,7 +121,7 @@ module IsoDoc
|
|
117
121
|
|
118
122
|
def annex_names1(clause, num, level)
|
119
123
|
@anchors[clause["id"]] =
|
120
|
-
{ label: num, xref: "#{@labels["annex"]} #{num}",
|
124
|
+
{ label: num, xref: l10n("#{@labels["annex"]} #{num}"),
|
121
125
|
level: level, type: "clause" }
|
122
126
|
clause.xpath(ns(NUMBERED_SUBCLAUSES)).each_with_index do |c, i|
|
123
127
|
annex_names1(c, "#{num}.#{i + 1}", level + 1)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-bipm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -209,6 +209,9 @@ files:
|
|
209
209
|
- lib/isodoc/bipm.rb
|
210
210
|
- lib/isodoc/bipm/base_convert.rb
|
211
211
|
- lib/isodoc/bipm/bipm.brochure.xsl
|
212
|
+
- lib/isodoc/bipm/bipm.guide.xsl
|
213
|
+
- lib/isodoc/bipm/bipm.mise-en-pratique.xsl
|
214
|
+
- lib/isodoc/bipm/bipm.rapport.xsl
|
212
215
|
- lib/isodoc/bipm/html/html_bipm_intro.html
|
213
216
|
- lib/isodoc/bipm/html/html_bipm_titlepage.html
|
214
217
|
- lib/isodoc/bipm/html/htmlstyle.css
|