X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathDots.cpp;h=63c54c950e03d96603eac45bbe4f8caca1af9b77;hb=a11780b59fcb6cdd16b15f9fa4de45d7ddfd1b2a;hp=f8e8e2397d9ce8f2723525eddeffdc74b0429399;hpb=718eede94bd57b51f6f60cda4c05a68da3dd0d66;p=features.git diff --git a/src/mathed/InsetMathDots.cpp b/src/mathed/InsetMathDots.cpp index f8e8e2397d..63c54c950e 100644 --- a/src/mathed/InsetMathDots.cpp +++ b/src/mathed/InsetMathDots.cpp @@ -38,18 +38,13 @@ Inset * InsetMathDots::clone() const void InsetMathDots::metrics(MetricsInfo & mi, Dimension & dim) const { - dim = theFontMetrics(mi.base.font).dimension('M'); + dim = theFontMetrics(mi.base.font).dimension('X'); dh_ = 0; if (key_->name == "cdots" || key_->name == "dotsb" || key_->name == "dotsm" || key_->name == "dotsi") dh_ = dim.asc / 2; - else if (key_->name == "dotsc") - dh_ = dim.asc / 4; - else if (key_->name == "vdots") { - dim.wid = (dim.wid / 2) + 1; - dh_ = dim.asc; - } - else if (key_->name == "ddots" || key_->name == "adots" || key_->name == "iddots") + else if (key_->name == "ddots" || key_->name == "adots" + || key_->name == "iddots" || key_->name == "vdots") dh_ = dim.asc; } @@ -59,16 +54,10 @@ void InsetMathDots::draw(PainterInfo & pi, int x, int y) const Dimension const dim = dimension(*pi.base.bv); if (key_->name == "adots" || key_->name == "iddots") --y; - mathed_draw_deco(pi, x + 2, y - dh_, dim.width() - 2, dim.ascent(), + else if (key_->name == "vdots") + x += (dim.width() - 2) / 2; + mathed_draw_deco(pi, x + 1, y - dh_, dim.width() - 2, dim.ascent(), key_->name); - if (key_->name == "vdots" || key_->name == "ddots" || key_->name == "adots" || key_->name == "iddots") - ++x; - if (key_->name == "adots" || key_->name == "iddots") - ++y; - else if (key_->name != "vdots") - --y; - mathed_draw_deco(pi, x + 2, y - dh_, dim.width() - 2, dim.ascent(), - key_->name); } @@ -85,7 +74,7 @@ void InsetMathDots::validate(LaTeXFeatures & features) const } -void InsetMathDots::mathmlize(MathStream & ms) const +void InsetMathDots::mathmlize(MathMLStream & ms) const { // which symbols we support is decided by what is listed in // lib/symbols as generating a dots inset @@ -116,7 +105,7 @@ void InsetMathDots::mathmlize(MathStream & ms) const ent = "⋮"; else LASSERT(false, ent = "…"); } - ms << MTag("mi") << from_ascii(ent) << ETag("mi"); + ms << MTagInline("mi") << from_ascii(ent) << ETagInline("mi"); }