mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-21 07:12:10 +00:00
crude support for a few more AMS constructs
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4280 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9af069e928
commit
6a0b1fe001
@ -26,22 +26,26 @@ void MathDotsInset::metrics(MathMetricsInfo const & mi) const
|
|||||||
LyXFont font;
|
LyXFont font;
|
||||||
whichFont(font, LM_TC_VAR, mi);
|
whichFont(font, LM_TC_VAR, mi);
|
||||||
mathed_char_dim(font, 'M', ascent_, descent_, width_);
|
mathed_char_dim(font, 'M', ascent_, descent_, width_);
|
||||||
switch (name_[0]) {
|
if (name_ == "ldots" || name_ == "dotsm")
|
||||||
case 'l': dh_ = 0; break;
|
dh_ = 0;
|
||||||
case 'c': dh_ = ascent_ / 2; break;
|
else if (name_ == "cdots" || name_ == "dotsb"
|
||||||
case 'v': width_ /= 2;
|
|| name_ == "dotsm" || name_ == "dotsi")
|
||||||
case 'd': dh_ = ascent_; break;
|
dh_ = ascent_ / 2;
|
||||||
}
|
else if (name_ == "dotsc")
|
||||||
|
dh_ = ascent_ / 4;
|
||||||
|
else if (name_ == "vdots")
|
||||||
|
width_ /= 2;
|
||||||
|
else if (name_ == "ddots")
|
||||||
|
dh_ = ascent_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathDotsInset::draw(Painter & pain, int x, int y) const
|
void MathDotsInset::draw(Painter & pain, int x, int y) const
|
||||||
{
|
{
|
||||||
mathed_draw_deco(pain, x + 2, y - dh_, width_ - 2, ascent_, name_);
|
mathed_draw_deco(pain, x + 2, y - dh_, width_ - 2, ascent_, name_);
|
||||||
char const c = name_[0];
|
if (name_ == "vdots" || name_ == "ddots")
|
||||||
if (c == 'v' || c == 'd')
|
|
||||||
++x;
|
++x;
|
||||||
if (c != 'v')
|
if (name_ != "vdots")
|
||||||
--y;
|
--y;
|
||||||
mathed_draw_deco(pain, x + 2, y - dh_, width_ - 2, ascent_, name_);
|
mathed_draw_deco(pain, x + 2, y - dh_, width_ - 2, ascent_, name_);
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,11 @@ key_type wordlist_array[] =
|
|||||||
{"ddot", LM_TK_DECORATION, 0},
|
{"ddot", LM_TK_DECORATION, 0},
|
||||||
{"dddot", LM_TK_DECORATION, 0},
|
{"dddot", LM_TK_DECORATION, 0},
|
||||||
{"ddots", LM_TK_DOTS, 0},
|
{"ddots", LM_TK_DOTS, 0},
|
||||||
|
{"dotsb", LM_TK_DOTS, 0},
|
||||||
|
{"dotsc", LM_TK_DOTS, 0},
|
||||||
|
{"dotsi", LM_TK_DOTS, 0},
|
||||||
|
{"dotsm", LM_TK_DOTS, 0},
|
||||||
|
{"dotso", LM_TK_DOTS, 0},
|
||||||
{"deg", LM_TK_FUNC, 0},
|
{"deg", LM_TK_FUNC, 0},
|
||||||
{"det", LM_TK_FUNCLIM, 0},
|
{"det", LM_TK_FUNCLIM, 0},
|
||||||
{"dim", LM_TK_FUNC, 0},
|
{"dim", LM_TK_FUNC, 0},
|
||||||
|
@ -524,7 +524,12 @@ named_deco_struct deco_table[] = {
|
|||||||
{"ldots", hline3, 0 },
|
{"ldots", hline3, 0 },
|
||||||
{"cdots", hline3, 0 },
|
{"cdots", hline3, 0 },
|
||||||
{"vdots", hline3, 1 },
|
{"vdots", hline3, 1 },
|
||||||
{"ddots", dline3, 0 }
|
{"ddots", dline3, 0 },
|
||||||
|
{"dotsb", hline3, 0 },
|
||||||
|
{"dotsc", hline3, 0 },
|
||||||
|
{"dotsi", hline3, 0 },
|
||||||
|
{"dotsm", hline3, 0 },
|
||||||
|
{"dotso", hline3, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user