}
-int MathCursor::xpos() const
-{
- return cellXOffset() + xarray().pos2x(pos());
-}
-
-
-int MathCursor::ypos() const
-{
- return cellYOffset();
-}
-
-
-
void MathCursor::gotoX(int x)
{
pos() = xarray().x2pos(x - cellXOffset());
if (s.size() >= 5 && s.substr(0, 5) == "cases") {
unsigned int n = 1;
- istringstream is(s.substr(6).c_str());
+ istringstream is(s.substr(5).c_str());
is >> n;
n = std::max(1u, n);
niceInsert(MathAtom(new MathCasesInset(n)));
unsigned int n = 1;
string v_align;
string h_align;
- istringstream is(s.substr(7).c_str());
+ istringstream is(s.substr(6).c_str());
is >> m >> n >> v_align >> h_align;
m = std::max(1u, m);
n = std::max(1u, n);
int cellXOffset() const;
/// y-offset of current cell relative to par yo
int cellYOffset() const;
- /// current x position relative to par xo
- int xpos() const;
- /// current y position relative to par yo
- int ypos() const;
/// adjust position in current cell according to x. idx is not changed.
void gotoX(int x);
{}
-void MathXArray::metrics(MathMetricsInfo const & st) const
+void MathXArray::metrics(MathMetricsInfo const & mi) const
{
- size_ = st;
- mathed_char_dim(LM_TC_VAR, st, 'I', ascent_, descent_, width_);
+ size_ = mi;
+ mathed_char_dim(LM_TC_VAR, mi, 'I', ascent_, descent_, width_);
if (data_.empty())
return;
- math_font_max_dim(LM_TC_TEXTRM, st, ascent_, descent_);
+ math_font_max_dim(LM_TC_TEXTRM, mi, ascent_, descent_);
width_ = 0;
//lyxerr << "MathXArray::metrics(): '" << data_ << "'\n";
MathInset const * p = it->nucleus();
MathScriptInset const * q = (it + 1 == end()) ? 0 : asScript(it);
if (q) {
- q->metrics(p, st);
+ q->metrics(p, mi);
ascent_ = std::max(ascent_, q->ascent(p));
descent_ = std::max(descent_, q->descent(p));
width_ += q->width(p);
++it;
} else {
- p->metrics(st);
+ p->metrics(mi);
ascent_ = std::max(ascent_, p->ascent());
descent_ = std::max(descent_, p->descent());
width_ += p->width();