metanorma-rsd 1.3.9 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,56 +0,0 @@
1
- require_relative "metadata"
2
- require "fileutils"
3
-
4
- module IsoDoc
5
- module Rsd
6
- module BaseConvert
7
- #def convert1(docxml, filename, dir)
8
- #FileUtils.cp html_doc_path('logo.svg'), File.join(@localdir, "logo.svg")
9
- #@files_to_delete << File.join(@localdir, "logo.svg")
10
- #super
11
- #end
12
-
13
- def metadata_init(lang, script, labels)
14
- @meta = Metadata.new(lang, script, labels)
15
- end
16
-
17
- def annex_name(annex, name, div)
18
- div.h1 **{ class: "Annex" } do |t|
19
- t << "#{anchor(annex['id'], :label)} "
20
- t.br
21
- t.b do |b|
22
- name&.children&.each { |c2| parse(c2, b) }
23
- end
24
- end
25
- end
26
-
27
- def i18n_init(lang, script)
28
- super
29
- @annex_lbl = "Appendix"
30
- end
31
-
32
- def fileloc(loc)
33
- File.join(File.dirname(__FILE__), loc)
34
- end
35
-
36
- def cleanup(docxml)
37
- super
38
- term_cleanup(docxml)
39
- end
40
-
41
- def term_cleanup(docxml)
42
- docxml.xpath("//p[@class = 'Terms']").each do |d|
43
- h2 = d.at("./preceding-sibling::*[@class = 'TermNum'][1]")
44
- h2.add_child("&nbsp;")
45
- h2.add_child(d.remove)
46
- end
47
- docxml
48
- end
49
-
50
- def info(isoxml, out)
51
- @meta.security isoxml, out
52
- super
53
- end
54
- end
55
- end
56
- end