Method: IsoDoc::Convert#initialize

Defined in:
lib/isodoc/convert.rb

#initialize(options) ⇒ Convert

htmlstylesheet: Generic stylesheet for HTML wordstylesheet: Generic stylesheet for Word standardsheet: Stylesheet specific to Standard header: Header file for Word htmlcoverpage: Cover page for HTML wordcoverpage: Cover page for Word htmlintropage: Introductory page for HTML wordintropage: Introductory page for Word i18nyaml: YAML file for internationalisation of text ulstyle: list style in Word CSS for unordered lists olstyle: list style in Word CSS for ordered lists bodyfont: font to use for body text headerfont: font to use for header text monospace: font to use for monospace text suppressheadingnumbers: suppress heading numbers for clauses scripts: Scripts file for HTML scripts_pdf: Scripts file for PDF datauriimage: Encode images in HTML output as data URIs



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/isodoc/convert.rb', line 27

def initialize(options)
  @libdir = File.dirname(__FILE__) unless @libdir
  options.merge!(default_fonts(options)) { |_, old, new| old || new }.
    merge!(default_file_locations(options)) { |_, old, new| old || new }
  @options = options
  @files_to_delete = []
  @htmlstylesheet = generate_css(options[:htmlstylesheet], true, extract_fonts(options))
  @wordstylesheet = generate_css(options[:wordstylesheet], false, extract_fonts(options))
  @standardstylesheet = generate_css(options[:standardstylesheet], false, extract_fonts(options))
  @header = options[:header]
  @htmlcoverpage = options[:htmlcoverpage]
  @wordcoverpage = options[:wordcoverpage]
  @htmlintropage = options[:htmlintropage]
  @wordintropage = options[:wordintropage]
  @scripts = options[:scripts]
  @scripts_pdf = options[:scripts_pdf]
  @i18nyaml = options[:i18nyaml]
  @ulstyle = options[:ulstyle]
  @olstyle = options[:olstyle]
  @datauriimage = options[:datauriimage]
  @suppressheadingnumbers = options[:suppressheadingnumbers]
  @termdomain = ""
  @termexample = false
  @note = false
  @sourcecode = false
  @anchors = {}
  @footnotes = []
  @comments = []
  @in_footnote = false
  @in_comment = false
  @in_table = false
  @in_figure = false
  @seen_footnote = Set.new
  @c = HTMLEntities.new
  @openmathdelim = "`"
  @closemathdelim = "`"
  @lang = "en"
  @script = "Latn"
  @tmpimagedir = "_images"
  @maxwidth = 1200
  @maxheight = 800
end