#include <config.h>
#include "MathFactory.h"
-#include "MathParser.h"
-#include "InsetMathArray.h"
+
#include "InsetMathAMSArray.h"
+#include "InsetMathArray.h"
#include "InsetMathBinom.h"
-#include "InsetMathBox.h"
-#include "InsetMathBoxed.h"
#include "InsetMathBoldSymbol.h"
+#include "InsetMathBoxed.h"
+#include "InsetMathBox.h"
#include "InsetMathCases.h"
#include "InsetMathColor.h"
#include "InsetMathDecoration.h"
#include "InsetMathDFrac.h"
#include "InsetMathDots.h"
#include "InsetMathFBox.h"
-#include "InsetMathFrameBox.h"
#include "InsetMathFont.h"
#include "InsetMathFontOld.h"
#include "InsetMathFrac.h"
+#include "InsetMathFrameBox.h"
#include "InsetMathKern.h"
#include "InsetMathLefteqn.h"
#include "InsetMathMacro.h"
-#include "MathMacroArgument.h"
-#include "MathMacroTable.h"
-#include "MathMacroTemplate.h"
#include "InsetMathMakebox.h"
#include "InsetMathOverset.h"
-#include "MathParser.h"
#include "InsetMathPhantom.h"
+#include "InsetMathRef.h"
#include "InsetMathRoot.h"
#include "InsetMathSize.h"
#include "InsetMathSpace.h"
#include "InsetMathUnknown.h"
#include "InsetMathXArrow.h"
#include "InsetMathXYMatrix.h"
-
-//#include "insets/insetref.h"
-#include "InsetMathRef.h"
+#include "MathMacroArgument.h"
+#include "MathMacroTable.h"
+#include "MathMacroTemplate.h"
+#include "MathParser.h"
+#include "MathSupport.h"
#include "debug.h"
-#include "MathSupport.h"
#include "support/filetools.h" // LibFileSearch
#include "support/lstrings.h"
-#include "frontends/lyx_gui.h"
+#include "frontends/FontLoader.h"
#include <fstream>
#include <sstream>
bool has_math_fonts;
+namespace lyx {
+extern bool use_gui;
+}
namespace {
bool math_font_available(string & name)
{
+ if (!lyx::use_gui)
+ return false;
+
LyXFont f;
augmentFont(f, name);
// Do we have the font proper?
- if (lyx_gui::font_available(f))
+ if (theFontLoader().available(f))
return true;
// can we fake it?
return MathAtom(new InsetMathFontOld(l));
if (inset == "matrix")
return MathAtom(new InsetMathAMSArray(s));
+ if (inset == "split")
+ return MathAtom(new InsetMathSplit(s));
if (inset == "big")
// we can't create a InsetMathBig, since the argument
// is missing.