[HOME] jsMath (Authors) [Prev][Up][Skip][Next]

Installation and Testing

The first step to installing jsMath is to download copies of the "jsMath" and "jsMath Image Fonts" packages from the jsMath download page at SourceForge.net. (You may optionally use the "jsMath Sprite Fonts" package either in conjunction with, or in place of, the "jsMath image fonts" package, but see the caveats in the sprite image fonts plugin documentation. It is also possible to use jsMath without any image fonts, if necessary; see the noImageFonts plugin page for details.)

Alternatively, you can obtain jsMath via CVS from the jsMath CVS site at SourceForge.net, where you can also browse the jsMath CVS repository.

The change log provides information about recent changes in jsMath.

Unpack the jsMath and jsMath-image-fonts archives, and place the fonts folder from the second archive into the jsMath folder from the first archive. That is, the fonts folder should be in the same folder as the jsMath.js file.

If you are going to be using jsMath on a web server (as opposed to just locally on your own hard disk), then place the jsMath directory and its contents somewhere convenient on that server. Using a top-level jsMath directory would make it easy to access jsMath from any page on your server, but jsMath can be placed anywhere you wish, as long as it is on the same server as the pages that will use jsMath. (Due to security restrictions within JavaScript, both jsMath and the pages that call it must be obtained from the same server, or at least from a server in the same domain. JsMath will not work properly if it is called from a server outside the domain of the page that uses it. That is not a jsMath restriction; it is a restriction due to the JavaScript security model.)

If you will be using jsMath only locally (i.e., not through a server but just through file: URLs), then you can place jsMath anywhere on your hard disk.


Fonts and jsMath

JsMath comes with six basic TEX fonts installed. These are sufficient for many uses, but some authors may need access to additional symbols, such as those available in the AMS symbols fonts. There are a number of extra fonts available for use with jsMath, and they can be obtained from the extra-fonts download page. Follow the instructions there to make these fonts available in your web pages. You may also find the instructions for adding fonts to jsMath page to be helpful.

When properly installed, users will be able to view these new characters without needing to download anything, but they will have an improved experience if they install the native versions of the fonts on their computers. If a page uses an extra font that they don't have installed, they will receive a message indicating that they might want to download the font for better performance, and will be directed to the font download page. You might also wish to make a link to the font download page on your site somewhere convenient for them (especially if you have disabled the font warning messages, as otherwise the user will have no idea that their experience of your site can be improved).

Note that there are two different types of fonts involved with jsMath: image fonts (directories of images of each character in the font), which are stored on the server, and native jsMath-TeX fonts (.TTF files) that are stored on the user's computer. Users do not need to have copies of the image fonts on their computers, and you don't need to install the jsMath-TeX .TTF files on your server. As long as you have installed the image fonts properly on your server, users will be able to view your mathematics even without installing the jsMath-TeX fonts; however, installing those fonts will improve both the speed at which jsMath will process the mathematics for them, and the quality of both the on-screen and the printed versions of your pages. In addition, with the jsMath-TeX fonts, the mathematics will resize automatically if the user changes the font size in his browser (when image fonts are used, he would have to reload the page after changing the font size in order to have the mathematics displayed at the new size).


Testing jsMath

In the jsMath folder there is a test directory containing an index.html file. Load this file into your browser via the URL to that file on your server (or via a file: URL for the file on your hard disk) to test jsMath. You should see typeset mathematics and a message in green indicating that jsMath is working for you. If you see only TEX code and a red warning message that jsMath is not installed properly, then there is a problem with your installation. Some things to check include:

If you get the "jsMath appears to be working" message, then follow the link at the bottom of the page to test jsMath's image mode. If both these pages display properly, you should be in business.



Get jsMath at SourceForge.net. Fast, secure and Free Open Source software downloads [HOME] jsMath web pages
Created: 21 Mar 2007
Last modified: Mar 28, 2010 3:10:30 PM
Comments to: dpvc@union.edu
[Next] Getting Started with jsMath
[Skip] Browser Support for jsMath
[Up] Information for jsMath Authors
[Prev] Overview of jsMath