diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp index 8de82a1cdc..e4a5cc2e49 100644 --- a/src/graphics/PreviewLoader.cpp +++ b/src/graphics/PreviewLoader.cpp @@ -24,6 +24,7 @@ #include "LyXRC.h" #include "output.h" #include "OutputParams.h" +#include "PDFOptions.h" #include "TexRow.h" #include "frontends/Application.h" // hexName @@ -604,6 +605,10 @@ void PreviewLoader::Impl::startLoading(bool wait) // FIXME what about LuaTeX? if (buffer_.bufferFormat() == "xetex") cs << " xelatex"; + // DVI output fails sometimes with hyperref + // (probably a preview-latex/hyperref bug) + else if (buffer_.params().pdfoptions().use_hyperref) + cs << " pdflatex"; string const command = libScriptSearch(cs.str());