Not all incarnations of pdflatex know the --output-directory option [Denis]
This commit is contained in:
parent
63cf09059b
commit
3c1990a42a
|
@ -220,7 +220,13 @@ class WikiController < ApplicationController
|
||||||
def convert_tex_to_pdf(tex_path)
|
def convert_tex_to_pdf(tex_path)
|
||||||
# TODO remove earlier PDF files with the same prefix
|
# TODO remove earlier PDF files with the same prefix
|
||||||
# TODO handle gracefully situation where pdflatex is not available
|
# TODO handle gracefully situation where pdflatex is not available
|
||||||
logger.info `pdflatex --interaction=nonstopmode --output-directory #{File.dirname(tex_path)} #{File.basename(tex_path)}`
|
begin
|
||||||
|
wd = Dir.getwd
|
||||||
|
Dir.chdir(File.dirname(tex_path))
|
||||||
|
logger.info `pdflatex --interaction=nonstopmode #{File.basename(tex_path)}`
|
||||||
|
ensure
|
||||||
|
Dir.chdir(wd)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def export_page_to_tex(file_path)
|
def export_page_to_tex(file_path)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Uncomment the line below to enable pdflatex tests; don't forget to comment them again
|
# Uncomment the line below to enable pdflatex tests; don't forget to comment them again
|
||||||
# commiting to SVN
|
# commiting to SVN
|
||||||
$INSTIKI_TEST_PDFLATEX = true
|
# $INSTIKI_TEST_PDFLATEX = true
|
||||||
|
|
||||||
require File.dirname(__FILE__) + '/../test_helper'
|
require File.dirname(__FILE__) + '/../test_helper'
|
||||||
require 'wiki_controller'
|
require 'wiki_controller'
|
||||||
|
|
Loading…
Reference in a new issue