/* * File: math_inset.C * Purpose: Implementation of insets for mathed * Author: Alejandro Aguilar Sierra <asierra@servidor.unam.mx> * Created: January 1996 * Description: * * Dependencies: Xlib, XForms * * Copyright: (c) 1996, 1997 Alejandro Aguilar Sierra * * Version: 0.8beta. * * You are free to use and modify this code under the terms of * the GNU General Public Licence version 2 or later.
*/
// A standard paragraph shouldn't have any tabs nor CRs. if (array) {
MathedIter it(array); while (it.OK()) { char c = it.GetChar(); if (c==LM_TC_TAB || c==LM_TC_CR)
it.Delete(); else
it.Next();
}
}
}
// Check the number of tabs and crs void MathMatrixInset::SetData(LyxArrayBase *a)
{ if (!a) return;
MathedIter it(a); int nn = nc-1;
nr = 1; // count tabs per row while (it.OK()) { if (it.IsTab()) { if (nn<0) {
it.Delete(); continue;
} else { // it.Next();
nn--;
}
} if (it.IsCR()) { while (nn>0) {
it.Insert(' ', LM_TC_TAB);
nn--;
}
nn = nc-1;
nr++;
}
it.Next();
}
it.Reset();
// Automatically inserts tabs around bops // DISABLED because it's very easy to insert tabs
array = a;
}
void MathMatrixInset::Draw(int x, int baseline)
{
MathParInset::Draw(x, baseline);
}
void MathMatrixInset::Metrics()
{ int i, /*cy,*/ hl, h=0;
MathedRowSt *cprow=0, *cxrow;
if (!row) { // fprintf(stderr, " MIDA ");
MathedXIter it(this);
row = it.adjustVerticalSt();
}
// Clean the arrays
cxrow = row; while (cxrow) { for (i=0; i<=nc; i++) cxrow->w[i] = 0;
cxrow = cxrow->next;
}
// Vertical positions of each row
cxrow = row; while (cxrow) { for (i=0; i<nc; i++) { if (cxrow==row || ws[i]<cxrow->w[i]) ws[i]=cxrow->w[i]; if (cxrow->next==0 && ws[i]==0) ws[i] = df_width;
}
if (inset)
p = new MathAccentInset(inset->Clone(), code, GetStyle()); else
p = new MathAccentInset(c, fn, code, GetStyle());
return p;
}
MathBigopInset::MathBigopInset(charconst* name, int id, short st):
MathedInset(name, LM_OT_BIGOP, st), sym(id)
{
lims = -1;
}
MathedInset *MathBigopInset::Clone()
{
MathBigopInset* p = new MathBigopInset(name, sym, GetStyle()); return p;
}
MathDotsInset::MathDotsInset(charconst* name, int id, short st):
MathedInset(name, LM_OT_DOTS, st), code(id)
{
}
MathedInset *MathDotsInset::Clone()
{
MathDotsInset* p = new MathDotsInset(name, code, GetStyle()); return p;
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.14Bemerkung:
(vorverarbeitet am 2026-06-05)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.