# Using Javascript's math.js library to produce output with Latex on Wix website

**URL:** <https://forum.wixstudio.com/t/using-javascripts-math-js-library-to-produce-output-with-latex-on-wix-website/182>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [May 2, 2022, 2:16pm UTC](https://forum.wixstudio.com/t/using-javascripts-math-js-library-to-produce-output-with-latex-on-wix-website/182 "2022-05-02T14:16:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![m\_wellnitz](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/m_wellnitz/32/30721_2.png) [@m\_wellnitz](https://forum.wixstudio.com/u/m_wellnitz)\
**Post date:** [May 2, 2022, 2:16pm UTC](https://forum.wixstudio.com/t/using-javascripts-math-js-library-to-produce-output-with-latex-on-wix-website/182/1 "2022-05-02T14:16:35Z")

</div>

I am able to produce static Latex text on a Wix website by putting something like

```javascript
<p><span class="math inline">\(\frac{22}{7}\)</span></p>

```

into an embedded HTML container on a Wix website which produces the fraction 22/7 in nice format. I am also able to do mathematical calculations in Javascript using the math.js library, even taking input from an inputfield on the website.

I cannot, however, combine these things: As an example, imagine I have two inputfields on a website. I want to take the two input numbers, say a and b, and calculate (a - b)/(a+b) and show the result, using Latex, in an HTML container or a textfield. How can I do that?

Thank you very much in advance for your help.  
Malte
