Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I enable use of math in my html web page

I have a blog where people can post their comments. My problem is that I need to enable people to be able to use math formulas using latex syntax. I cannot make any changes to the server. I can only embed a script in my HTML page. Kindly help.

like image 865
Anonymous Avatar asked Jul 28 '10 17:07

Anonymous


3 Answers

You can use jsMath to solve this problem. It is all client side javascript, but you must reference the jsMath library to use its functions.

like image 110
recursive Avatar answered Sep 28 '22 15:09

recursive


You can use MathJax. Sample Blogger post: MathJax testing

Just add the following script:

<script src="http://www.mathjax.org/MathJax/MathJax.js">
  //
  //  This script call is what gets MathJax loaded and running
  //
  MathJax.Hub.Config({
    // Only needed if to do more configuration within the page
    delayStartupUntil: "onload",
    // input is TeX and output is HTML-CSS 
    jax: ["input/MathML", "input/TeX", "output/HTML-CSS"],    format
    // use the tex2jax preprocessor
    extensions: ["tex2jax.js"],              
    tex2jax: {
      // uncomment to use $...$ for inline math
      inlineMath: [['$','$'], ['\\(','\\)']],
      // set to 1 to allow \$ to produce a dollar sign 
      processEscapes: 1                      
    }
  });
</script>
like image 22
Leftium Avatar answered Sep 28 '22 16:09

Leftium


You can also try the LaTeX 4 Web library, which converts LaTeX code into HTML.

like image 38
nip3o Avatar answered Sep 28 '22 15:09

nip3o