JsMath: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 21: | Line 21: | ||
* '''I get the error message <tt>"unknown control sequence \msbm"</tt> when using <code>\mathbb{...}</code> (blackboard bold).''' |
* '''I get the error message <tt>"unknown control sequence \msbm"</tt> when using <code>\mathbb{...}</code> (blackboard bold).''' |
||
: Most probably this is because jsmath cannot find the font definition file at <tt>./jsmath/fonts/msbm10/def.js</tt> on the server side (see [http://sourceforge.net/projects/jsmath/forums/forum/592273/topic/2704307]). <code>\mathbb</code> uses the fonts '''msbm''', and to work properly, the author package <tt>msbm10.zip</tt> (see [http://www.math.union.edu/~dpvc/jsMath/download/extra-fonts/welcome.html here]) must be unzipped in directory <tt>./jsmath/fonts/</tt>. Also for best rendering the '''msbm10''' truetype font should be installed on the client side. |
: Most probably this is because jsmath cannot find the font definition file at <tt>./jsmath/fonts/msbm10/def.js</tt> on the server side (see [http://sourceforge.net/projects/jsmath/forums/forum/592273/topic/2704307]). <code>\mathbb</code> uses the fonts '''msbm''', and to work properly, the author package <tt>msbm10.zip</tt> (see [http://www.math.union.edu/~dpvc/jsMath/download/extra-fonts/welcome.html here]) must be unzipped in directory <tt>./jsmath/fonts/</tt>. 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<br/> |
|||
Some text before <math>\displaystyle{a_i^e}</math> and after<br/> |
|||
Some text before <span class="math">a_i^e</span> and after<br/> |
|||
Some text before <div class="math">a_i^e</div> and after<br/> |
|||
<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> |
Revision as of 21:36, 5 January 2010
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>