Rewrite Rulesphysics/dv-to-frac-d

physics/dv-to-frac-d

Expand dv forms to explicit d-based derivative fractions.

Rewrite patterns#

  1. dv-two-argument\dv{#1}{#2}\frac{\mathrm{d} #1}{\mathrm{d} #2}
  2. dv-operator\dv{#1}\frac{\mathrm{d}}{\mathrm{d} #1}
  3. dv-order\dv[#1]{#2}{#3}\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}
  4. dv-star\dv*{#1}{#2}\flatfrac{\mathrm{d} #1}{\mathrm{d} #2}

Examples#

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

dv kinematics#

Before

m\dv{x}{t}=p

After this rule

m\frac{\mathrm{d} x}{\mathrm{d} t}=p

Rendering verified with the declared packages.

dv operator form#

Before

\dv{x} f

After this rule

\frac{\mathrm{d}}{\mathrm{d} x} f

Rendering verified with the declared packages.

dv second order#

Before

\dv[2]{x}{t}

After this rule

\frac{\mathrm{d}^{2} x}{\mathrm{d} t^{2}}

Rendering verified with the declared packages.

dv star flatfrac#

Before

\dv*{x}{t}

After this rule

\flatfrac{\mathrm{d} x}{\mathrm{d} t}

Rendering verified with the declared packages.

Upstream rules#

Same family#

Notes#

Covers the two-argument derivative, one-argument operator form, optional [n] order, and star branch. The star branch follows MathJax physics by expanding to \flatfrac rather than \frac.

Disable this rule#

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

Open in Playground