lib/cossincalc/triangle/formatter/latex.rb in cossincalc-1.0.7 vs lib/cossincalc/triangle/formatter/latex.rb in cossincalc-1.0.8
- old
+ new
@@ -29,10 +29,10 @@
# Saves the generated LaTeX to a TeX file and then converts it using pdflatex.
# The filename should be provided without the .pdf extension.
def save_pdf(filename)
save_tex(filename)
- Dir.chdir(File.dirname(filename)) { `pdflatex "#{filename}.tex"` }
+ Dir.chdir(File.dirname(filename)) { `pdflatex "#{File.basename(filename)}.tex"` }
end
# Returns the content of the LaTeX document.
def document_content(image_filename = nil)
variable_table + "\\\\[0.2 cm]\n\n" + equations + "\n\n" + drawing(image_filename)