194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
# File 'lib/limarka/conversor.rb', line 194
def textual(pretextual_tempfile, postextual_tempfile)
valida_yaml
Open3.popen3("pandoc -f #{@t.formato} -t latex -s \"--data-dir=#{options[:templates_dir]}\" --template=trabalho-academico --top-level-division=chapter --include-before-body=#{pretextual_tempfile.path} --include-after-body=#{postextual_tempfile.path} #{filtros_lua} #{filtros} --filter #{pandoc_abnt_path}") {|stdin, stdout, stderr, wait_thr|
stdin.write(File.read(options[:templates_dir] + '/templates/configuracao-tecnica.yaml'))
stdin.write("\n")
stdin.write(hash_to_yaml(t.configuracao))
stdin.write("\n")
stdin.write(t.texto)
stdin.close
@texto_tex = stdout.read
exit_status = wait_thr.value if(exit_status!=0) then puts ("Erro: " + stderr.read).red end
}
File.open(texto_tex_file, 'w') { |f| f.write(@texto_tex)}
end
|