flashburn
flashburn

Reputation: 4508

formulas on the webpage without using HTML tables

I have a set for formulas that I need to display on the webpage. The values in them are not fixed, but presented in a text input. Right now I'm using tables to represent these formulas (fractions. Example image is at the bottom of post). I was looking for a library that would allow me to do it, but didn't find one. Can someone demonstrate how this can be achieved without tables? Can I do this with Bootstrap/JQuery/JavaScript/CSS/Some other library?

Any help is appreciated.

enter image description here

Upvotes: 0

Views: 61

Answers (1)

Alec K
Alec K

Reputation: 159

Agreed with wolfson, MathJax seems like it would work for you, I'm not certain if it works with HTML inputs as you have above.

The "official" answer (as supported by the HTML and CSS governing bodies) is MathML.

There are also texmath and LaTexMathML which are designed to be similar to Latex syntax, so if you're familiar with Latex equations these may be the best option. A number of these solutions require having control over the webserver that's hosting the page, which may not be possible/appropriate depending on your circumstances. If you are dead-set on not using tables these could all work, though I see no reason why dynamically resized/re-positioned input boxes done using JavaScript couldn't also suffice, but this would likely be a lot more work and less replicatable.

References: tex.stackexchange.com

Upvotes: 1

Related Questions