Initialize math_flavor, and introduce an isLaTeX() flavor check.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33968 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-03-31 18:57:20 +00:00
parent a0043da05f
commit b5d2302180
2 changed files with 10 additions and 2 deletions

View File

@ -19,8 +19,8 @@ namespace lyx {
OutputParams::OutputParams(Encoding const * enc) OutputParams::OutputParams(Encoding const * enc)
: flavor(LATEX), nice(false), moving_arg(false), inulemcmd(false), : flavor(LATEX), math_flavor(NotApplicable), nice(false), moving_arg(false),
local_font(0), master_language(0), encoding(enc), inulemcmd(false), local_font(0), master_language(0), encoding(enc),
free_spacing(false), use_babel(false), free_spacing(false), use_babel(false),
use_indices(false), use_japanese(false), linelen(0), depth(0), use_indices(false), use_japanese(false), linelen(0), depth(0),
exportdata(new ExportData), exportdata(new ExportData),
@ -43,4 +43,9 @@ OutputParams::~OutputParams()
{} {}
bool OutputParams::isLaTeX() const
{
return flavor == LATEX || flavor == PDFLATEX || flavor == XETEX;
}
} // namespace lyx } // namespace lyx

View File

@ -39,6 +39,7 @@ public:
}; };
enum MathFlavor { enum MathFlavor {
NotApplicable,
MathAsMathML, MathAsMathML,
MathAsHTML, MathAsHTML,
MathAsImages, MathAsImages,
@ -64,6 +65,8 @@ public:
compile the file. compile the file.
*/ */
FLAVOR flavor; FLAVOR flavor;
/// is it some flavor of LaTeX?
bool isLaTeX() const;
/// Same, but for math output, which only matter is XHTML output. /// Same, but for math output, which only matter is XHTML output.
MathFlavor math_flavor; MathFlavor math_flavor;