----------------------------------------------------------------------
+- \matrm{xy} gets written as \mathrm{x}\mathrm{y}
+
Dekel:
Macros:
LMB_RELATION,
///
LMB_OPERATOR,
- ///
- LMB_BOP = (LMB_RELATION | LMB_OPERATOR)
-};
-
-
-/// Paragraph permissions
-enum MathParFlag {
- LMPF_BASIC = 0,
- /// If false can use a non-standard size
- LMPF_FIXED_SIZE = 1,
- /// If true can insert newlines
- LMPF_ALLOW_CR = 2,
- /// If true can use tabs
- LMPF_ALLOW_TAB = 4,
- /// If true can insert new columns
- LMPF_ALLOW_NEW_COL = 8,
- /// Smaller than current size (frac)
- LMPF_SMALLER = 16,
- /// Script size (subscript, stackrel)
- LMPF_SCRIPT = 32
};
#endif
expanded_ = tmplate_->xcell(0);
expanded_.data_.substitute(*this);
expanded_.metrics(mi_);
- width_ = expanded_.width() + 6;
- ascent_ = expanded_.ascent() + 3;
- descent_ = expanded_.descent() + 3;
+ width_ = expanded_.width();
+ ascent_ = expanded_.ascent();
+ descent_ = expanded_.descent();
}
return;
}
- expanded_.draw(pain, x + 3, y);
+ expanded_.draw(pain, x, y);
}
create("owns", 0, "\\ni");
create("gets", 0, "\\leftarrow");
create("to", 0, "\\rightarrow");
- create("|", 0, "\\parallel");
+ create("|", 0, "\\Vert");
create("longleftrightarrow", 0, "\\leftarrow\\kern-6mu\\rightarrow");
create("Longleftrightarrow", 0, "\\Leftarrow\\kern-6mu\\Rightarrow");
#include "math_symbolinset.h"
#include "math_parser.h"
+#include "debug.h"
#include "support.h"
#include "support/LOstream.h"
using std::ostream;
MathSymbolInset::MathSymbolInset(const latexkeys * l)
- : sym_(l), h_(0) {}
+ : sym_(l), h_(0)
+{}
MathInset * MathSymbolInset::clone() const
ascent_ += h_;
descent_ -= h_;
}
- return;
+ } else {
+ if (sym_->id > 0 && sym_->id < 255 && math_font_available(LM_TC_SYMB))
+ mathed_char_dim(code2(), mi_, sym_->id, ascent_, descent_, width_);
+ else
+ mathed_string_dim(LM_TC_TEX, mi_, sym_->name, ascent_, descent_, width_);
}
-
- if (sym_->id > 0 && sym_->id < 255 && math_font_available(LM_TC_SYMB))
- mathed_char_dim(code2(), mi_, sym_->id, ascent_, descent_, width_);
- else
- mathed_string_dim(LM_TC_TEX, mi_, sym_->name, ascent_, descent_, width_);
+ if (isRelOp())
+ width_ += mathed_char_width(LM_TC_TEX, mi_, 'I');
}
void MathSymbolInset::draw(Painter & pain, int x, int y) const
{
+ if (isRelOp())
+ x += mathed_char_width(LM_TC_TEX, mi_, 'I') / 2;
MathTextCodes Code = code();
if (sym_->latex_font_id > 0 && math_font_available(Code))
drawChar(pain, Code, mi_, x, y - h_, sym_->latex_font_id);
bool MathSymbolInset::isRelOp() const
-{
+{
return sym_->type == LMB_RELATION;
}