First things first, how might you show a quadratic formula?!?
r-equation wraps Katex in a web component.
You can inspect the component and try writing a new equation to the
Updating the Math
To dynamically update the equation there are two ways: (1) you can as usual set the
:math property; or (2) you can use the equation in conjunction with
In the example below we are expanding a Taylor Series which uses the
:math property to index into an array when you drag a range.
Drag me to expand the Taylor Series:
Use visible and display
In the example below, we will take some care to make sure that we show the right equation.
For example, try seeing what happens in the equation when
Here we are just directly writing
<r-display> directly inside of the equation tags.
This works by ensuring that the formatted output of a display is included in the inner-html
textContent of the element for what to render to Katex.
You can use either approach,
:math or inner
r-display's, however, it is
Made with love by iooxa
Last updated July 10th, 2020