Format string to print square root, exponent

Asked

Viewed 52 times

-1

Hey, there, you guys! would like to know how to print on the screen, a formatted string that shows the symbols of square, exponent and other mathematical symbols?

It would go something like this:

x 2+qrt(9)...

only with the correct symbols. I know there is a lib called Mathjax, but when the internet is not very good, there is a delay for the exchange of symbols. There is another option?

1 answer

0


It is possible to use some plugins, one of which I like to use would be the Mathjax, would just read the documentation and see how each expression needs to be called to generate an equation.

<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>

<p>Basta chamar a TAG 'p' e passar a expressão codificado</p>
<p>
  \[x = {-b \pm \sqrt{b^2-4ac} \over 2a}.\]
</p>

Reference: Mathjax

Browser other questions tagged

You are not signed in. Login or sign up in order to post.