I recently discovered the diffcoef
package and the power of xtemplate
. The first one encompasses almost everything I was doing with personal macros for derivative operators.
However, I was wondering if it is possible to simply tune the command \diffp
to obtain a compact version of the derivative operator, where the denominator is subscripted instead.
Here is a MWE, where the right hand side of the equation should look like the left hand side:
\documentclass{article}
\usepackage{diffcoeff}
\begin{document}
\diffdef{p}{ % Something that should remove the fraction style
op-symbol = \partial,
op-symbol-alt = none
}
\begin{equation}
\partial_x f= \diffp*{f}{x} % now the LHS and RHS are different...
\end{equation}
\end{document}
Of course the purpose is not to do something like \newcommand{\diff2}[2]{\dlp_{#1}#2}
because I would like to retain the flexibility of the diffcoef
package. For example, I also wish to be able to write with the same command:
\partial_{\frac{1}{b}}^{z}\partial_{xy}^{z-1}a=\diffp[z,z-1]{a}{\frac{1}{b},xy}
So is it possible to remove the fraction style of the \diffp
command with diffcoef
? If not, is it possible to implement a new command, which maintains the syntax and flexibility of \diffp
(perhaps via xtemplate
)?