X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FMathFactory.cpp;h=00e90f7785f3f2a289655a4aa3b84e2c9e0082eb;hb=988f372843941436021a45c5d8848c514f23887c;hp=20af5fc592af4fe7327feeaccd70369ddc30cb4a;hpb=967c30e35442fede0bd127e08e49a57acc1c0611;p=lyx.git diff --git a/src/mathed/MathFactory.cpp b/src/mathed/MathFactory.cpp index 20af5fc592..00e90f7785 100644 --- a/src/mathed/MathFactory.cpp +++ b/src/mathed/MathFactory.cpp @@ -260,7 +260,7 @@ MathAtom createInsetMath(char const * const s) MathAtom createInsetMath(docstring const & s) { - //lyxerr << "creating inset with name: '" << s << '\'' << endl; + //lyxerr << "creating inset with name: '" << to_utf8(s) << '\'' << endl; latexkeys const * l = in_word_set(s); if (l) { docstring const & inset = l->inset; @@ -372,6 +372,13 @@ MathAtom createInsetMath(docstring const & s) return MathAtom(new InsetMathFrac(InsetMathFrac::NICEFRAC)); if (s == "unitfrac") return MathAtom(new InsetMathFrac(InsetMathFrac::UNITFRAC)); + // This string value is only for math toolbar use. Not a LaTeX name + if (s == "unitfracthree") + return MathAtom(new InsetMathFrac(InsetMathFrac::UNITFRAC, 3)); + if (s == "unitone") + return MathAtom(new InsetMathFrac(InsetMathFrac::UNIT, 1)); + if (s == "unittwo") + return MathAtom(new InsetMathFrac(InsetMathFrac::UNIT)); //if (s == "infer") // return MathAtom(new MathInferInset); if (s == "atop")