cortexjs.io icon indicating copy to clipboard operation
cortexjs.io copied to clipboard

frac{12}

Open primayanuaristya opened this issue 1 year ago • 3 comments

Why if math field \frac{1}{2} return \frac12? If \sqrt{\frac{1}{2}} return \sqrt{\frac{12}}

primayanuaristya avatar Sep 15 '23 16:09 primayanuaristya

Screenshot_2023-09-15-23-24-07-216_com android chrome

Only single numerator or denumerator

primayanuaristya avatar Sep 15 '23 16:09 primayanuaristya

In LaTeX, some commands can have "single-token arguments", including \frac and \sqrt. This means that \frac12 is identical to \frac{1}{2} and \sqrt2 is identical to \sqrt{2}. Wether to use single-token variants or not is a style preference. The MathLive serializer uses the shorthand version when the numerator and denominator are both single digits.

arnog avatar Sep 15 '23 18:09 arnog

In LaTeX, some commands can have "single-token arguments", including \frac and \sqrt. This means that \frac12 is identical to \frac{1}{2} and \sqrt2 is identical to \sqrt{2}. Wether to use single-token variants or not is a style preference. The MathLive serializer uses the shorthand version when the numerator and denominator are both single digits.

how make single with {} for example \sqrt{4} not \sqrt4 withouth regex?

primayanuaristya avatar Sep 15 '23 18:09 primayanuaristya