metanorma-ieee 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/rake.yml +13 -0
- data/.rubocop.yml +10 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +11 -0
- data/LICENSE +25 -0
- data/README.adoc +30 -0
- data/Rakefile +8 -0
- data/bin/console +14 -0
- data/bin/rspec +17 -0
- data/bin/setup +8 -0
- data/lib/html2doc/ieee.rb +89 -0
- data/lib/isodoc/ieee/base_convert.rb +33 -0
- data/lib/isodoc/ieee/html/header.html +146 -0
- data/lib/isodoc/ieee/html/html_ieee_intro.html +12 -0
- data/lib/isodoc/ieee/html/html_ieee_titlepage.html +44 -0
- data/lib/isodoc/ieee/html/htmlstyle.css +1027 -0
- data/lib/isodoc/ieee/html/htmlstyle.scss +736 -0
- data/lib/isodoc/ieee/html/ieee.css +3603 -0
- data/lib/isodoc/ieee/html/ieee.scss +3418 -0
- data/lib/isodoc/ieee/html/scripts.html +70 -0
- data/lib/isodoc/ieee/html/word_ieee_intro.html +70 -0
- data/lib/isodoc/ieee/html/word_ieee_titlepage.html +28 -0
- data/lib/isodoc/ieee/html/wordstyle.css +5310 -0
- data/lib/isodoc/ieee/html/wordstyle.scss +5026 -0
- data/lib/isodoc/ieee/html_convert.rb +52 -0
- data/lib/isodoc/ieee/i18n-en.yaml +28 -0
- data/lib/isodoc/ieee/i18n.rb +19 -0
- data/lib/isodoc/ieee/ieee.amendment.xsl +11177 -0
- data/lib/isodoc/ieee/ieee.rb +11 -0
- data/lib/isodoc/ieee/ieee.standard.xsl +11177 -0
- data/lib/isodoc/ieee/init.rb +28 -0
- data/lib/isodoc/ieee/metadata.rb +136 -0
- data/lib/isodoc/ieee/pdf_convert.rb +24 -0
- data/lib/isodoc/ieee/presentation_terms.rb +181 -0
- data/lib/isodoc/ieee/presentation_xml_convert.rb +89 -0
- data/lib/isodoc/ieee/word_authority.rb +160 -0
- data/lib/isodoc/ieee/word_cleanup.rb +134 -0
- data/lib/isodoc/ieee/word_convert.rb +75 -0
- data/lib/isodoc/ieee/xref.rb +77 -0
- data/lib/isodoc/ieee.rb +11 -0
- data/lib/metanorma/ieee/basicdoc.rng +1150 -0
- data/lib/metanorma/ieee/biblio.rng +1385 -0
- data/lib/metanorma/ieee/boilerplate.xml +298 -0
- data/lib/metanorma/ieee/cleanup.rb +160 -0
- data/lib/metanorma/ieee/converter.rb +81 -0
- data/lib/metanorma/ieee/front.rb +120 -0
- data/lib/metanorma/ieee/ieee.rng +97 -0
- data/lib/metanorma/ieee/isodoc.rng +2776 -0
- data/lib/metanorma/ieee/processor.rb +56 -0
- data/lib/metanorma/ieee/reqt.rng +226 -0
- data/lib/metanorma/ieee/validate.rb +198 -0
- data/lib/metanorma/ieee/validate_section.rb +119 -0
- data/lib/metanorma/ieee/validate_style.rb +108 -0
- data/lib/metanorma/ieee/version.rb +5 -0
- data/lib/metanorma/ieee.rb +11 -0
- data/lib/metanorma-ieee.rb +8 -0
- data/metanorma-itu.gemspec +41 -0
- metadata +284 -0
@@ -0,0 +1,52 @@
|
|
1
|
+
require "isodoc"
|
2
|
+
require_relative "init"
|
3
|
+
|
4
|
+
module IsoDoc
|
5
|
+
module IEEE
|
6
|
+
class HtmlConvert < IsoDoc::HtmlConvert
|
7
|
+
def initialize(options)
|
8
|
+
@libdir = File.dirname(__FILE__)
|
9
|
+
super
|
10
|
+
end
|
11
|
+
|
12
|
+
def default_fonts(options)
|
13
|
+
{
|
14
|
+
bodyfont: (if options[:script] == "Hans"
|
15
|
+
'"Source Han Sans",serif'
|
16
|
+
else
|
17
|
+
'"Times New Roman",serif'
|
18
|
+
end),
|
19
|
+
headerfont: (if options[:script] == "Hans"
|
20
|
+
'"Source Han Sans",sans-serif'
|
21
|
+
else
|
22
|
+
'"Times New Roman",serif'
|
23
|
+
end),
|
24
|
+
monospacefont: '"Courier New",monospace',
|
25
|
+
normalfontsize: "14px",
|
26
|
+
monospacefontsize: "0.8em",
|
27
|
+
footnotefontsize: "0.9em",
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
def default_file_locations(_options)
|
32
|
+
{
|
33
|
+
htmlstylesheet: html_doc_path("htmlstyle.scss"),
|
34
|
+
htmlcoverpage: html_doc_path("html_ieee_titlepage.html"),
|
35
|
+
htmlintropage: html_doc_path("html_ieee_intro.html"),
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
def html_cleanup(html)
|
40
|
+
para_type_strip(super)
|
41
|
+
end
|
42
|
+
|
43
|
+
def para_type_strip(html)
|
44
|
+
html.xpath("//p[@type]").each { |p| p.delete("type") }
|
45
|
+
html
|
46
|
+
end
|
47
|
+
|
48
|
+
include BaseConvert
|
49
|
+
include Init
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
symbolsabbrev: Acronyms and abbreviations
|
2
|
+
abbrev: Acronyms and abbreviations
|
3
|
+
symbols: Acronyms and abbreviations
|
4
|
+
termsdef: Definitions
|
5
|
+
termsdefsymbolsabbrev: Definitions, acronyms and abbreviations
|
6
|
+
termsdefsymbols: Definitions, acronyms and abbreviations
|
7
|
+
termsdefabbrev: Definitions, acronyms and abbreviations
|
8
|
+
formula: Equation
|
9
|
+
inequality: Inequality
|
10
|
+
doctype_abbrev:
|
11
|
+
standard: Std.
|
12
|
+
recommended-practice: Rec. Prac.
|
13
|
+
guide: Gde.
|
14
|
+
term_def_boilerplate: "<p>For the purposes of this document, the following terms and definitions apply. The <em>IEEE Standards Dictionary Online</em> should be consulted for terms not defined in this clause.<fn><p><em>IEEE Standards Dictionary Online</em> is available at: <link target='http://dictionary.ieee.org'/>. An IEEE Account is required for access to the dictionary, and one can be created at no charge on the dictionary sign-in page.</p></fn></p>"
|
15
|
+
norm_with_refs_pref: The following referenced documents are indispensable for the application of this document (i.e., they must be understood and used, so each referenced document is cited in text and its relationship to this document is explained). For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments or corrigenda) applies.
|
16
|
+
biblio_pref: Bibliographical references are resources that provide additional or helpful material but do not need to be understood or used to implement this standard. Reference to these resources is made for informational use only.
|
17
|
+
note_inform_fn: Notes to text, tables, and figures are for information only and do not contain requirements needed to implement the standard.
|
18
|
+
relatedterms:
|
19
|
+
deprecates: Deprecates
|
20
|
+
supersedes: Supersedes
|
21
|
+
narrower: Narrower
|
22
|
+
broader: Broader
|
23
|
+
equivalent: Syn
|
24
|
+
compare: Compare
|
25
|
+
contrast: Contrast
|
26
|
+
see: See
|
27
|
+
seealso: See also
|
28
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module IsoDoc
|
2
|
+
module IEEE
|
3
|
+
class I18n < IsoDoc::I18n
|
4
|
+
def load_yaml2x(str)
|
5
|
+
::YAML.load_file(File.join(File.dirname(__FILE__),
|
6
|
+
"i18n-#{str}.yaml"))
|
7
|
+
end
|
8
|
+
|
9
|
+
def load_yaml1(lang, script)
|
10
|
+
y = case lang
|
11
|
+
when "en"
|
12
|
+
load_yaml2x(lang)
|
13
|
+
else load_yaml2x("en")
|
14
|
+
end
|
15
|
+
super.deep_merge(y)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|