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.
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.
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>
You can also try the LaTeX 4 Web library, which converts LaTeX code into HTML.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With