2
votes

I would like to ask on how to display a math-text in a kivy app..? For example : How to do the same thing as $ \frac{1}{2} $ or $ 2^{3} $ does in LaTeX (omitting the font type, as long as it is math-readable).

I know that in matplotlib.pyplot module, I can use string : r'$ \frac{1}{2} $' or r'$ 2^{3} $' to produce a math-text. But this does not produce the desired result in kivy :

Label(text = r'$\frac{1}{2}$' ) will reproduce $\frac{1}{2}$.

Thanks.

1

1 Answers

2
votes

Please Take a look at the sympy module, then in your label you must use a font_name that can display math-text

but If you want to use Latex formula then you have to find a font_name that can display those formula like you want

Update: Otherwise you can generate your Latex in a png then integrate it in your kivy app