#include "math_parser.h"
#include "Painter.h"
#include "debug.h"
+#include "commandtags.h"
using std::map;
using std::endl;
if (!font_available_initialized[type]) {
font_available_initialized[type] = true;
font_available[type] = fontloader.available(whichFontBaseIntern(type));
+ if (!font_available[type])
+ lyxerr[Debug::FONT] << "Math font " << type << " not available.\n";
}
return font_available[type];
}
};
-double const hline2[] = {
- 1, 0.1, 0.5, 0.3, 0.5,
- 1, 0.7, 0.5, 0.9, 0.5,
+double const ddot[] = {
+ 1, 0.2, 0.5, 0.3, 0.5,
+ 1, 0.7, 0.5, 0.8, 0.5,
+ 0
+};
+
+
+double const dddot[] = {
+ 1, 0.1, 0.5, 0.2, 0.5,
+ 1, 0.45, 0.5, 0.55, 0.5,
+ 1, 0.8, 0.5, 0.9, 0.5,
0
};
{"overbrace", brace, 3 },
{"overleftarrow", arrow, 1 },
{"overrightarrow", arrow, 3 },
-
+ {"xleftarrow", arrow, 1 },
+ {"xrightarrow", arrow, 3 },
+ {"underleftarrow", arrow, 1 },
+ {"underrightarrow", arrow, 3 },
+
// Delimiters
{"(", parenth, 0 },
{")", parenth, 2 },
{"Updownarrow", Udarrow, 0 },
// Accents
- {"ddot", hline2, 0 },
+ {"ddot", ddot, 0 },
+ {"dddot", dddot, 0 },
{"hat", angle, 3 },
{"grave", slash, 1 },
{"acute", slash, 0 },
};
-char const * latex_mathstyle[] = {
- "textstyle", "displaystyle", "scriptstyle", "scriptscriptstyle"
-};
-
-char const * latex_mathfontcmds[] = {
- "font-bold", "font-emph", "font-roman", "font-code", "font-sans",
- "font-ital", "font-noun", "font-frak", "font-free", "font-default"
-};
-
char const * math_font_name(MathTextCodes code)
{
return theFontNames[code - LM_TC_RM];
return 0;
}
+
+string convertDelimToLatexName(string const & name)
+{
+ if (name == "(")
+ return name;
+ if (name == "[")
+ return name;
+ if (name == ".")
+ return name;
+ if (name == ")")
+ return name;
+ if (name == "]")
+ return name;
+ if (name == "/")
+ return name;
+ if (name == "|")
+ return name;
+ return "\\" + name + " ";
+}
+
+