+2000-10-27 Dekel Tsur <dekelts@tau.ac.il>
+
+ * src/mathed/formulamacro.h (LyxCode) Return MATHMACRO_CODE instead
+ of MATH_CODE. This fixes a bug with math-macros in RTL text.
+
+ * src/text.C (PrepareToPrint): Show math-macros block aligned.
+
2000-11-02 Juergen Vigna <jug@sad.it>
* src/insets/insettext.C (LocalDispatch): return a DISPATCHED_NOUPDATE
2000-11-02 Juergen Vigna <jug@sad.it>
* src/insets/insettext.C (LocalDispatch): return a DISPATCHED_NOUPDATE
///
THEOREM_CODE, // 30
///
///
THEOREM_CODE, // 30
///
+ CAPTION_CODE,
+ ///
+ MATHMACRO_CODE
int DocBook(Buffer const *, std::ostream &) const;
///
Inset * Clone(Buffer const &) const;
int DocBook(Buffer const *, std::ostream &) const;
///
Inset * Clone(Buffer const &) const;
+ ///
+ Inset::Code LyxCode() const { return Inset::MATHMACRO_CODE; }
/// what appears in the minibuffer when opening
string const EditMessage() const;
///
/// what appears in the minibuffer when opening
string const EditMessage() const;
///
if (greek_kb_flag_save < 2)
current_view->unlockInset(current_view->theLockingInset());
} else
if (greek_kb_flag_save < 2)
current_view->unlockInset(current_view->theLockingInset());
} else
- if (current_view->theLockingInset()->LyxCode() == Inset::MATH_CODE)
+ if (current_view->theLockingInset()->LyxCode() == Inset::MATH_CODE ||
+ current_view->theLockingInset()->LyxCode() == Inset::MATHMACRO_CODE)
static_cast<InsetFormula*>(current_view->theLockingInset())->LocalDispatch(current_view, LFUN_SELFINSERT, tmp);
else
lyxerr << "Math error: attempt to write on a wrong "
static_cast<InsetFormula*>(current_view->theLockingInset())->LocalDispatch(current_view, LFUN_SELFINSERT, tmp);
else
lyxerr << "Math error: attempt to write on a wrong "
new_inset->Edit(current_view, 0, 0, 0);
new_inset->InsertSymbol(current_view, s);
} else
new_inset->Edit(current_view, 0, 0, 0);
new_inset->InsertSymbol(current_view, s);
} else
- if (current_view->theLockingInset()->LyxCode() == Inset::MATH_CODE)
+ if (current_view->theLockingInset()->LyxCode() == Inset::MATH_CODE ||
+ current_view->theLockingInset()->LyxCode() == Inset::MATHMACRO_CODE)
static_cast<InsetFormula*>(current_view->theLockingInset())->InsertSymbol(current_view, s);
else
lyxerr << "Math error: attempt to write on a wrong "
static_cast<InsetFormula*>(current_view->theLockingInset())->InsertSymbol(current_view, s);
else
lyxerr << "Math error: attempt to write on a wrong "
if (row->par()->GetChar(row->pos()) == LyXParagraph::META_INSET
&& (inset=row->par()->GetInset(row->pos()))
&& (inset->display())) // || (inset->scroll() < 0)))
if (row->par()->GetChar(row->pos()) == LyXParagraph::META_INSET
&& (inset=row->par()->GetInset(row->pos()))
&& (inset->display())) // || (inset->scroll() < 0)))
- align = LYX_ALIGN_CENTER;
+ align = (inset->LyxCode() == Inset::MATHMACRO_CODE)
+ ? LYX_ALIGN_BLOCK : LYX_ALIGN_CENTER;
switch (align) {
case LYX_ALIGN_BLOCK:
switch (align) {
case LYX_ALIGN_BLOCK: