Rewrite patterns#
- bare
\Trace\Tr
Examples#
Each example shows this rule applied in isolation. A complete normalization profile may make additional changes.
Bare#
Rendering verified with the declared packages.
Scripted bare#
Rendering verified with the declared packages.
Related rules#
Downstream rules#
physics/named-fn-to-operatornameRewrite physics-only named functions to operatorname and expand their auto-sized arguments.
Same family#
ams/operatorname-to-named-functionRewrite plain operatorname arguments to equivalent base named-function or named-operator commands.ams/idotsint-expandExpand idotsint to explicit repeated integral surfaces.base/limits-dropDrop explicit limits from an audited operator while preserving attached scripts.base/nolimits-dropDrop explicit nolimits from an audited operator while preserving attached scripts.physics/cosine-to-cosCollapse a bare cosine helper to the standard cos operator.physics/naturallogarithm-to-lnCollapse a bare natural logarithm helper to the standard ln operator.physics/probability-to-prCollapse a bare Probability helper to the standard Pr operator.physics/sine-to-sinCollapse a bare sine helper to the standard sin operator.physics/trace-to-trCollapse a bare trace with no following argument group to the local tr anchor.physics/named-fn-paren-expandExpand physics power and auto-sized parenthesis arguments of standard named functions.physics/named-fn-to-operatornameRewrite physics-only named functions to operatorname and expand their auto-sized arguments.physics/physics-operator-fence-expandExpand the physics auto-sized argument of exp, det, and Pr into an explicit fence.physics/rank-to-operatorname-rankRewrite rank to an explicit operatorname form instead of a package-local alias.
Notes#
In LaTeX physics.sty 1.3, \Trace is \DeclareMathOperator{\Trace}{Tr}, while \Tr is \opbraces{\Trace}: a following {...}, [...], or (...) becomes an auto-sized fence after \Tr but stays literal after \Trace. Only the bare form is equivalent, so the rule skips \Trace when its next sibling, counted by its script base, is an explicit brace group, [ or (; a \Trace that carries scripts is bare because physics grabs nothing after scripts. In faithful, named-fn-to-operatorname rewrites the skipped branches to \operatorname{Tr} and keeps the delimiters literal. MathJax treats both names as the same Expression, so it renders every branch alike. Touches-only convergence: every Applied removes one bare \Trace; non-matching nodes return Skipped.
Disable this rule#
TransformEngine(profile="corpus", disable_rules=["physics/trace-capital-to-Tr"])new TransformEngine({ profile: 'corpus', disableRules: ['physics/trace-capital-to-Tr'] })