- if (f->cell(0).size() > 1)
- p->cell(0) = MathArray(f->cell(0).begin() + 1, f->cell(0).end());
- else
- jt = extractArgument(p->cell(0), jt, ar.end());
-
+ int n = 1;
+ MathArray & numer = f->cell(0);
+ if (numer.size() > 1 && numer.at(1)->asScriptInset()) {
+ // this is something like d^n f(x) / d... or d^n / d...
+ n = 1; // FIXME
+ if (numer.size() > 2)
+ p->cell(0) = MathArray(numer.begin() + 2, numer.end());
+ else
+ jt = extractArgument(p->cell(0), jt, ar.end());
+ } else {
+ // simply d f(x) / d... or d/d...
+ if (numer.size() > 1)
+ p->cell(0) = MathArray(numer.begin() + 1, numer.end());
+ else
+ jt = extractArgument(p->cell(0), jt, ar.end());
+ }
+