Rewrite Rulesphysics/pdv-to-frac-partial

physics/pdv-to-frac-partial

Expand pdv forms to explicit partial-derivative fractions.

Rewrite patterns#

  1. pdv-two-argument\pdv{#1}{#2}\frac{\partial #1}{\partial #2}
  2. pdv-operator\pdv{#1}\frac{\partial}{\partial #1}
  3. pdv-order\pdv[#1]{#2}{#3}\frac{\partial^{#1} #2}{\partial #3^{#1}}
  4. pdv-mixed-partial\pdv{#1}{#2}{#3}\frac{\partial^{2} #1}{\partial #2 \partial #3}
  5. pdv-star\pdv*{#1}{#2}\flatfrac{\partial #1}{\partial #2}

Examples#

Each example shows this rule applied in isolation. A complete normalization profile may make additional changes.

pdv embedded#

Before

\lambda=\pdv{f}{x}

After this rule

\lambda=\frac{\partial f}{\partial x}

Rendering verified with the declared packages.

pdv operator form#

Before

\pdv{x} f

After this rule

\frac{\partial}{\partial x} f

Rendering verified with the declared packages.

pdv second order#

Before

\pdv[2]{f}{x}

After this rule

\frac{\partial^{2} f}{\partial x^{2}}

Rendering verified with the declared packages.

pdv mixed partial#

Before

\pdv{f}{x}{y}

After this rule

\frac{\partial^{2} f}{\partial x \partial y}

Rendering verified with the declared packages.

pdv star flatfrac#

Before

\pdv*{f}{x}

After this rule

\flatfrac{\partial f}{\partial x}

Rendering verified with the declared packages.

Upstream rules#

Same family#

Notes#

Covers the two-argument partial derivative, one-argument operator form, optional [n] order, mixed partial third braced group, and star branch. For MathJax physics, a third braced group makes the numerator order depend on the number of denominator variables and ignores the optional [n] order; that combined form is intentionally not represented as a separate rewrite pattern here.

Disable this rule#

TransformEngine(profile="corpus", disable_rules=["physics/pdv-to-frac-partial"])
new TransformEngine({ profile: 'corpus', disableRules: ['physics/pdv-to-frac-partial'] })

Open in Playground