]> git.lyx.org Git - lyx.git/blobdiff - src/BufferParams.cpp
Make sure a pointer is valid before using it
[lyx.git] / src / BufferParams.cpp
index 44ddc355614faa474d451db47f236a201145de74..fa95e6a8f584d38a0685d3e4983ec75bd3c486b8 100644 (file)
@@ -1866,6 +1866,7 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features,
        // Now insert the LyX specific LaTeX commands...
        docstring lyxpreamble;
        features.resolveAlternatives();
+       features.expandMultiples();
 
        if (output_sync) {
                if (!output_sync_macro.empty())
@@ -2407,13 +2408,17 @@ vector<string> BufferParams::backends() const
 
        // FIXME: Don't hardcode format names here, but use a flag
        if (buffmt == "latex") {
-               if (!useNonTeXFonts) {
-                       v.push_back("pdflatex");
-                       v.push_back("latex");
+               if (encoding().package() == Encoding::japanese)
+                       v.push_back("platex");
+               else {
+                       if (!useNonTeXFonts) {
+                               v.push_back("pdflatex");
+                               v.push_back("latex");
+                       }
+                       v.push_back("xetex");
+                       v.push_back("luatex");
+                       v.push_back("dviluatex");
                }
-               v.push_back("xetex");
-               v.push_back("luatex");
-               v.push_back("dviluatex");
        } else
                v.push_back(buffmt);