diff --git a/chapters/functions.tex b/chapters/functions.tex index 79451cfc4..8e787c8ef 100644 --- a/chapters/functions.tex +++ b/chapters/functions.tex @@ -1334,11 +1334,11 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati \begin{align*} (\ldots,\, y(t),\, \ldots) &= \text{\lstinline!foo0!}(\ldots,\, x(t),\, b,\ldots) \intertext{implies that:} -(\ldots,\, \pdfrac{y(t)}{t},\, \ldots) &= -\text{\lstinline!foo1!}(\ldots,\, x(t),\, b,\, \ldots,\, \ldots,\, \pdfrac{x(t)}{t},\, \ldots) +(\ldots,\, \udfrac{y(t)}{t},\, \ldots) &= +\text{\lstinline!foo1!}(\ldots,\, x(t),\, b,\, \ldots,\, \ldots,\, \udfrac{x(t)}{t},\, \ldots) \\ -(\ldots,\, \pdfrac[2]{y(t)}{t},\, \ldots) &= -\text{\lstinline!foo2!}(\ldots,\, x(t),\, b,\, \ldots,\, \pdfrac{x(t)}{t},\, \ldots,\, \ldots,\, \pdfrac[2]{x(t)}{t},\, \ldots) +(\ldots,\, \udfrac[2]{y(t)}{t},\, \ldots) &= +\text{\lstinline!foo2!}(\ldots,\, x(t),\, b,\, \ldots,\, \udfrac{x(t)}{t},\, \ldots,\, \ldots,\, \udfrac[2]{x(t)}{t},\, \ldots) \end{align*} \end{example} diff --git a/mlsshared.sty b/mlsshared.sty index 927c4f618..c7e098ca6 100644 --- a/mlsshared.sty +++ b/mlsshared.sty @@ -157,7 +157,7 @@ % Misc math \newcommand{\ud}{\mathrm{d}} -\newcommand{\pdfrac}[3][\@nil]{% +\newcommand{\udfrac}[3][\@nil]{% \def\tmp{#1}% \ifx\tmp\@nnil \frac{\ud#2}{\ud#3}% @@ -165,6 +165,14 @@ \frac{\ud^{#1}#2}{\ud#3^{#1}}% \fi% } +\newcommand{\pdfrac}[3][\@nil]{% + \def\tmp{#1}% + \ifx\tmp\@nnil + \frac{\partial#2}{\partial#3}% + \else + \frac{\partial^{#1}#2}{\partial#3^{#1}}% + \fi% +} \newcommand{\abs}[1]{\left\lvert #1{} \right\rvert} % Text mode additions