}
-} // namespace anon
+} // namespace
int mathed_font_em(FontInfo const & font)
return theFontMetrics(font).em();
}
+
+int mathed_font_x_height(FontInfo const & font)
+{
+ return theFontMetrics(font).ascent('x');
+}
+
/* The math units. Quoting TeX by Topic, p.205:
*
* Spacing around mathematical objects is measured in mu units. A mu
void asArray(docstring const & str, MathData & ar, Parse::flags pf)
{
+ // If the QUIET flag is set, we are going to parse for either
+ // a paste operation or a macro definition. We try to do the
+ // right thing in all cases.
+
bool quiet = pf & Parse::QUIET;
- if ((str.size() == 1 && quiet) || (!mathed_parse_cell(ar, str, pf) && quiet))
+ bool macro = pf & Parse::MACRODEF;
+ if ((str.size() == 1 && quiet) || (!mathed_parse_cell(ar, str, pf) && quiet && !macro))
mathed_parse_cell(ar, str, pf | Parse::VERBATIM);
}