# Help with jsMath

### From SIAG-FM

## Contents |

## What is jsMath?

jsMath is a server-side package that allows mathematical information to be included in web pages written by Davide P. Cervone of Union College. jsMath uses a large subset of TeX to allow simple inclusion of TeX code to be included in websites and be rendered as expected. Unlike traditional TeX or MathML, jsMath requires no work or installation by users to be able to view the rendered information, nor cumbersome server software installations. Any browser that can run JavaScript and has JavaScripting enabled will be able to view the rendered TeX via jsMath.

## Help with jsMath

### Inline Formulas

To use this site's jsMath functions, simply place <jsmath> and <\jsmath> around your TeX code like this:
<jsmath>TeX here!</jsmath>. For example, this code:
```
<jsmath>\left(\, \sum_{k=1}^n a_k b_k \right)^{\!\!2}
\le \left(\, \sum_{k=1}^n a_k^2 \right)
\left(\, \sum_{k=1}^n b_k^2 \right)</jsmath>
```

will, when redered, look like this: \left(\, \sum_{k=1}^n a_k b_k \right)^{\!\!2} \le \left(\, \sum_{k=1}^n a_k^2 \right) \left(\, \sum_{k=1}^n b_k^2 \right). Notice that this jsMath/TeX formula is place *inline* with the other text.

Another way to create a jsmath formula that will ensure the formula will display inline (as opposed to *block-style* described below) is to explicitly set the *format* parameter to *inline* (e.g. <jsmath format="inline">TeX here!</jsmath>). As inline display is the default behavior, this isn't necessary.

### Block-style Formulas

Sometime you'll want to place a formula on its own line and centered, such as this:

In order to do this, use the tags <jsmath **format="block"**> and </jsmath> (emphasis for clarity). By setting the *format* parameter to *block* you ensure the formula will display as above.

## User Configuration

Although jsMath runs without needing any initial configuration, it does allow each user to alter settings to fine tune his or her viewing experience. In the bottom right hand corner of the webpages in this wiki is a small box labeled "jsMath." Left-clicking this box will bring up the configuration window. Please visit http://www.math.union.edu/~dpvc/jsMath/users/help.html for information on configuring jsMath.

## Further Information

For more information, please see the documentation at the jsMath project homepage: http://www.math.union.edu/~dpvc/jsmath/