Class: IsoDoc::Acme::WordConvert
- Inherits:
-
WordConvert
- Object
- WordConvert
- IsoDoc::Acme::WordConvert
show all
- Includes:
- BaseConvert
- Defined in:
- lib/isodoc/acme/word_convert.rb
Overview
A Converter implementation that generates Word output, and a document schema encapsulation of the document for validation
Class Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
#annex_name, #baselocation, #cleanup, #fileloc, #i18n_init, #make_body, #metadata_init, #term_cleanup
Constructor Details
#initialize(options) ⇒ WordConvert
10
11
12
13
|
# File 'lib/isodoc/acme/word_convert.rb', line 10
def initialize(options)
@libdir = File.dirname(__FILE__)
super
end
|
Class Attribute Details
._file ⇒ Object
Returns the value of attribute _file.
16
17
18
|
# File 'lib/isodoc/acme/word_convert.rb', line 16
def _file
@_file
end
|
Class Method Details
.inherited(k) ⇒ Object
19
20
21
|
# File 'lib/isodoc/acme/word_convert.rb', line 19
def self.inherited( k )
k._file = caller_locations.first.absolute_path
end
|
Instance Method Details
#configuration ⇒ Object
49
50
51
|
# File 'lib/isodoc/acme/word_convert.rb', line 49
def configuration
Metanorma::Acme.configuration
end
|
#default_file_locations(options) ⇒ Object
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/isodoc/acme/word_convert.rb', line 31
def default_file_locations(options)
{
wordstylesheet: baselocation(configuration.wordstylesheet) ||
html_doc_path("wordstyle.scss"),
standardstylesheet: baselocation(configuration.standardstylesheet) ||
html_doc_path("acme.scss"),
header: baselocation(configuration.) ||
html_doc_path("header.html"),
wordcoverpage: baselocation(configuration.wordcoverpage) ||
html_doc_path("word_acme_titlepage.html"),
wordintropage: baselocation(configuration.wordintropage) ||
html_doc_path("word_acme_intro.html"),
i18nyaml: baselocation(configuration.i18nyaml),
ulstyle: "l3",
olstyle: "l2",
}
end
|
#default_fonts(options) ⇒ Object
23
24
25
26
27
28
29
|
# File 'lib/isodoc/acme/word_convert.rb', line 23
def default_fonts(options)
{
bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : configuration.word_bodyfont || '"Arial",sans-serif'),
headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : configuration. || '"Arial",sans-serif'),
monospacefont: configuration.word_monospacefont || '"Courier New",monospace'
}
end
|