mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +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;
|
||||
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
|
||||
|
@ -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_;
|
||||
|
Loading…
Reference in New Issue
Block a user