commit 1e8b925c07b627b181e3553d5d7f2908fce45701
Author: Scott Kostyshak <[email protected]>
Date:   Wed May 25 18:02:26 2016 -0400

    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).

diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp
index 7ce355b..b8e66ed 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"));

Reply via email to