size_t p = macroPos + 1;
vector<MathData> detachedArgs;
MathAtom scriptToPutAround;
-
+
// find cursor slice again of this MathData
int thisSlice = -1;
if (cur)
int thisPos = -1;
if (thisSlice != -1)
thisPos = (*cur)[thisSlice].pos();
-
+
// find arguments behind the macro
if (!interactiveInit) {
collectOptionalParameters(cur, macroOptionals, detachedArgs, p,
}
collectParameters(cur, macroNumArgs, detachedArgs, p,
scriptToPutAround, macroPos, thisPos, thisSlice, appetite);
-
+
// attach arguments back to macro inset
macroInset->attachArguments(detachedArgs, macroNumArgs, macroOptionals);
-
+
// found tail script? E.g. \foo{a}b^x
if (scriptToPutAround.nucleus()) {
// put macro into a script inset
= operator[](macroPos).nucleus()->asScriptInset();
macroInset = scriptInset->nuc()[0].nucleus()->asMacro();
}
-
+
// remove them from the MathData
erase(begin() + macroPos + 1, begin() + p);