// otherwise do a manual metrics call
CoordCache & coords = mi.base.bv->coordCache();
for (idx_type i = 0; i < nargs(); ++i) {
- if (!coords.getArrays().has(&cell(i))) {
+ if (!coords.getArrays().hasDim(&cell(i))) {
Dimension tdim;
cell(i).metrics(mi, tdim);
}
}
-void MathMacro::updateRepresentation()
+void MathMacro::updateRepresentation(Cursor * cur, MacroContext const & mc,
+ UpdateType utype)
{
// known macro?
if (macro_ == 0)
}
// expanding macro with the values
macro_->expand(values, expanded_.cell(0));
+ if (utype == OutputUpdate && !expanded_.cell(0).empty())
+ expanded_.cell(0).updateMacros(cur, mc, utype);
// get definition for list edit mode
docstring const & display = macro_->display();
asArray(display.empty() ? macro_->definition() : display, definition_);
void MathMacro::mathmlize(MathStream & os) const
{
MathData const & data = expanded_.cell(0);
- data.dump();
- os << expanded_.cell(0);
+ if (data.empty()) {
+ // this means that we do not recognize the macro
+ throw MathExportException();
+ }
+ os << data;
}
void MathMacro::htmlize(HtmlStream & os) const
{
- os << expanded_.cell(0);
+ MathData const & data = expanded_.cell(0);
+ if (data.empty()) {
+ // this means that we do not recognize the macro
+ throw MathExportException();
+ }
+ os << data;
}