Closed KraXen72 closed 1 year ago
Fractions are supported via the fraction
function.
fraction(1/3) + fraction(1/4) → 7/12
For further information on functions that support fractions, see math.js | Fractions
Is there additional support you'd like to see here?
Think I would suggest closing this now, since its documented now on the README how to use fractions.
Closing as fractions function exists and is now documented (thanks @claremacrae). Feel free to re-open if there is a specific feature you want to see supported.
Likely numerals will not support symbolic math by default (hence the fraction
function) as its primary use is as a numeric calculator. You might want to consider Obsidian Mathpad if you are looking for symbolic math as I believe that may support it natively.
Additionally if you just want to see fractions rendered as fractions, then keep an eye on #7 , which will render them in the input as fractions
Note that with release 0.0.12, TeX rendering of inputs and results has been implemented either by setting the default render style in settings, or by using math-tex
. This will render fractions in a more "fraction-like" format - though you will still need to use fraction()
if you want to force the calculation to not result to a number.
very nice! maybe it could be useful to hide the fraction()
text from the rendered result? it's already pretty useful. (as an option/default ig)
you could differentiate the 2 styles by using \tfrac for the number resulting ones and \dfrac (tall) for fraction()
i would love if i could do calculations with fractions. currently i have to use latex and latex2sympy2, which is nonideal as writing latex is somewhat cumbersome