Is there a short hand command to write derivatives?

Every time I want to write an (ordinary) derivative I have to use frac, like this:

\frac{\mathrm{d}^2 \omega}{\mathrm{d}\theta^2}


Or using \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?

• one is physics for other i temporary don't remember a name :-( – Zarko Jan 27 '18 at 17:28
• Certainly you can define abbreviations, but I would recommend not doing this since you may want to share your TeX code with others. Then you probably don't want to mess with their shortcuts, and the others may not be too excited about yours either. Use shortcuts in your editor instead. – marmot Jan 27 '18 at 17:28
• \partial, for example. – Oleg Lobachev Jan 27 '18 at 17:35

You can use the esdiff package, which has handy macros for derivatives and partial derivatives, taking care of indices. Here is a demo;

\documentclass{article}%

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathtools}
\usepackage[thinc]{esdiff}

\begin{document}

\begin{alignat*}{3}
\diff{f}{x} &\qquad \diff*[4]{g}{t}{t = 1} \\[2ex]
\end{alignat*}

\end{document}


• +5 for my friend. I still have the account stuck on Mathematics. Could you please take a look at my combinatorial question and publish it, please? – Sebastiano Jan 27 '18 at 20:49
• @ Sebastiano: Do you mean, publish it in my name, or edit yours? Or if you want, I know a combinatorial proof for your question? – Bernard Jan 27 '18 at 21:11
• Edit my question and after you give me a combinatorial proof for your question. The answers are blocked – Sebastiano Jan 27 '18 at 21:12
• @Sebastiano: I've modified your question (without changing its title) to put it in a more general context. Please see if it's OK. I'm not sure it will be enough to re-open it, though. – Bernard Jan 27 '18 at 21:29
• @ParthaD.: No there is n't. But you may take a look at the diffcoeff package, which has a \dl command and is quite customisable through a set of options, and a config file if you want. – Bernard Feb 17 at 10:39

Oh, you mean not symbol, but operator. There is physics, as stated by @Zarko.

• \differential produces the variants of d: \dd x
• \derivative yields the $df/dx$ in variants: \dv{x}, \dv{f}{x}
• \partialderivative produces the partial symbol in derivaties a la carte, similar to \dv, use \pdv x, etc.
• \variation and \functionalderivative are also there, e.g. \fdv{F}{g}.

It's all in the documentation on pages 5-6, say texdoc physics for the pdf.

Screenshot from the document.