From caf170d61206620eb0302f9809340746d642dec3 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Tue, 30 Mar 2010 22:14:00 +0000 Subject: [PATCH] HTML for dots. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33958 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathDots.cpp | 26 +++++++++++++++++++++++--- src/mathed/InsetMathDots.h | 2 ++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/mathed/InsetMathDots.cpp b/src/mathed/InsetMathDots.cpp index 8ca2a1e469..147e7627e4 100644 --- a/src/mathed/InsetMathDots.cpp +++ b/src/mathed/InsetMathDots.cpp @@ -93,14 +93,12 @@ void InsetMathDots::mathmlize(MathStream & os) const std::string ent; if (n == "dots" || n == "dotsc" || n == "dotso" || n == "ldots") ent = "…"; - else if (n == "adots") + else if (n == "adots" || n == "iddots") ent = "⋰"; else if (n == "cdots" || n == "dotsb" || n == "dotsi" || n == "dotsm") ent = "⋯"; else if (n == "ddots") ent = "⋱"; - else if (n == "iddots") - ent = "⋰"; else if (n == "vdots") ent = "⋮"; 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 = "…"; + else if (n == "adots" || n == "iddots") + ent = "⋰"; + else if (n == "cdots" || n == "dotsb" || n == "dotsi" || n == "dotsm") + ent = "⋯"; + else if (n == "ddots") + ent = "⋱"; + else if (n == "vdots") + ent = "⋮"; + else + LASSERT(false, ent = "#x02026;"); + os << from_ascii(ent); +} + } // namespace lyx diff --git a/src/mathed/InsetMathDots.h b/src/mathed/InsetMathDots.h index 4f2428712c..8a84a22219 100644 --- a/src/mathed/InsetMathDots.h +++ b/src/mathed/InsetMathDots.h @@ -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_; -- 2.39.2