#include "support/debug.h"
#include "support/docstream.h"
-#include "support/lyxlib.h"
#include "support/textutils.h"
#include "support/unique_ptr.h"
/// The default limits value
-Limits InsetMathSymbol::defaultLimits() const
+Limits InsetMathSymbol::defaultLimits(bool display) const
{
- return (allowsLimitsChange() && sym_->extra != "func")
- ? LIMITS : NO_LIMITS;
+ if (allowsLimitsChange() && sym_->extra != "func" && display)
+ return LIMITS;
+ else
+ return NO_LIMITS;
}
void InsetMathSymbol::metrics(MetricsInfo & mi, Dimension & dim) const
{
- mathedSymbolDim(mi.base, dim, sym_);
+ // set dim
+ // FIXME: this should depend on BufferView
+ // set negative kerning_ so that a subscript is moved leftward
+ kerning_ = -mathedSymbolDim(mi.base, dim, sym_);
if (sym_->draw != sym_->name) {
- // set dim
- // FIXME: this should depend on BufferView
- // set kerning_
- kerning_ = mathed_char_kerning(mi.base.font,
- mathedSymbol(mi.base, sym_).back());
-
// align character vertically
// FIXME: this should depend on BufferView
h_ = 0;
}
-void InsetMathSymbol::mathmlize(MathStream & ms) const
+void InsetMathSymbol::mathmlize(MathMLStream & ms) const
{
// FIXME We may need to do more interesting things
// with MathMLtype.
}
-void InsetMathSymbol::write(WriteStream & os) const
+void InsetMathSymbol::write(TeXMathStream & os) const
{
unique_ptr<MathEnsurer> ensurer;
if (currentMode() != TEXT_MODE)