mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
HTML for dots.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33958 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8d51923b8b
commit
caf170d612
@ -93,14 +93,12 @@ void InsetMathDots::mathmlize(MathStream & os) const
|
|||||||
std::string ent;
|
std::string ent;
|
||||||
if (n == "dots" || n == "dotsc" || n == "dotso" || n == "ldots")
|
if (n == "dots" || n == "dotsc" || n == "dotso" || n == "ldots")
|
||||||
ent = "…";
|
ent = "…";
|
||||||
else if (n == "adots")
|
else if (n == "adots" || n == "iddots")
|
||||||
ent = "⋰";
|
ent = "⋰";
|
||||||
else if (n == "cdots" || n == "dotsb" || n == "dotsi" || n == "dotsm")
|
else if (n == "cdots" || n == "dotsb" || n == "dotsi" || n == "dotsm")
|
||||||
ent = "⋯";
|
ent = "⋯";
|
||||||
else if (n == "ddots")
|
else if (n == "ddots")
|
||||||
ent = "⋱";
|
ent = "⋱";
|
||||||
else if (n == "iddots")
|
|
||||||
ent = "⋰";
|
|
||||||
else if (n == "vdots")
|
else if (n == "vdots")
|
||||||
ent = "⋮";
|
ent = "⋮";
|
||||||
else
|
else
|
||||||
@ -108,4 +106,26 @@ void InsetMathDots::mathmlize(MathStream & os) const
|
|||||||
os << MTag("mi") << from_ascii(ent) << ETag("mi");
|
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
|
} // namespace lyx
|
||||||
|
@ -36,6 +36,8 @@ public:
|
|||||||
InsetCode lyxCode() const { return MATH_DOTS_CODE; }
|
InsetCode lyxCode() const { return MATH_DOTS_CODE; }
|
||||||
///
|
///
|
||||||
void mathmlize(MathStream & os) const;
|
void mathmlize(MathStream & os) const;
|
||||||
|
///
|
||||||
|
void htmlize(HtmlStream & os) const;
|
||||||
protected:
|
protected:
|
||||||
/// cache for the thing's height
|
/// cache for the thing's height
|
||||||
mutable int dh_;
|
mutable int dh_;
|
||||||
|
Loading…
Reference in New Issue
Block a user