Sha256: dcb683c91fc5393aeeb341452e273e7895fab9d849626bc397cf94406e980e30
Contents?: true
Size: 1.21 KB
Versions: 2
Compression:
Stored size: 1.21 KB
Contents
module IsoDoc module Iso class WordConvert < IsoDoc::WordConvert def default_fonts(options) b = options[:bodyfont] || (options[:script] == "Hans" ? '"SimSun",serif' : '"Cambria",serif') h = options[:headerfont] || (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Cambria",serif') m = options[:monospacefont] || '"Courier New",monospace' "$bodyfont: #{b};\n$headerfont: #{h};\n$monospacefont: #{m};\n" end def html_doc_path(file) File.join(File.dirname(__FILE__), File.join("html", file)) end def initialize(options) super @wordstylesheet = generate_css(html_doc_path("wordstyle.scss"), false, default_fonts(options)) @standardstylesheet = generate_css(html_doc_path("isodoc.scss"), false, default_fonts(options)) @header = html_doc_path("header.html") @wordcoverpage = html_doc_path("word_iso_titlepage.html") @wordintropage = html_doc_path("word_iso_intro.html") @ulstyle = "l3" @olstyle = "l2" end def implicit_reference(b) isocode = b.at(ns("./docidentifier")).text isocode == "IEV" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
isodoc-0.8 | lib/isodoc/iso/word_convert.rb |
isodoc-0.7.1 | lib/isodoc/iso/wordconvert.rb |