2

I recently started using the diffcoeff package for writing derivatives, and I came across the following issue, which I don't know how to solve.

By following the syntax presented in the package, I wanted to write:

enter image description here

However, the output that I got was:

enter image description here

Below you will find three examples, two of which follow the syntax in the package (they produce the wrong output).

\documentclass[10pt, a4paper]{article}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}     

\usepackage[ISO]{diffcoeff}
\usepackage{amsmath}                
\usepackage{amssymb}                

\begin{document}
Wrong output \#1:
    \begin{equation}
    \diffp*{\diff{x^\mu}{\lambda}}{x^\sigma}.
    \end{equation}

Wrong output \#2:
    \begin{equation}
    \diffp*{\frac{\dl x^\mu}{\dl \lambda}}{x^\sigma}.
    \end{equation}

Right output:
    \begin{equation}
    \diffp{}{x^\sigma}\diff{x^\mu}{\lambda}.
    \end{equation}
\end{document}

Can anybody tell me why the ordinary derivative becomes a partial derivative when placed inside \diffp{}{}, and maybe also how to prevent this?

1
  • 1
    Welcome to tex.sx. Commented Dec 23, 2019 at 13:24

1 Answer 1

0

I see no easy way out.

You can define a variant, though:

\documentclass[10pt, a4paper]{article}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}

\usepackage[ISO]{diffcoeff}
\usepackage{amsmath}
\usepackage{amssymb}

\diffdef{n}{op-symbol=\mathrm{d}}

\begin{document}

\begin{equation}
\diffp*{\diff.n.{x^\mu}{\lambda}}{x^\sigma}.
\end{equation}

\end{document}

enter image description here

2
  • Exactly what I was looking for! Thank you very much. I just wasn't a fan of leaving empty brackets to get the right output, so this becomes very handy. :-)
    – pjHart1000
    Commented Dec 23, 2019 at 14:24
  • I have found the source of the problem (thanks egreg for the hint in your answer) and have amended the code in diffcoeff. I need to make a few adjustments to the documentation but will do that tomorrow and will then upload to CTAN. Commented Dec 27, 2019 at 10:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .