mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
honor \displaystyle etc on screen
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4684 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9a4842fc84
commit
1a696271da
@ -94,19 +94,13 @@ MathHullInset::MathHullInset(string const & type)
|
||||
setDefaults();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
MathHullInset::MathHullInset(string const & type, MathGridInset const & grid)
|
||||
: MathGridInset(grid), type_(type), nonum_(1), label_(1)
|
||||
{
|
||||
setDefaults();
|
||||
}
|
||||
|
||||
|
||||
MathHullInset::MathHullInset(string const & type, col_type cols)
|
||||
: MathGridInset(cols, 1), type_(type), nonum_(1), label_(1)
|
||||
{
|
||||
setDefaults();
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
MathInset * MathHullInset::clone() const
|
||||
@ -354,11 +348,11 @@ void MathHullInset::header_write(WriteStream & os) const
|
||||
|
||||
else if (type_ == "alignat" || type_ == "xalignat")
|
||||
os << "\\begin{" << type_ << star(n) << "}"
|
||||
<< "{" << static_cast<unsigned int>(ncols()/2) << "}\n";
|
||||
<< "{" << static_cast<unsigned int>((ncols() + 1)/2) << "}\n";
|
||||
|
||||
else if (type_ == "xxalignat")
|
||||
os << "\\begin{" << type_ << "}"
|
||||
<< "{" << static_cast<unsigned int>(ncols()/2) << "}\n";
|
||||
<< "{" << static_cast<unsigned int>((ncols() + 1)/2) << "}\n";
|
||||
|
||||
else if (type_ == "multline" || type_ == "gather")
|
||||
os << "\\begin{" << type_ << "}\n";
|
||||
@ -427,19 +421,15 @@ void MathHullInset::addFancyCol(col_type col)
|
||||
addFancyCol(col);
|
||||
}
|
||||
|
||||
else if (type_ == "alignat" || type_ == "xalignat" || type_ == "xxalignat") {
|
||||
else if (type_ == "alignat" || type_ == "xalignat" || type_ == "xxalignat")
|
||||
MathGridInset::addCol(col);
|
||||
MathGridInset::addCol(col + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MathHullInset::delFancyCol(col_type col)
|
||||
{
|
||||
if (type_ == "alignat" || type_ == "xalignat" || type_ == "xxalignat") {
|
||||
MathGridInset::delCol(col + 1);
|
||||
if (type_ == "alignat" || type_ == "xalignat" || type_ == "xxalignat")
|
||||
MathGridInset::delCol(col);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -23,8 +23,6 @@ public:
|
||||
///
|
||||
MathHullInset(string const & type, MathGridInset const & grid);
|
||||
///
|
||||
MathHullInset(string const & type, col_type cols);
|
||||
///
|
||||
MathInset * clone() const;
|
||||
///
|
||||
void metrics(MathMetricsInfo & mi) const;
|
||||
|
@ -11,9 +11,10 @@
|
||||
#include "math_support.h"
|
||||
#include "support/LOstream.h"
|
||||
|
||||
using std::atoi;
|
||||
|
||||
MathSizeInset::MathSizeInset(latexkeys const * l)
|
||||
: MathNestInset(1), key_(l)
|
||||
: MathNestInset(1), key_(l), style_(MathStyles(atoi(l->extra.c_str())))
|
||||
{}
|
||||
|
||||
|
||||
@ -25,7 +26,7 @@ MathInset * MathSizeInset::clone() const
|
||||
|
||||
void MathSizeInset::metrics(MathMetricsInfo & mi) const
|
||||
{
|
||||
//MathStyleChanger dummy(mi.base, MathStyles(key_->id));
|
||||
MathStyleChanger dummy(mi.base, style_);
|
||||
dim_ = xcell(0).metrics(mi);
|
||||
metricsMarkers2();
|
||||
}
|
||||
@ -33,7 +34,7 @@ void MathSizeInset::metrics(MathMetricsInfo & mi) const
|
||||
|
||||
void MathSizeInset::draw(MathPainterInfo & pi, int x, int y) const
|
||||
{
|
||||
//MathStyleChanger dummy(pi.base, MathStyles(key_->id));
|
||||
MathStyleChanger dummy(pi.base, style_);
|
||||
xcell(0).draw(pi, x + 1, y);
|
||||
drawMarkers2(pi, x, y);
|
||||
}
|
||||
|
@ -37,6 +37,8 @@ public:
|
||||
private:
|
||||
///
|
||||
latexkeys const * key_;
|
||||
///
|
||||
MathStyles const style_;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user