Sha256: ff11476b880c819ac15d02e991c1db67aaeae1ec40f6529050a460e1e86aad0b
Contents?: true
Size: 1.66 KB
Versions: 3
Compression:
Stored size: 1.66 KB
Contents
require_relative "base_convert" require "isodoc" module IsoDoc module Acme # A {Converter} implementation that generates Word output, and a document # schema encapsulation of the document for validation class WordConvert < IsoDoc::WordConvert def initialize(options) @libdir = File.dirname(__FILE__) super end class << self attr_accessor :_file end def self.inherited( k ) k._file = caller_locations.first.absolute_path end def default_fonts(options) { bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Arial",sans-serif'), headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Arial",sans-serif'), monospacefont: '"Courier New",monospace' } end 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.header) || 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 def configuration Metanorma::Acme.configuration end include BaseConvert end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
metanorma-acme-1.4.3 | lib/isodoc/acme/word_convert.rb |
metanorma-acme-1.4.2 | lib/isodoc/acme/word_convert.rb |
metanorma-acme-1.4.1 | lib/isodoc/acme/word_convert.rb |