From 1e8b925c07b627b181e3553d5d7f2908fce45701 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Wed, 25 May 2016 18:02:26 -0400 Subject: [PATCH] Output file from (xe|lua)latex is PDF, not DVI A few parts of our code depend on correctly identifying the output format of LaTeX commands. One specific bug is that because the output file was not correctly set, it was not removed after an error. For example, this commit fixes the following bug: 1. Create a new document that contains "hello\blah" where \blah is in an ERT box. 2. Compile with PDF (LuaTeX). You'll get an error because of \blah. 3. Close the error dialog. 4. Remove the text "hello" and compile again with PDF (LuaTeX). The error dialog is shown and the "Show Output Anyway" button is enabled. If you click it, it shows the previously compiled PDF (with the text "hello"). With this commit, the button is correctly disabled (and the output file is deleted). --- src/LaTeX.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp index 7ce355b398..b8e66ed108 100644 --- a/src/LaTeX.cpp +++ b/src/LaTeX.cpp @@ -97,7 +97,7 @@ LaTeX::LaTeX(string const & latex, OutputParams const & rp, : cmd(latex), file(f), path(p), lpath(lp), runparams(rp), biber(false) { num_errors = 0; - if (prefixIs(cmd, "pdf")) { // Do we use pdflatex ? + if (prefixIs(cmd, "pdf") || prefixIs(cmd, "lualatex") || prefixIs(cmd, "xelatex")) { depfile = FileName(file.absFileName() + ".dep-pdf"); output_file = FileName(changeExtension(file.absFileName(), ".pdf"));