Rewrite Rulesphysics/partial-derivative-to-pdv

physics/partial-derivative-to-pdv

Collapse long partial derivative names to the pdv command.

Rewrite patterns#

  1. partialderivative-two-args\partialderivative{#1}{#2}\pdv{#1}{#2}
  2. partialderivative-star\partialderivative*{#1}{#2}\pdv*{#1}{#2}
  3. partialderivative-order\partialderivative[#1]{#2}{#3}\pdv[#1]{#2}{#3}
  4. partialderivative-single-arg\partialderivative{#1}\pdv{#1}
  5. partialderivative-three-args\partialderivative{#1}{#2}{#3}\pdv{#1}{#2}{#3}
  6. pderivative-two-args\pderivative{#1}{#2}\pdv{#1}{#2}
  7. pderivative-star\pderivative*{#1}{#2}\pdv*{#1}{#2}
  8. pderivative-order\pderivative[#1]{#2}{#3}\pdv[#1]{#2}{#3}
  9. pderivative-single-arg\pderivative{#1}\pdv{#1}
  10. pderivative-three-args\pderivative{#1}{#2}{#3}\pdv{#1}{#2}{#3}

Examples#

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

pdv alias jacobian entry#

Before

J=\pderivative{f}{x}+\pderivative{g}{y}

After this rule

J=\pdv{f}{x}+\pdv{g}{y}

Rendering verified with the declared packages.

partialderivative long alias#

Before

\partialderivative{T}{z}=0

After this rule

\pdv{T}{z}=0

Rendering verified with the declared packages.

partialderivative star alias#

Before

\partialderivative*{f}{x}

After this rule

\pdv*{f}{x}

Rendering verified with the declared packages.

partialderivative order alias#

Before

\partialderivative[n]{f}{x}

After this rule

\pdv[n]{f}{x}

Rendering verified with the declared packages.

partialderivative single arg alias#

Before

\partialderivative{x} f(x,y)

After this rule

\pdv{x} f(x,y)

Rendering verified with the declared packages.

partialderivative mixed alias#

Before

\partialderivative{f}{x}{y}

After this rule

\pdv{f}{x}{y}

Rendering verified with the declared packages.

Remaining 4 examples#

Listed as LaTeX source. Hover over, focus, or tap a row to preview the rendering before and after. Each renders the same as its input with the declared packages.

ExampleBeforeAfter this rule
pderivative star alias\pderivative*{f}{x}\pdv*{f}{x}
pderivative order alias\pderivative[n]{f}{x}\pdv[n]{f}{x}
pderivative single arg alias\pderivative{x} f(x,y)\pdv{x} f(x,y)
pderivative mixed alias\pderivative{f}{x}{y}\pdv{f}{x}{y}

Downstream rules#

Same family#

Notes#

Alias rewrite: partialderivative, pderivative, and pdv share the same physics Derivative handler and argspec, so star, optional order, one-argument, and mixed-partial forms are preserved by renaming the command. The optional order branch is intentionally represented with two braced arguments because MathJax ignores that order when more derivative variables are supplied.

Disable this rule#

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

Open in Playground