* PreviewLoader.cpp:

- use pdflatex route for preview snippet generation if hyperref is used.

This works around a bug in hyperref and/or preview-latex via DVI route (bug #7303).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37696 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2011-02-16 16:59:22 +00:00
parent ebebdef6c9
commit c020978d18

View File

@ -24,6 +24,7 @@
#include "LyXRC.h" #include "LyXRC.h"
#include "output.h" #include "output.h"
#include "OutputParams.h" #include "OutputParams.h"
#include "PDFOptions.h"
#include "TexRow.h" #include "TexRow.h"
#include "frontends/Application.h" // hexName #include "frontends/Application.h" // hexName
@ -604,6 +605,10 @@ void PreviewLoader::Impl::startLoading(bool wait)
// FIXME what about LuaTeX? // FIXME what about LuaTeX?
if (buffer_.bufferFormat() == "xetex") if (buffer_.bufferFormat() == "xetex")
cs << " xelatex"; 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()); string const command = libScriptSearch(cs.str());