]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathHull.C
hopefully fix tex2lyx linking.
[lyx.git] / src / mathed / InsetMathHull.C
index d57620f534a92e8eca909d27fa90c32011d93fbb..8ee9abe9aebc371be7c449ac3cae093edfa2d101 100644 (file)
@@ -1053,7 +1053,7 @@ void InsetMathHull::doDispatch(LCursor & cur, FuncRequest & cmd)
                if (type_ == hullSimple || type_ == hullEquation) {
                        recordUndoInset(cur);
                        bool const align =
-                               cur.bv().buffer()->params().use_amsmath == BufferParams::AMS_ON;
+                               cur.bv().buffer()->params().use_amsmath == BufferParams::package_on;
                        mutate(align ? hullAlign : hullEqnArray);
                        cur.idx() = 0;
                        cur.pos() = cur.lastpos();
@@ -1122,7 +1122,7 @@ void InsetMathHull::doDispatch(LCursor & cur, FuncRequest & cmd)
                                numbered(r, true);
                        docstring old = label(r);
                        if (str != old) {
-                               cur.bv().buffer()->changeRefsIfUnique(to_utf8(old), to_utf8(str),
+                               cur.bv().buffer()->changeRefsIfUnique(old, str,
                                                        InsetBase::REF_CODE);
                                label(r, str);
                        }
@@ -1462,7 +1462,7 @@ int InsetMathHull::docbook(Buffer const & buf, odocstream & os,
 
        docstring bname = name;
        if (!label(0).empty())
-               bname += from_ascii(" id='" + sgml::cleanID(buf, runparams, to_utf8(label(0))) + "'");
+               bname += " id='" + sgml::cleanID(buf, runparams, label(0)) + "'";
        ms << MTag(bname);
 
        odocstringstream ls;
@@ -1476,6 +1476,8 @@ int InsetMathHull::docbook(Buffer const & buf, odocstream & os,
                ms << from_utf8(subst(subst(to_utf8(ls.str()), "&", "&amp;"), "<", "&lt;"));
                ms << ETag(from_ascii("alt"));
                ms << MTag(from_ascii("math"));
+               ms << ETag(from_ascii("alt"));
+               ms << MTag(from_ascii("math"));
                InsetMathGrid::mathmlize(ms);
                ms << ETag(from_ascii("math"));
        } else {
@@ -1487,9 +1489,9 @@ int InsetMathHull::docbook(Buffer const & buf, odocstream & os,
 
        ms << from_ascii("<graphic fileref=\"eqn/");
        if (!label(0).empty())
-               ms << from_utf8(sgml::cleanID(buf, runparams, to_utf8(label(0))));
+               ms << sgml::cleanID(buf, runparams, label(0));
        else
-               ms << from_utf8(sgml::uniqueID("anon"));
+               ms << sgml::uniqueID(from_ascii("anon"));
 
        if (runparams.flavor == OutputParams::XML)
                ms << from_ascii("\"/>");