Skip to content

Commit

Permalink
Rename math command \pdfrac -> \udfrac (and introduce \pdfrac for com…
Browse files Browse the repository at this point in the history
…parison)
  • Loading branch information
henrikt-ma committed Nov 11, 2020
1 parent 7561523 commit db97455
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 4 additions & 4 deletions chapters/functions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down
10 changes: 9 additions & 1 deletion mlsshared.sty
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,22 @@

% 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}%
\else
\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
Expand Down

0 comments on commit db97455

Please sign in to comment.