JsMath
Jump to navigation
Jump to search
This page is dedicated to jsMath, a javascript that allows to render LaTeX formula enclosed in $...$
.
Install
Reference instructions:
Server Side
- Install jsmath main package.
- Install extra fonts package for fonts msam10 and msbm10 (these fonts are required for extension AMSsymbols, which is frequently used).
- The packages are found here. To install them, create a directory fonts in jsmath directory, and unzip them there, i.e. you should end up with 2 directories named ./jsmath/fonts/msam10 and ./jsmath/fonts/msbm10.
Client Side
- Install the standard fonts.
- On Windows, the fonts are in package called TeX-fonts-25.zip (from this page).
- On Linux, due to FireFox issue since v3.6, use the package TeX-fonts-linux.tgz (from this page).
- Install the extra fonts msam10 and msbm10 (from here), and install them on your system.
Troubleshoot
- I get the error message "unknown control sequence \msbm" when using
\mathbb{...}
(blackboard bold).
- Most probably this is because jsmath cannot find the font definition file at ./jsmath/fonts/msbm10/def.js on the server side (see [1]).
\mathbb
uses the fonts msbm, and to work properly, the author package msbm10.zip (see here) must be unzipped in directory ./jsmath/fonts/. Also for best rendering the msbm10 truetype font should be installed on the client side.
Examples
Some text before <math>\textstyle{a_i^e}</math> and after
Some text before <math>\displaystyle{a_i^e}</math> and after
Some text before a_i^e and after
Some text before
a_i^e
and after
<math>\textstyle{ \frac{ \sum_{i=1}^n(x_i-\overline x) (y_i-\overline y) }{\left[ \sum_{i=1}^n(x_i-\overline x)^2 \sum_{i=1}^n(y_i-\overline y)^2 \right]^{1/2} } }</math>
<math>\displaystyle{ \frac{ \sum_{i=1}^n(x_i-\overline x) (y_i-\overline y) }{\left[ \sum_{i=1}^n(x_i-\overline x)^2 \sum_{i=1}^n(y_i-\overline y)^2 \right]^{1/2} } }</math>