If you wish to write web pages that use jsMath to display mathematics, you will need to download the jsMath package to your web server so that you can use it with your web pages. See the authors information page for more details on how to use jsMath within your web pages. JsMath is distributed under the Apache License 2.0.
(for web-page authors)
JsMath is now available from the jsMath download page at SourceForge.net. You will need to obtain both the "jsMath" and "jsMath Image Fonts" pacakges from the download site. (You may optionally use the "jsMath Sprite Fonts" package either in conjunciton with, or in place of, the "jsMath image fonts" package, but see the caveates in the sprite image fonts plugin documentation.)
Alternatively, you can obtain jsMath via CVS from the jsMath CVS site at SourceForge.net, where you can also browse the jsMath CVS repsoritory.
The change log provides information about recent changes in jsMath.
To install jsMath on your server, download and unpack the two archives described above, and move the files and folders they contain into a folder called
jsMathsomewhere on your web server.
The "jsMath" archive should include the files
blank.gif jsMath-BaKoMa-fonts.js jsMath-autoload.html jsMath-controls.html jsMath-easy-load.js jsMath-fallback-mac-mozilla.js jsMath-fallback-mac-msie.js jsMath-fallback-mac.js jsMath-fallback-pc.js jsMath-fallback-symbols.js jsMath-fallback-unix.js jsMath-global-controls.html jsMath-global.html jsMath-loader-omniweb4.js jsMath-loader.html jsMath-msie-mac.js jsMath-old-browsers.js jsMath.js uncompressed/ def.js font.js jsMath-fallback-mac.js jsMath-fallback-pc.js jsMath-fallback-symbols.js jsMath-fallback-unix.js jsMath.js easy/ load.js plugins/ autoload.js CHMmode.js global.js mimeTeX.js noCache.js noGlobal.js noImageFonts.js spriteImageFonts.js tex2math.js extensions/ AMSmath.js AMSsymbols.js bbox.js boldsymbol.js double-click.js fbox.js HTML.js leaders.js mathchoice.js mimeTeX.js moreArrows.js newcommand.js underset-overset.js test/ index.html index-images.html jsMath40.jpg sample.html COPYING.TXT
which are required by the jsMath package. (Note that you must keep all these files, no matter what platform you are using, since jsMath must be able to send the right file for your reader's browser. The
uncompresseddirectory can be discarded if you wish to conserve space.)
The "jsMath Image Fonts" archive contains image files (in a variety of sizes) that are used when someone who doesn't have the TeX fonts installed views your page. The images are stored in subdirectories of the
fontsfolder contained in the archive; you should move that to the
jsMathfolder on your server (along with the files listed above). The reason there are two archives is that the fonts are unlikely to change, so there is no need to download them each time jsMath is updated.
The image fonts comprise thousands of small image files (one for each character in each font in each size), and although the files are quite small, they can take up a lot of space. Most filing systems have a minimum file size, and any file will consume at least that much space, even if it contains only a few bytes of data. On a system with a 4K minimum file size, these fonts can take up as much as 80MB when unpacked.
The spriteImageFonts plugin attempts to alleviate this problem by using single files for the entire font (and showing only small parts of it at a time). The third (optional) archive contains the files needed for these sprite-based fonts. You can use them in place of the standard image fonts to significantly reduce the amount of space and the number of files needed on the server. If you choose to use the sprite image fonts, you do not need to download the standard image fonts (though both can be present on the server without interfering with each other). See the spriteImageFonts author's page, however, for some important issues concerning the sprite-based fonts.
It is possible to install jsMath without any image fonts if you need to conserve disk space, or if you are unable to move such a large number of files to your server. See the instructions for using jsMath without image fonts for more details. Note, however, that this will limit the fallback modes available to your users, and they will be forced to use the less-reliable, lower-quality, slower unicode fallback mode of they don't have the TeX fonts installed. If you have disabled the font warning message as well, then they won't even know that a better experience is available to them.
The Compressed Definition Files
jsMath/fonts/cm-fonts/plain/def.jsare 112K files, but the compression algorithm used in version 3.1 and later of jsMath brings this down to about 80K. Using the compressed versions speeds up the downloading of this file, which is used by the image fallback methods, so replacing the uncompressed version with the compressed one should improve the performance of jsMath for users without the TeX fonts. The compressed version is included in version 1.3 of the jsMath Image Fonts archive (it is the only change from version 1.2), but if you would prefer not to download and unpack the entire archive, you can download just the
def.jsfile. Replace both the
plain/def.jsfiles on your server by copies of the one linked here (the two files are identical).
Upgrading from Version 2.x
For most authors, updating to version 3.x of jsMath should be as simple as just replacing the old version with the new one (unpack the new archive, move the
fontsdirectory from your old version to the new one, and replace the old directory with the new one). If you have used the more advanced features of jsMath, you should be aware that there are some timing differences with version 3.x as compared to version 2.x and below. Read the change log and the author's documentation, particularly the synchronization page, for more details.
Once you update, you should be sure to flush the cache on your browser before loading a page that uses jsMath (forcing the page to reload may not be sufficient). If your server has a file cache, you may need to reset it as well (sometimes restarting the server will do that). If you do not have permission to restart the server or flush its cache, you might be able to accomplish the needed effect by setting the modification dates on all the new jsMath files to the current time (so that the server will think they are newer than the cached versions and refresh the cache when these files are requested). On unix systems, this can be accomplished using the "
touch" command (see the man page for details).
Additional ResourcesSome additional fonts and the support files needed for them are available from the extra fonts page.
Old versions of jsMath can be obtained from the jsMath archive.
See the documentation for authors page for more information about how to use jsMath within your web pages.
See the jsMath page @ SourceForge.net for more resources, including the Bug tracker and user forums.