views:

117

answers:

5

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.

+4  A: 

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.

recursive
There's also MathJax, which seems to be shaping up as the successor to jsMath.
Jim Lewis
I can't install in the server.
Anonymous
You can link to it from any accessible location. The library doesn't necessarily need to be on the same server.
recursive
A: 

you could use this script i guess: http://eric.chopin.pagesperso-orange.fr/latex/latex4web.htm

Christian Smorra
A: 

I searched for "javascript latex" and found:

I'd suggest trying one of these, or finding another.

no
+1  A: 

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

nico
I tried it and it's very limited.
Artefacto
+2  A: 

You can use MathJax. Sample Blogger post: MathJax testing

Just add the following script:

<script src="http://www.mathjax.org/MathJax/MathJax.js"&gt;
  //
  //  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>
Leftium