]> git.lyx.org Git - features.git/commitdiff
HTML for dots.
authorRichard Heck <rgheck@comcast.net>
Tue, 30 Mar 2010 22:14:00 +0000 (22:14 +0000)
committerRichard Heck <rgheck@comcast.net>
Tue, 30 Mar 2010 22:14:00 +0000 (22:14 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33958 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathDots.cpp
src/mathed/InsetMathDots.h

index 8ca2a1e46981c9ed5f4a40f95803b143434360ca..147e7627e48e9fc7791bb9cf66ad8470ab93c69b 100644 (file)
@@ -93,14 +93,12 @@ void InsetMathDots::mathmlize(MathStream & os) const
        std::string ent;
        if (n == "dots" || n == "dotsc" || n == "dotso" || n == "ldots")
                ent = "&hellip;";
-       else if (n == "adots")
+       else if (n == "adots" || n == "iddots")
                ent = "&utdot;";
        else if (n == "cdots" || n == "dotsb" || n == "dotsi" || n == "dotsm")
                ent = "&ctdot;";
        else if (n == "ddots")
                ent = "&dtdot;";
-       else if (n == "iddots")
-               ent = "&utdot;";
        else if (n == "vdots")
                ent = "&vellip;";
        else
@@ -108,4 +106,26 @@ void InsetMathDots::mathmlize(MathStream & os) const
        os << MTag("mi") << from_ascii(ent) << ETag("mi");
 }
 
+
+void InsetMathDots::htmlize(HtmlStream & os) const
+{
+       // which symbols we support is decided by what is listed in
+       // lib/symbols as generating a dots inset
+       docstring const & n = key_->name;
+       std::string ent;
+       if (n == "dots" || n == "dotsc" || n == "dotso" || n == "ldots")
+               ent = "&#x02026;";
+       else if (n == "adots" || n == "iddots")
+               ent = "&#x022F0;";
+       else if (n == "cdots" || n == "dotsb" || n == "dotsi" || n == "dotsm")
+               ent = "&#x022EF;";
+       else if (n == "ddots")
+               ent = "&#x022F1;";
+       else if (n == "vdots")
+               ent = "&#x022EE;";
+       else
+               LASSERT(false, ent = "#x02026;");
+       os << from_ascii(ent);
+}
+
 } // namespace lyx
index 4f2428712cfc2ae60838d14fa1eb68f288be2d81..8a84a22219076e7ab8af84d11d296683bdba1e67 100644 (file)
@@ -36,6 +36,8 @@ public:
        InsetCode lyxCode() const { return MATH_DOTS_CODE; }
        ///
        void mathmlize(MathStream & os) const;
+       ///
+       void htmlize(HtmlStream & os) const;
 protected:
        /// cache for the thing's height
        mutable int dh_;