X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FMathSupport.cpp;h=6a815ed8985e6b81605b4f201c6ecfffb865fab0;hb=d243e53f54e861c90ce7135f3d1a8d68d6202555;hp=82de873e24934300898050cf75d95a0f12f1130d;hpb=63772964923f765e4ab975946215725086a9c838;p=lyx.git diff --git a/src/mathed/MathSupport.cpp b/src/mathed/MathSupport.cpp index 82de873e24..6a815ed898 100644 --- a/src/mathed/MathSupport.cpp +++ b/src/mathed/MathSupport.cpp @@ -13,7 +13,8 @@ #include "MathSupport.h" -#include "InsetMath.h" +#include "InsetMathFont.h" +#include "InsetMathSymbol.h" #include "MathData.h" #include "MathParser.h" #include "MathStream.h" @@ -160,6 +161,15 @@ double const brack[] = { }; +double const dbrack[] = { + 2, 4, + 0.95, 0.05, 0.05, 0.05, 0.05, 0.95, 0.95, 0.95, + 2, 2, + 0.50, 0.05, 0.50, 0.95, + 0 +}; + + double const corner[] = { 2, 3, 0.95, 0.05, 0.05, 0.05, 0.05, 0.95, @@ -299,6 +309,8 @@ named_deco_struct deco_table[] = { {"rbrace", brace, 2 }, {"[", brack, 0 }, {"]", brack, 2 }, + {"llbracket", dbrack, 0 }, + {"rrbracket", dbrack, 2 }, {"|", vert, 0 }, {"/", slash, 0 }, {"slash", slash, 0 }, @@ -574,6 +586,8 @@ fontinfo fontinfos[] = { inh_shape, Color_math}, {"msb", MSB_FAMILY, inh_series, inh_shape, Color_math}, + {"stmry", STMARY_FAMILY, inh_series, + inh_shape, Color_math}, {"wasy", WASY_FAMILY, inh_series, inh_shape, Color_math}, {"esint", ESINT_FAMILY, inh_series, @@ -723,6 +737,27 @@ void augmentFont(FontInfo & font, docstring const & name) } +bool isAlphaSymbol(MathAtom const & at) +{ + if (at->asCharInset() || + (at->asSymbolInset() && + at->asSymbolInset()->isOrdAlpha())) + return true; + + if (at->asFontInset()) { + MathData const & ar = at->asFontInset()->cell(0); + for (size_t i = 0; i < ar.size(); ++i) { + if (!(ar[i]->asCharInset() || + (ar[i]->asSymbolInset() && + ar[i]->asSymbolInset()->isOrdAlpha()))) + return false; + } + return true; + } + return false; +} + + docstring asString(MathData const & ar) { odocstringstream os;