#include "LaTeXFeatures.h"
-LyXFont WhichFont(short type, int size);
-
namespace {
string const getAlign(short int type, int cols)
{
size_ = (GetType() == LM_OT_SIMPLE) ? LM_ST_TEXT : LM_ST_DISPLAY;
- //LyXFont wfont = WhichFont(LM_TC_BF, size());
- //wfont.setLatex(LyXFont::OFF);
-
// let the cells adjust themselves
MathGridInset::Metrics(size_);
if (numberedType()) {
int l = 0;
for (int row = 0; row < nrows(); ++row)
- l = std::max(l, mathed_string_width(LM_TC_TEXTRM, size(), nicelabel(row)));
+ l = std::max(l, mathed_string_width(LM_TC_BF, size(), nicelabel(row)));
if (l)
width_ += 30 + l;
MathGridInset::draw(pain, x, y);
if (numberedType()) {
- LyXFont wfont = WhichFont(LM_TC_BF, size());
-#ifndef NO_LATEX
- wfont.setLatex(LyXFont::OFF);
-#endif
int xx = x + colinfo_.back().offset_ + colinfo_.back().width_ + 20;
- for (int row = 0; row < nrows(); ++row)
- pain.text(xx, y + rowinfo_[row].offset_, nicelabel(row), wfont);
+ for (int row = 0; row < nrows(); ++row) {
+ int yy = y + rowinfo_[row].offset_;
+ drawStr(pain, LM_TC_BF, size(), xx, yy, nicelabel(row));
+ }
}
}
}
-void MathMatrixInset::Validate(LaTeXFeatures & features)
+void MathMatrixInset::Validate(LaTeXFeatures & features) const
{
features.amsstyle = ams();
//if (features.amsstyle)
// return;
- //Validate1(features);
-
features.boldsymbol = true;
- features.binom = true;
-}
+ //features.binom = true;
-/*
-void MathMatrixInset::Validate1(LaTeXFeatures & features)
-{
- MathIter it(cell());
-
- while (it.OK() && !(features.binom && features.boldsymbol)) {
- MathInset * p = it.nextInset();
- if (p) {
- p = it.GetActiveInset();
- if (p) {
- if (!features.binom && p->GetType() == LM_OT_MACRO &&
- p->name() == "binom") {
- features.binom = true;
- } else {
- for (int i = 0; i <= p->getMaxArgumentIdx(); ++i) {
- p->setArgumentIdx(i);
- Validate1(features, p);
- }
- }
- } else {
- if (!features.boldsymbol && p->name() == "boldsymbol")
- features.boldsymbol = true;
- }
- }
- it.Next();
- }
+ MathInset::Validate(features);
}
-*/
void MathMatrixInset::header_write(std::ostream & os) const