From: Richard Heck Date: Fri, 9 Mar 2012 22:24:17 +0000 (+0000) Subject: Change the backends() routine so it only gives us backends that X-Git-Tag: 2.1.0beta1~1967 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=02f28635d316b1f5061329e02273838b16a76fe2;p=features.git Change the backends() routine so it only gives us backends that are appropriate for the current document. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40899 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 2c97acef6b..81a13bdb2b 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -2133,17 +2133,24 @@ bool BufferParams::isExportableFormat(string const & format) const vector BufferParams::backends() const { vector v; - v.push_back(bufferFormat()); + string const buffmt = bufferFormat(); + // FIXME: Don't hardcode format names here, but use a flag - if (v.back() == "latex") { - v.push_back("pdflatex"); + 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 (v.back() == "xetex") { + } else if (buffmt == "xetex") { + v.push_back("xetex"); v.push_back("luatex"); v.push_back("dviluatex"); - } + } else + v.push_back(buffmt); + v.push_back("xhtml"); v.push_back("text"); v.push_back("lyx"); diff --git a/src/BufferParams.h b/src/BufferParams.h index 7280506a09..772f42de84 100644 --- a/src/BufferParams.h +++ b/src/BufferParams.h @@ -176,7 +176,8 @@ public: std::vector exportableFormats(bool only_viewable) const; /// bool isExportableFormat(std::string const & format) const; - /// + /// the backends appropriate for use with this document. + /// so, e.g., latex is excluded , if we're using non-TeX fonts std::vector backends() const; /// List of included children (for includeonly)