# JSTeX

## About

JSTeX is a work in progress. The idea is to allow correctly formatted mathematical equations in your webpages without the need for readers to install plugins. Also there's no need for the webpage owner to install something on their server, and no need to use hard to update image files, for instance those made with LaTeX2HTML. All that is required is the JavaScript source file and the stylesheet be linked to between the <head> tags on your page using the following code:

Then simply write your LaTeX code inside a <span>, <div> or some other HTML tag, and supply the tag with the attribute class="JSTeX", e.g.,

## Some examples

We may have inline equations, e.g., e^{i\pi}+1=0, by using a <span> tag. We may also have displayed equations by using a <div> tag, like this

\sum_{n=0}^\infty\frac{1}{n^2}=\frac{\pi^2}{6}
\int_{0}^\infty e^{-x}dx=1

Formulae also degrade nicely to LaTeX source code in the event JavaScript is switched off. For instance, assuming you have JavaScript switched on the equation below will be correctly formatted:

R_{ab} - \frac{1}{2}g_{ab}R = 8\pi T_{ab}

However, with JavaScript switched off we would get:

R_{ab} - \frac{1}{2}g_{ab}R = 8\pi T_{ab}

Which is still understandable to those who know LaTeX.

## Known issues

There are many aspects to JSTeX which need further work. For one it is still missing an understanding of many of LaTeX's commands, this takes time as LaTeX is extensive. Further, there are still issues with the formatting, in particular with fractions. For example, the numerator and denominator are currently left justified, rather than centred and the fraction line's length is not determined. This can look very wrong, e.g.,

\frac{1}{1000000}

Also I haven't yet decided how to do delimiters, so nested brackets and brackets around tall equations will look wrong, e.g.,

((\frac{1}{2}+1)\frac{1}{2}+1)\frac{1}{2}+1 = \frac{15}{8}