Not all incarnations of pdflatex know the --output-directory option [Denis]

This commit is contained in:
Alexey Verkhovsky 2005-01-30 02:56:03 +00:00
parent 63cf09059b
commit 3c1990a42a
2 changed files with 8 additions and 2 deletions

View file

@ -220,7 +220,13 @@ class WikiController < ApplicationController
def convert_tex_to_pdf(tex_path)
# TODO remove earlier PDF files with the same prefix
# 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
def export_page_to_tex(file_path)

View file

@ -2,7 +2,7 @@
# Uncomment the line below to enable pdflatex tests; don't forget to comment them again
# commiting to SVN
$INSTIKI_TEST_PDFLATEX = true
# $INSTIKI_TEST_PDFLATEX = true
require File.dirname(__FILE__) + '/../test_helper'
require 'wiki_controller'