]> git.lyx.org Git - lyx.git/blobdiff - src/BufferParams.cpp
ctests: samples for lib/unicodesymbols: only test export to 8-bit LaTeX.
[lyx.git] / src / BufferParams.cpp
index d2218e073db8bab912634fb4eddc83013c6c5407..caa2dcb4f422b68392fa7aef46f80bd129a6eaa5 100644 (file)
@@ -38,6 +38,7 @@
 #include "LyXRC.h"
 #include "OutputParams.h"
 #include "Spacing.h"
+#include "texstream.h"
 #include "TexRow.h"
 #include "VSpace.h"
 #include "PDFOptions.h"
@@ -2130,6 +2131,7 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features,
 
        // xunicode needs to be loaded at least after amsmath, amssymb,
        // esint and the other packages that provide special glyphs
+       // The package only supports XeTeX currently.
        if (features.runparams().flavor == OutputParams::XETEX
            && useNonTeXFonts)
                lyxpreamble += "\\usepackage{xunicode}\n";
@@ -2348,14 +2350,7 @@ bool BufferParams::addLayoutModule(string const & modName)
 
 string BufferParams::bufferFormat() const
 {
-       string format = documentClass().outputFormat();
-       if (format == "latex") {
-               if (useNonTeXFonts)
-                       return "xetex"; // actually "xetex or luatex"
-               if (encoding().package() == Encoding::japanese)
-                       return "platex";
-       }
-       return format;
+       return documentClass().outputFormat();
 }
 
 
@@ -2412,17 +2407,14 @@ 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");
-               }
-               v.push_back("luatex");
-               v.push_back("dviluatex");
-               v.push_back("xetex");
-       } else if (buffmt == "xetex") {
-               v.push_back("xetex");
-               // FIXME: need to test all languages (bug 8205)
-               if (!language || !language->isPolyglossiaExclusive()) {
+               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");
                }