Every time I want to write an (ordinary) derivative I have to use
frac, like this:
\partial for partial derivatives.
Is there a package or a command that takes, for instance, (Ordinary or Partial, Power of derivative, variables) and outputs the formatted expression?
You can use the
esdiffpackage, which has handy macros for derivatives and partial derivatives, taking care of indices. Here is a demo;