]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetexternal.C
* In the process of fixing the math background color bug, this commit transfer backgr...
[lyx.git] / src / insets / insetexternal.C
index 0832d4be70eff8b0776027e9ba965c826d9a91b1..588dabc39969747a563997b3ae28e1ad6b4a506a 100644 (file)
@@ -687,7 +687,7 @@ int InsetExternal::latex(Buffer const & buf, odocstream & os,
        // "nice" means that the buffer is exported to LaTeX format but not
        // run through the LaTeX compiler.
        // If we're running through the LaTeX compiler, we should write the
-       // generated files in the bufer's temporary directory.
+       // generated files in the buffer's temporary directory.
        bool const external_in_tmpdir = !runparams.nice;
        bool const dryrun = runparams.dryrun || runparams.inComment;
 
@@ -803,7 +803,9 @@ bool preview_wanted(InsetExternalParams const & params)
 docstring const latex_string(InsetExternal const & inset, Buffer const & buffer)
 {
        odocstringstream os;
-       OutputParams runparams;
+       // We don't need to set runparams.encoding since it is not used by
+       // latex().
+       OutputParams runparams(0);
        runparams.flavor = OutputParams::LATEX;
        inset.latex(buffer, os, runparams);
        return os.str();