#include "MathData.h"
#include "MathStream.h"
+#include "MathSupport.h"
#include "LaTeXFeatures.h"
#include "MetricsInfo.h"
{
Changer dummy = mi.base.changeEnsureMath();
cell(0).metrics(mi, dim);
- dim.asc += 4;
- dim.des += 2;
- dim.wid += 12;
+ // make sure that the dim is high enough for any character
+ Dimension fontDim;
+ math_font_max_dim(mi.base.font, fontDim.asc, fontDim.des);
+ dim += fontDim;
+ // Some room for the decoration
+ dim.asc += 1;
+ dim.wid += 7;
}
void InsetMathSqrt::htmlize(HtmlStream & os) const
{
os << MTag("span", "class='sqrt'")
- << from_ascii("√")
- << MTag("span", "class='sqrtof'") << cell(0) << ETag("span")
+ << from_ascii("√")
+ << MTag("span", "class='sqrtof'") << cell(0) << ETag("span")
<< ETag("span");
}