Fractions and roots\cfrac

\cfracCommand

Used for continued fractions, with an optional alignment selector for the numerator and denominator within the fraction.

\cfrac{1}{2}
Available in
ams
Kind
prefix
Allowed mode
math
Frequency
0.04% of corpus formulasrank 134 of 263
Commonality
low
Renderer support
PackageMathJaxKaTeXXeTeX
amsMathJax: FullKaTeX: FullXeTeX: Full
About the test scope

Syntax#

\cfraco:N[\cs]optional control sequencem{a}math contentm{b}math content

Argspec o:N m m — one optional and two mandatory arguments. Reading argspecs

Examples#

\cfrac[l]{1}{2}
\cfrac[r]{1}{2}

In TeXForm#

TeXForm parses this entry as prefix syntax; the package determines its argument specification.

ams/cfrac-to-fracfrom Equivmath

Drop continued-fraction styling from centered AMS cfrac forms.

\cfrac{#1}{#2} \frac{#1}{#2}

Equivalent forms#

  • \frac{#2}{#3}approximate

    \cfrac adds struts and adjusts textstyle spacing appropriate for continued fractions, while \frac obeys the current surrounding style

Test cases#

ams
InputCaseMathJaxKaTeXXeTeX
\cfrac{a}{b}Positive · ctx:basicPassPassPass
\cfrac[l]{a}{b}Positive · ctx:align-leftPassPassPass
\cfrac[r]{a}{b}Positive · ctx:align-rightPassPassPass
All 21 in Fractions and roots