Rewrite patterns#
- default-alignment
\cfrac{#1}{#2}\frac{#1}{#2} - empty-alignment
\cfrac[]{#1}{#2}\frac{#1}{#2}
Examples#
Each example shows this rule applied in isolation. A complete normalization profile may make additional changes.
Default alignment#
The rendered result has pixel differences from the input.
Empty alignment#
The rendered result has pixel differences from the input.
Left alignment preserved#
Rendering verified with the declared packages.
Right alignment preserved#
Rendering verified with the declared packages.
Related rules#
Same family#
ams/dbinom-and-tbinom-to-binomRewrite AMS display-style and text-style binomial commands to binom.ams/dfrac-to-fracRewrite the AMS display-style fraction command to frac.ams/tfrac-to-fracRewrite the AMS text-style fraction command to frac.base/above-to-genfracRewrite above to a thickness-preserving genfrac form.base/abovewithdelims-to-genfracRewrite abovewithdelims to an explicit genfrac with delimiters and thickness.base/atop-to-genfracRewrite infix atop to an explicit no-rule genfrac form.base/atopwithdelims-to-genfracRewrite atopwithdelims to an explicit delimited no-rule genfrac form.base/brace-to-genfracRewrite infix brace to an explicit genfrac with brace delimiters.base/brack-to-genfracRewrite infix brack to an explicit genfrac with bracket delimiters.base/choose-to-binomRewrite infix choose to an explicit binom command.base/over-to-fracRewrite infix over to an explicit frac command.base/overwithdelims-to-genfracRewrite overwithdelims to an explicit genfrac with delimiters.base/root-of-to-sqrtRewrite legacy root-of syntax to bracketed sqrt notation.base/leftroot-dropDrop the leftroot index-position hint in cleanup-oriented normalization.base/uproot-dropDrop the uproot index-position hint in cleanup-oriented normalization.
Notes#
MathJax gives cfrac numerator and denominator explicit struts and textstyle. Only an absent or empty optional alignment is centered and eligible for this projection. The l and r branches carry numerator and denominator alignment and remain unchanged; any other optional value also fails closed. Because the matcher is conditional, cmd:cfrac is touched rather than globally eliminated. Dropping continued-fraction sizing and struts can materially weaken the visible hierarchy even though the mathematical fraction remains, so the rule is Equiv with Math fidelity. Every Applied result replaces one eligible cmd:cfrac node with cmd:frac; aligned and otherwise ineligible branches return Skipped, so the number of eligible cmd:cfrac nodes strictly decreases.
Disable this rule#
TransformEngine(profile="corpus", disable_rules=["ams/cfrac-to-frac"])new TransformEngine({ profile: 'corpus', disableRules: ['ams/cfrac-to-frac'] })