]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_support.C
inactive new stuff to re-sync my tree before going on holyday
[lyx.git] / src / mathed / math_support.C
index 59daa5128653c05876345cd637219600d2309dc3..b19eeab53a14799344383825d634ff516a9218ac 100644 (file)
@@ -12,6 +12,7 @@
 #include "math_parser.h"
 #include "Painter.h"
 #include "debug.h"
+#include "commandtags.h"
 
 using std::map;
 using std::endl;
@@ -268,6 +269,8 @@ bool math_font_available(MathTextCodes type)
        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];
 }
@@ -391,9 +394,17 @@ double const hline[] = {
 };
 
 
-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
 };
 
@@ -462,7 +473,11 @@ named_deco_struct deco_table[] = {
        {"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 },
@@ -489,7 +504,8 @@ named_deco_struct deco_table[] = {
        {"Updownarrow",    Udarrow,    0 },     
        
        // Accents
-       {"ddot",           hline2,     0 },
+       {"ddot",           ddot,       0 },
+       {"dddot",          dddot,      0 },
        {"hat",            angle,      3 },
        {"grave",          slash,      1 },
        {"acute",          slash,      0 },
@@ -777,15 +793,6 @@ char const * latex_mathspace[] = {
 };
 
 
-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)
 {
@@ -805,3 +812,24 @@ 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 + " ";
+}
+
+