/// Collect macro definitions in paragraphs
void updateMacros() const;
/// Iterate through the whole buffer and try to resolve macros
- void updateMacroInstances() const;
+ void updateMacroInstances(UpdateType) const;
/// List macro names of this buffer, the parent and the children
void listMacroNames(MacroNameSet & macros) const;
}
Cursor & cur = mi.base.bv->cursor();
- const_cast<MathData*>(this)->updateMacros(&cur, mi.macrocontext);
+ const_cast<MathData*>(this)->updateMacros(&cur, mi.macrocontext, InternalUpdate);
DocIterator const & inlineCompletionPos = mi.base.bv->inlineCompletionPos();
MathData const * inlineCompletionData = 0;
}
-void MathData::updateMacros(Cursor * cur, MacroContext const & mc)
+void MathData::updateMacros(Cursor * cur, MacroContext const & mc,
+ UpdateType utype)
{
// If we are editing a macro, we cannot update it immediately,
// otherwise wrong undo steps will be recorded (bug 6208).
if (inset->asScriptInset())
inset = inset->asScriptInset()->nuc()[0].nucleus();
LASSERT(inset->asMacro(), /**/);
- inset->asMacro()->updateRepresentation();
+ inset->asMacro()->updateRepresentation(cur, mc, utype);
}
}
/// attach/detach arguments to macros, updating the cur to
/// stay visually at the same position (cur==0 is allowed)
- void updateMacros(Cursor * cur, MacroContext const & mc);
+ void updateMacros(Cursor * cur, MacroContext const & mc, UpdateType);
///
void updateBuffer(ParIterator const &, UpdateType);
}
-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_);
/// update macro definition
void updateMacro(MacroContext const & mc);
/// check if macro definition changed, argument changed etc. and adapt
- void updateRepresentation();
+ void updateRepresentation(Cursor * cur, MacroContext const & mc, UpdateType);
/// empty macro, put arguments into args, possibly strip arity-attachedArgsNum_ empty ones.
/// Includes the optional arguments.
void detachArguments(std::vector<MathData> & args, bool strip);
except on Windows, where 30 minutes are allowed. This is because the Windows
installer may trigger MiKTeX updates that suffer from network latencies.
+- Macros that use other macros now output properly to XHTML (bug 7532).
+
* USER INTERFACE