Method: IsoDoc::WordFunction::Postprocess#toWord

Defined in:
lib/isodoc/word_function/postprocess.rb

#toWord(result, filename, dir, header) ⇒ Object



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/isodoc/word_function/postprocess.rb', line 40

def toWord(result, filename, dir, header)
  result = from_xhtml(word_cleanup(to_xhtml(result)))
  @wordstylesheet = wordstylesheet_update
  Html2Doc.process(
    result,
    filename: filename,
    imagedir: @localdir,
    stylesheet: @wordstylesheet&.path,
    header_file: header&.path, dir: dir,
    asciimathdelims: [@openmathdelim, @closemathdelim],
    liststyles: { ul: @ulstyle, ol: @olstyle }
  )
  header&.unlink
  @wordstylesheet.unlink if @wordstylesheet.is_a?(Tempfile)
end