beginning of a cell
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3018
a592a061-630c-0410-9148-
cb99ea01b6c8
-int MathCursor::cellXOffset() const
-{
- return par()->cellXOffset(idx());
-}
-
-
-int MathCursor::cellYOffset() const
-{
- return par()->cellYOffset(idx());
-}
-
-
-void MathCursor::gotoX(int x)
-{
- pos() = xarray().x2pos(x - cellXOffset());
-}
-
-
bool MathCursor::goUp()
{
// first ask the inset if it knows better then we
bool MathCursor::goUp()
{
// first ask the inset if it knows better then we
pos_type & pos();
/// write access to cursor cell index
idx_type & idx();
pos_type & pos();
/// write access to cursor cell index
idx_type & idx();
- /// x-offset of current cell relative to par xo
- int cellXOffset() const;
- /// y-offset of current cell relative to par yo
- int cellYOffset() const;
- /// adjust position in current cell according to x. idx is not changed.
- void gotoX(int x);
///
InsetFormulaBase * const formula_;
///
InsetFormulaBase * const formula_;
MathArray ar = dat;
extractStrings(ar);
for (MathArray::const_iterator it = ar.begin(); it != ar.end(); ++it) {
MathArray ar = dat;
extractStrings(ar);
for (MathArray::const_iterator it = ar.begin(); it != ar.end(); ++it) {
+ wi.firstitem = (it == ar.begin());
MathInset const * p = it->nucleus();
if (it + 1 != ar.end()) {
if (MathScriptInset const * q = asScript(it)) {
MathInset const * p = it->nucleus();
if (it + 1 != ar.end()) {
if (MathScriptInset const * q = asScript(it)) {
std::ostream & os;
///
bool fragile;
std::ostream & os;
///
bool fragile;
+ /// are we at the beginning of an MathArray?
+ bool firstitem;
if (limits_ == 1)
os << "\\limits ";
}
if (limits_ == 1)
os << "\\limits ";
}
+ } else
+ if (os.firstitem)
+ lyxerr << "suppressing {} \n";
+ else
+ os << "{}";
if (hasDown() && down().data_.size())
os << "_{" << down().data_ << '}';
if (hasDown() && down().data_.size())
os << "_{" << down().data_ << '}';
///
void ensure(bool up);
///
void ensure(bool up);
+ /// suppresses empty braces if necessary
void write(MathInset const * nuc, WriteStream & os) const;
///
void normalize(MathInset const * nuc, NormalStream & os) const;
void write(MathInset const * nuc, WriteStream & os) const;
///
void normalize(MathInset const * nuc, NormalStream & os) const;