25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/isodoc/pdf_convert.rb', line 25
def convert(input_filename, file = nil, debug = false, output_filename = nil)
file = File.read(input_filename, encoding: "utf-8") if file.nil?
@openmathdelim, @closemathdelim = (file)
docxml, filename, dir = convert_init(file, input_filename, debug)
result = convert1(docxml, filename, dir)
return result if debug
postprocess(result, "#{filename}.tmp.html", dir)
FileUtils.rm_rf dir
::Metanorma::Output::Pdf.new.convert(
"#{filename}.tmp.html",
output_filename || "#{filename}.#{@suffix}",
)
FileUtils.rm_rf ["#{filename}.tmp.html", tmpimagedir]
end
|