]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/PreviewLoader.C
If the graphics loader has a copy c-tor it should have copy assignment that does...
[lyx.git] / src / graphics / PreviewLoader.C
index 6a92629ae1a8da10385d2f2e00c635de629f97b9..cf4ae4faaf2f9bfce80d02a749a9af4b61cd4b72 100644 (file)
@@ -29,6 +29,7 @@
 #include "support/forkedcall.h"
 #include "support/forkedcontr.h"
 #include "support/tostr.h"
+#include "support/lstrings.h"
 #include "support/lyxlib.h"
 
 #include <boost/bind.hpp>
@@ -566,14 +567,17 @@ void PreviewLoader::Impl::dumpPreamble(ostream & os) const
        // Dump the preamble only.
        LatexRunParams runparams;
        runparams.flavor = LatexRunParams::LATEX;
-       tmp.makeLaTeXFile(os, buffer_.filePath(), runparams, true, false, true);
+       runparams.nice = true;
+       runparams.moving_arg = true;
+       runparams.free_spacing = true;
+       tmp.makeLaTeXFile(os, buffer_.filePath(), runparams, false, true);
 
        // FIXME! This is a HACK! The proper fix is to control the 'true'
        // passed to WriteStream below:
        // int InsetFormula::latex(Buffer const *, ostream & os,
-       //                         bool fragile, bool) const
+       //                         LatexRunParams const & runparams) const
        // {
-       //      WriteStream wi(os, fragile, true);
+       //      WriteStream wi(os, runparams.moving_arg, true);
        //      par_->write(wi);
        //      return wi.line();
        // }
@@ -587,7 +591,7 @@ void PreviewLoader::Impl::dumpPreamble(ostream & os) const
 
        for (; it != end; ++it)
                if (it->lyxCode() == Inset::MATHMACRO_CODE)
-                       it->latex(&buffer_, os, runparams, true, true);
+                       it->latex(&buffer_, os, runparams);
 
        // All equation lables appear as "(#)" + preview.sty's rendering of
        // the label name