2003-08-19 13:00:56 +00:00
|
|
|
|
/**
|
2007-04-25 03:01:35 +00:00
|
|
|
|
* \file InsetMathFrac.cpp
|
2003-08-19 13:00:56 +00:00
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author Alejandro Aguilar Sierra
|
|
|
|
|
* \author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
2006-09-17 09:14:18 +00:00
|
|
|
|
#include "InsetMathFrac.h"
|
2007-04-26 16:05:57 +00:00
|
|
|
|
#include "MathData.h"
|
2006-10-22 10:15:23 +00:00
|
|
|
|
#include "MathStream.h"
|
2006-09-17 09:14:18 +00:00
|
|
|
|
#include "TextPainter.h"
|
2006-04-06 09:46:01 +00:00
|
|
|
|
#include "LaTeXFeatures.h"
|
2007-04-26 17:34:20 +00:00
|
|
|
|
#include "Color.h"
|
2007-09-15 16:39:51 +00:00
|
|
|
|
#include "Cursor.h"
|
2003-09-07 21:25:37 +00:00
|
|
|
|
#include "frontends/Painter.h"
|
2001-02-14 15:00:50 +00:00
|
|
|
|
|
2001-02-13 13:28:32 +00:00
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
namespace lyx {
|
|
|
|
|
|
2007-09-15 16:39:51 +00:00
|
|
|
|
InsetMathFrac::InsetMathFrac(Kind kind, InsetMath::idx_type ncells)
|
|
|
|
|
: InsetMathFracBase(ncells), kind_(kind)
|
2001-07-09 10:19:50 +00:00
|
|
|
|
{}
|
2001-02-13 13:28:32 +00:00
|
|
|
|
|
|
|
|
|
|
2007-08-30 18:03:17 +00:00
|
|
|
|
Inset * InsetMathFrac::clone() const
|
2002-03-21 17:42:56 +00:00
|
|
|
|
{
|
2007-08-30 18:03:17 +00:00
|
|
|
|
return new InsetMathFrac(*this);
|
2001-02-13 13:28:32 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
InsetMathFrac * InsetMathFrac::asFracInset()
|
2001-11-13 18:33:48 +00:00
|
|
|
|
{
|
2006-04-06 09:46:01 +00:00
|
|
|
|
return kind_ == ATOP ? 0 : this;
|
2001-11-13 18:33:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
InsetMathFrac const * InsetMathFrac::asFracInset() const
|
2002-08-08 16:08:11 +00:00
|
|
|
|
{
|
2006-04-06 09:46:01 +00:00
|
|
|
|
return kind_ == ATOP ? 0 : this;
|
2002-08-08 16:08:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-09-15 16:39:51 +00:00
|
|
|
|
bool InsetMathFrac::idxRight(Cursor & cur) const
|
|
|
|
|
{
|
2007-09-30 17:56:49 +00:00
|
|
|
|
InsetMath::idx_type target = 0;
|
2007-09-18 15:04:58 +00:00
|
|
|
|
if (kind_ == UNIT || (kind_ == UNITFRAC && nargs() == 3)) {
|
|
|
|
|
if (nargs() == 3)
|
|
|
|
|
target = 0;
|
|
|
|
|
else if (nargs() == 2)
|
|
|
|
|
target = 1;
|
|
|
|
|
} else
|
2007-09-30 17:56:49 +00:00
|
|
|
|
return false;
|
2007-09-15 16:39:51 +00:00
|
|
|
|
if (cur.idx() == target)
|
|
|
|
|
return false;
|
|
|
|
|
cur.idx() = target;
|
|
|
|
|
cur.pos() = cell(target).x2pos(cur.x_target());
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool InsetMathFrac::idxLeft(Cursor & cur) const
|
|
|
|
|
{
|
2007-09-30 17:56:49 +00:00
|
|
|
|
InsetMath::idx_type target = 0;
|
2007-09-18 15:04:58 +00:00
|
|
|
|
if (kind_ == UNIT || (kind_ == UNITFRAC && nargs() == 3)) {
|
|
|
|
|
if (nargs() == 3)
|
|
|
|
|
target = 2;
|
|
|
|
|
else if (nargs() == 2)
|
|
|
|
|
target = 0;
|
|
|
|
|
} else
|
2007-09-30 17:56:49 +00:00
|
|
|
|
return false;
|
2007-09-15 16:39:51 +00:00
|
|
|
|
if (cur.idx() == target)
|
|
|
|
|
return false;
|
|
|
|
|
cur.idx() = target;
|
|
|
|
|
cur.pos() = cell(target).x2pos(cur.x_target());
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-09-21 20:39:47 +00:00
|
|
|
|
void InsetMathFrac::metrics(MetricsInfo & mi, Dimension & dim) const
|
2001-02-13 13:28:32 +00:00
|
|
|
|
{
|
2007-09-24 13:52:04 +00:00
|
|
|
|
Dimension dim0, dim1, dim2;
|
|
|
|
|
|
2007-09-18 15:04:58 +00:00
|
|
|
|
if (kind_ == UNIT || (kind_ == UNITFRAC && nargs() == 3)) {
|
|
|
|
|
if (nargs() == 1) {
|
|
|
|
|
ShapeChanger dummy2(mi.base.font, Font::UP_SHAPE);
|
2007-09-24 13:52:04 +00:00
|
|
|
|
cell(0).metrics(mi, dim0);
|
|
|
|
|
dim.wid = dim0.width()+ 3;
|
|
|
|
|
dim.asc = dim0.asc;
|
|
|
|
|
dim.des = dim0.des;
|
2007-09-18 15:04:58 +00:00
|
|
|
|
} else if (nargs() == 2) {
|
2007-09-24 13:52:04 +00:00
|
|
|
|
cell(0).metrics(mi, dim0);
|
2007-09-18 15:04:58 +00:00
|
|
|
|
ShapeChanger dummy2(mi.base.font, Font::UP_SHAPE);
|
2007-09-24 13:52:04 +00:00
|
|
|
|
cell(1).metrics(mi, dim1);
|
|
|
|
|
dim.wid = dim0.width() + dim1.wid + 5;
|
|
|
|
|
dim.asc = std::max(dim0.asc, dim1.asc);
|
|
|
|
|
dim.des = std::max(dim0.des, dim1.des);
|
2007-09-18 15:04:58 +00:00
|
|
|
|
} else {
|
2007-09-24 13:52:04 +00:00
|
|
|
|
cell(2).metrics(mi, dim2);
|
2007-09-18 15:04:58 +00:00
|
|
|
|
ShapeChanger dummy2(mi.base.font, Font::UP_SHAPE);
|
|
|
|
|
FracChanger dummy(mi.base);
|
2007-09-24 13:52:04 +00:00
|
|
|
|
cell(0).metrics(mi, dim0);
|
|
|
|
|
cell(1).metrics(mi, dim1);
|
|
|
|
|
dim.wid = dim0.width() + dim1.wid + dim2.wid + 10;
|
|
|
|
|
dim.asc = std::max(dim2.asc, dim0.height() + 5);
|
|
|
|
|
dim.des = std::max(dim2.des, dim1.height() - 5);
|
2007-09-18 15:04:58 +00:00
|
|
|
|
}
|
2006-04-06 09:46:01 +00:00
|
|
|
|
} else {
|
2007-09-15 16:39:51 +00:00
|
|
|
|
FracChanger dummy(mi.base);
|
2007-09-24 13:52:04 +00:00
|
|
|
|
cell(0).metrics(mi, dim0);
|
|
|
|
|
cell(1).metrics(mi, dim1);
|
2007-10-01 10:23:56 +00:00
|
|
|
|
if (nargs() == 3)
|
|
|
|
|
cell(2).metrics(mi, dim2);
|
|
|
|
|
|
2007-09-15 16:39:51 +00:00
|
|
|
|
if (kind_ == NICEFRAC) {
|
2007-09-24 13:52:04 +00:00
|
|
|
|
dim.wid = dim0.width() + dim1.wid + 5;
|
|
|
|
|
dim.asc = dim0.height() + 5;
|
|
|
|
|
dim.des = dim1.height() - 5;
|
2007-09-15 16:39:51 +00:00
|
|
|
|
} else if (kind_ == UNITFRAC) {
|
|
|
|
|
ShapeChanger dummy2(mi.base.font, Font::UP_SHAPE);
|
2007-09-24 13:52:04 +00:00
|
|
|
|
dim.wid = dim0.width() + dim1.wid + 5;
|
|
|
|
|
dim.asc = dim0.height() + 5;
|
|
|
|
|
dim.des = dim1.height() - 5;
|
2007-09-15 16:39:51 +00:00
|
|
|
|
} else {
|
2007-09-24 13:52:04 +00:00
|
|
|
|
dim.wid = std::max(dim0.width(), dim1.wid) + 2;
|
|
|
|
|
dim.asc = dim0.height() + 2 + 5;
|
|
|
|
|
dim.des = dim1.height() + 2 - 5;
|
2007-09-15 16:39:51 +00:00
|
|
|
|
}
|
2006-04-06 09:46:01 +00:00
|
|
|
|
}
|
2004-04-07 16:54:15 +00:00
|
|
|
|
metricsMarkers(dim);
|
2007-09-23 22:39:49 +00:00
|
|
|
|
// Cache the inset dimension.
|
|
|
|
|
setDimCache(mi, dim);
|
2001-02-13 13:28:32 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
void InsetMathFrac::draw(PainterInfo & pi, int x, int y) const
|
2001-02-13 13:28:32 +00:00
|
|
|
|
{
|
2004-01-30 11:41:12 +00:00
|
|
|
|
setPosCache(pi, x, y);
|
2007-09-23 22:39:49 +00:00
|
|
|
|
Dimension const dim = dimension(*pi.base.bv);
|
2007-09-24 13:52:04 +00:00
|
|
|
|
Dimension const dim0 = cell(0).dimension(*pi.base.bv);
|
2007-09-23 22:39:49 +00:00
|
|
|
|
int m = x + dim.wid / 2;
|
2007-09-18 15:04:58 +00:00
|
|
|
|
if (kind_ == UNIT || (kind_ == UNITFRAC && nargs() == 3)) {
|
|
|
|
|
if (nargs() == 1) {
|
|
|
|
|
ShapeChanger dummy2(pi.base.font, Font::UP_SHAPE);
|
|
|
|
|
cell(0).draw(pi, x + 1, y);
|
|
|
|
|
} else if (nargs() == 2) {
|
|
|
|
|
cell(0).draw(pi, x + 1, y);
|
|
|
|
|
ShapeChanger dummy2(pi.base.font, Font::UP_SHAPE);
|
2007-09-24 13:52:04 +00:00
|
|
|
|
cell(1).draw(pi, x + dim0.width() + 5, y);
|
2007-09-18 15:04:58 +00:00
|
|
|
|
} else {
|
|
|
|
|
cell(2).draw(pi, x + 1, y);
|
|
|
|
|
ShapeChanger dummy2(pi.base.font, Font::UP_SHAPE);
|
|
|
|
|
FracChanger dummy(pi.base);
|
2007-10-01 09:54:41 +00:00
|
|
|
|
Dimension const dim1 = cell(1).dimension(*pi.base.bv);
|
|
|
|
|
Dimension const dim2 = cell(2).dimension(*pi.base.bv);
|
2007-09-24 13:52:04 +00:00
|
|
|
|
int xx = x + dim2.wid + 5;
|
2007-09-18 15:04:58 +00:00
|
|
|
|
cell(0).draw(pi, xx + 2,
|
2007-09-24 13:52:04 +00:00
|
|
|
|
y - dim0.des - 5);
|
|
|
|
|
cell(1).draw(pi, xx + dim0.width() + 5,
|
|
|
|
|
y + dim1.asc / 2);
|
2007-09-18 15:04:58 +00:00
|
|
|
|
}
|
2006-04-06 09:46:01 +00:00
|
|
|
|
} else {
|
2007-09-15 16:39:51 +00:00
|
|
|
|
FracChanger dummy(pi.base);
|
2007-10-01 09:54:41 +00:00
|
|
|
|
Dimension const dim1 = cell(1).dimension(*pi.base.bv);
|
2007-09-15 16:39:51 +00:00
|
|
|
|
if (kind_ == NICEFRAC) {
|
|
|
|
|
cell(0).draw(pi, x + 2,
|
2007-09-24 13:52:04 +00:00
|
|
|
|
y - dim0.des - 5);
|
|
|
|
|
cell(1).draw(pi, x + dim0.width() + 5,
|
|
|
|
|
y + dim1.asc / 2);
|
2007-09-15 16:39:51 +00:00
|
|
|
|
} else if (kind_ == UNITFRAC) {
|
|
|
|
|
ShapeChanger dummy2(pi.base.font, Font::UP_SHAPE);
|
|
|
|
|
cell(0).draw(pi, x + 2,
|
2007-09-24 13:52:04 +00:00
|
|
|
|
y - dim0.des - 5);
|
|
|
|
|
cell(1).draw(pi, x + dim0.width() + 5,
|
|
|
|
|
y + dim1.asc / 2);
|
2007-09-15 16:39:51 +00:00
|
|
|
|
} else {
|
|
|
|
|
// Classical fraction
|
2007-09-24 13:52:04 +00:00
|
|
|
|
cell(0).draw(pi, m - dim0.width() / 2,
|
|
|
|
|
y - dim0.des - 2 - 5);
|
|
|
|
|
cell(1).draw(pi, m - dim1.wid / 2,
|
|
|
|
|
y + dim1.asc + 2 - 5);
|
2007-09-15 16:39:51 +00:00
|
|
|
|
}
|
2006-04-06 09:46:01 +00:00
|
|
|
|
}
|
2007-09-18 15:04:58 +00:00
|
|
|
|
if (kind_ == NICEFRAC || kind_ == UNITFRAC) {
|
2007-09-15 16:39:51 +00:00
|
|
|
|
// Diag line:
|
|
|
|
|
int xx = x;
|
2007-09-18 15:04:58 +00:00
|
|
|
|
if (nargs() == 3)
|
2007-10-01 10:23:56 +00:00
|
|
|
|
xx += cell(2).dimension(*pi.base.bv).wid + 5;
|
|
|
|
|
|
2007-09-24 13:52:04 +00:00
|
|
|
|
pi.pain.line(xx + dim0.wid,
|
2007-09-23 22:39:49 +00:00
|
|
|
|
y + dim.des - 2,
|
2007-09-24 13:52:04 +00:00
|
|
|
|
xx + dim0.wid + 5,
|
2007-09-23 22:39:49 +00:00
|
|
|
|
y - dim.asc + 2, Color::math);
|
2007-09-12 08:15:33 +00:00
|
|
|
|
}
|
2006-07-19 10:50:18 +00:00
|
|
|
|
if (kind_ == FRAC || kind_ == OVER)
|
2007-05-28 22:27:45 +00:00
|
|
|
|
pi.pain.line(x + 1, y - 5,
|
2007-09-23 22:39:49 +00:00
|
|
|
|
x + dim.wid - 2, y - 5, Color::math);
|
2004-04-07 16:54:15 +00:00
|
|
|
|
drawMarkers(pi, x, y);
|
2001-02-13 13:28:32 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
void InsetMathFrac::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
|
2002-03-19 16:55:58 +00:00
|
|
|
|
{
|
2007-09-24 13:52:04 +00:00
|
|
|
|
Dimension dim0, dim1;
|
|
|
|
|
cell(0).metricsT(mi, dim0);
|
|
|
|
|
cell(1).metricsT(mi, dim1);
|
|
|
|
|
dim.wid = std::max(dim0.width(), dim1.wid);
|
|
|
|
|
dim.asc = dim0.height() + 1;
|
|
|
|
|
dim.des = dim1.height();
|
2002-03-19 16:55:58 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
void InsetMathFrac::drawT(TextPainter & pain, int x, int y) const
|
2002-03-19 16:55:58 +00:00
|
|
|
|
{
|
2007-09-23 22:39:49 +00:00
|
|
|
|
// FIXME: BROKEN!
|
2007-09-24 13:52:04 +00:00
|
|
|
|
/*
|
2007-09-23 22:39:49 +00:00
|
|
|
|
Dimension dim;
|
|
|
|
|
int m = x + dim.width() / 2;
|
2007-09-24 13:52:04 +00:00
|
|
|
|
cell(0).drawT(pain, m - dim0.width() / 2, y - dim0.des - 1);
|
|
|
|
|
cell(1).drawT(pain, m - dim1.wid / 2, y + dim1.asc);
|
2006-04-06 09:46:01 +00:00
|
|
|
|
// ASCII art: ignore niceties
|
2007-09-12 08:15:33 +00:00
|
|
|
|
if (kind_ == FRAC || kind_ == OVER || kind_ == NICEFRAC || kind_ == UNITFRAC)
|
2007-09-23 22:39:49 +00:00
|
|
|
|
pain.horizontalLine(x, y, dim.width());
|
2007-09-24 13:52:04 +00:00
|
|
|
|
*/
|
2002-03-19 16:55:58 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
void InsetMathFrac::write(WriteStream & os) const
|
2001-02-13 13:28:32 +00:00
|
|
|
|
{
|
2006-07-19 10:50:18 +00:00
|
|
|
|
switch (kind_) {
|
|
|
|
|
case ATOP:
|
2001-10-19 11:25:48 +00:00
|
|
|
|
os << '{' << cell(0) << "\\atop " << cell(1) << '}';
|
2006-07-19 10:50:18 +00:00
|
|
|
|
break;
|
|
|
|
|
case OVER:
|
|
|
|
|
// \\over is only for compatibility, normalize this to \\frac
|
|
|
|
|
os << "\\frac{" << cell(0) << "}{" << cell(1) << '}';
|
|
|
|
|
break;
|
|
|
|
|
case FRAC:
|
|
|
|
|
case NICEFRAC:
|
2007-09-12 08:15:33 +00:00
|
|
|
|
case UNITFRAC:
|
2007-09-18 15:04:58 +00:00
|
|
|
|
if (nargs() == 2)
|
|
|
|
|
InsetMathNest::write(os);
|
|
|
|
|
else
|
|
|
|
|
os << "\\unitfrac[" << cell(2) << "]{" << cell(0) << "}{" << cell(1) << '}';
|
2006-07-19 10:50:18 +00:00
|
|
|
|
break;
|
2007-09-15 16:39:51 +00:00
|
|
|
|
case UNIT:
|
2007-09-18 15:04:58 +00:00
|
|
|
|
if (nargs() == 2)
|
|
|
|
|
os << "\\unit[" << cell(0) << "]{" << cell(1) << '}';
|
|
|
|
|
else
|
|
|
|
|
os << "\\unit{" << cell(0) << '}';
|
2007-09-15 16:39:51 +00:00
|
|
|
|
break;
|
2006-07-19 10:50:18 +00:00
|
|
|
|
}
|
2001-02-13 13:28:32 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-10-22 10:15:23 +00:00
|
|
|
|
docstring InsetMathFrac::name() const
|
2001-02-13 13:28:32 +00:00
|
|
|
|
{
|
2006-04-06 09:46:01 +00:00
|
|
|
|
switch (kind_) {
|
|
|
|
|
case FRAC:
|
2006-10-22 10:15:23 +00:00
|
|
|
|
return from_ascii("frac");
|
2006-07-19 10:50:18 +00:00
|
|
|
|
case OVER:
|
2006-10-22 10:15:23 +00:00
|
|
|
|
return from_ascii("over");
|
2006-04-06 09:46:01 +00:00
|
|
|
|
case NICEFRAC:
|
2006-10-22 10:15:23 +00:00
|
|
|
|
return from_ascii("nicefrac");
|
2007-09-12 08:15:33 +00:00
|
|
|
|
case UNITFRAC:
|
|
|
|
|
return from_ascii("unitfrac");
|
2007-09-15 16:39:51 +00:00
|
|
|
|
case UNIT:
|
|
|
|
|
return from_ascii("unit");
|
2006-04-06 09:46:01 +00:00
|
|
|
|
case ATOP:
|
2006-10-22 10:15:23 +00:00
|
|
|
|
return from_ascii("atop");
|
2006-04-06 09:46:01 +00:00
|
|
|
|
}
|
2006-07-31 17:44:50 +00:00
|
|
|
|
// shut up stupid compiler
|
2006-10-22 10:15:23 +00:00
|
|
|
|
return docstring();
|
2001-02-13 13:28:32 +00:00
|
|
|
|
}
|
2001-11-07 08:51:35 +00:00
|
|
|
|
|
2002-08-01 15:53:46 +00:00
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
bool InsetMathFrac::extraBraces() const
|
2006-07-16 17:19:05 +00:00
|
|
|
|
{
|
2006-07-19 10:50:18 +00:00
|
|
|
|
return kind_ == ATOP || kind_ == OVER;
|
2006-07-16 17:19:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
void InsetMathFrac::maple(MapleStream & os) const
|
2001-11-07 08:51:35 +00:00
|
|
|
|
{
|
2001-11-13 16:27:06 +00:00
|
|
|
|
os << '(' << cell(0) << ")/(" << cell(1) << ')';
|
2001-11-07 17:30:26 +00:00
|
|
|
|
}
|
|
|
|
|
|
2002-08-01 15:53:46 +00:00
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
void InsetMathFrac::mathematica(MathematicaStream & os) const
|
2002-07-01 11:17:14 +00:00
|
|
|
|
{
|
|
|
|
|
os << '(' << cell(0) << ")/(" << cell(1) << ')';
|
|
|
|
|
}
|
2001-11-07 17:30:26 +00:00
|
|
|
|
|
2002-08-01 15:53:46 +00:00
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
void InsetMathFrac::octave(OctaveStream & os) const
|
2002-04-25 15:37:10 +00:00
|
|
|
|
{
|
|
|
|
|
os << '(' << cell(0) << ")/(" << cell(1) << ')';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-10-22 10:15:23 +00:00
|
|
|
|
void InsetMathFrac::mathmlize(MathStream & os) const
|
2001-11-07 17:30:26 +00:00
|
|
|
|
{
|
2001-11-08 12:06:56 +00:00
|
|
|
|
os << MTag("mfrac") << cell(0) << cell(1) << ETag("mfrac");
|
2001-11-07 08:51:35 +00:00
|
|
|
|
}
|
2006-04-06 09:46:01 +00:00
|
|
|
|
|
|
|
|
|
|
2006-09-16 18:11:38 +00:00
|
|
|
|
void InsetMathFrac::validate(LaTeXFeatures & features) const
|
2006-04-06 09:46:01 +00:00
|
|
|
|
{
|
2007-09-18 15:04:58 +00:00
|
|
|
|
if (kind_ == NICEFRAC || kind_ == UNITFRAC || kind_ == UNIT)
|
2007-09-12 08:15:33 +00:00
|
|
|
|
features.require("units");
|
2006-09-16 18:11:38 +00:00
|
|
|
|
InsetMathNest::validate(features);
|
2006-04-06 09:46:01 +00:00
|
|
|
|
}
|
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace lyx
|