New Installation : Latex on Blogger/Blogspot
This is the updated procedure of how to install latex on your Blogger.
What’s New?
- The script located in a more stable location (in google server) rather than using watchmath.com server (which sometimes down for some unknown reason).
- New script, adapting the preference of either using \textstyle of \displaystyle as the default mode.
- More flexibility. Customization on default size, color, adding latex packages and defining new commands.
How To Install
Use the instruction here, but in step one copy and use instead the following script.
<script src="http://latexonblogger.googlegroups.com/web/mathtex3.js?hl=en&gda=R9ZVlD4AAABbAsbN4i7hi2ZFNZpVWCi9LFztQtuc529xoR6FBh351sAOXLBpscdVgFPClVlUxUzjsKXVs-X7bdXZc5buSfmx" type="text/javascript"></script> <script type="text/javascript">window.mathPreamble = '\\newcommand{\\RR}{\\mathbb{R}}\\usepackage[usenames]{color}\\color{} \\gammacorrection{1.3}\\png \\normal ';replaceMath( document.body );</script> <center> <a href="http://www.watchmath.com"> <img alt="" src="http://www.watchmath.com/images/formula.png" width="100"></a> <br> <a href="http://watchmath.com/vlog/?p=1244"> Install LaTeX?</a></center>
Usage
- Use $\LaTeX$ in order to get an inline math in \textstyle mode. For example if you type $\sum_{i=1}^nx_i$ (in blogger) you get
. - Use $$\LaTeX $$ to gen an inline math in \displaystyle mode. For example if you type $$\sum_{i=1}^nx_i$$ (in blogger) you get
. - Use \[\LaTeX\] to get a math symbol written in a new line and aligned center. For example if you type \[\sum_{i=1}^nx_i\] (in blogger) you get
.
Customization
Modify
window.mathPreamble = '\\newcommand{\\RR}{\\mathbb{R}}\\usepackage[usenames]{color}\\color{} \\gammacorrection{1}\\png \\normal ';
in the script above. All extra command will be written inside the quotation marks.
- Color: To change the default color, replace \\color{} by \\color{colorname} where colorname is one of the entries in the following table

- Size: by default the latex output is in normal size. To change the default size, change \\normal by one of the following: \\tiny, \\scriptsize,\\large,\\Large,\\huge.
- Latex Package: by default the package \\usepackage[usenames]{color} is included. You can add more package by adding \\usepackage{packagename}. To test whether a particular package is supported, type \usepackage{packagename} (use only one backslash this time) in an inline command. For example, fancybox package is supported by mathtex because if you type $\usepackage{fancybox}\shadowbox{This is fancy}$ you will get
. Here is a list of package that I know work with mathtex: xypic, calrsfs, calligra, fancybox,epic,eepic(?). Let me know if you find another package that works with mathtex. - Newcommand: we have included an example how to define a new command in the script above. We use \\newcommand{\\RR}{\\mathbb{R}} to define a command \RR. Typing $\RR$ (in blogger) will give you the same result as typing $\mathbb{R}$, i.e., you get
. - Darkness: \\gammacorrection{1.3} controls the darkness of the output. Do experiments to get the best result by changing 1.3 into any number you like.
Demo?
22 Responses to “New Installation : Latex on Blogger/Blogspot”
-
[...] tired of rewritting the same posts again and again due to the problems with the external services that work with blogger, so I decided to make some changes in order to [...]
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=0124ad48-ba6b-4db3-947d-18231f9ce668)
Sounds like big improvements. Thank you!
The problem is that it doesn’t work anymore at all, whether with the new or the old code…
Cheers,
Maxime.
Yes it does not work anymore. Please help to restore the old service.
Definitely down… hope you are able to restore this soon.
My blog is destroyed
Hi, the mathtex public server that I used for my script in is unavailable now. I replaced by a new mathtex server, but it seems the latex package [usenames]{color} is not supported. But at least for the old installation, the math should be work. I try to find the best public mathtex server at the moment.
I tried your method but it does not work. You can check my blog site.
http://jiuning.blogspot.com/
Why is that? 3x.
Is this script working again? Tried it on my site but no success. Wondering if it’s an error in my HTML template or if it’s just down.
Cheers,
Philipp
My blog is on Blogger and this is just what I was looking for however is this working for anyone? I’ve also found in Google Docs has an Equation editor and also found Google’s online chart maker allows LaTeX commands:
http://chart.apis.google.com/chart?cht=tx&chl=\LaTeX
Cheers, Paul.
This script is actually _WORKING_!
Some caveats: Don’t use the script on googlegroups.com, it has the wrong mathtex server in it. Use http://watchmath.com/cgi-bin/mathtex3.js instead. Also, the two … blocks do not belong into the header but in the of the HTML file. I uploaded a barebones HTML file demonstrating the usage here.
I lied. the http://www.cyberroadie.org/cgi-bin/mathtex.cgi? server does work as well. Use either script on googlegroups or wathmath.com but make sure to copy the script tags into the body of the HTML file, as in the previous post.
Thanks to inform me about this. I did made a request to the cyberroadie.org owner to make his public mathtex running again. I didn’t check his reply in his own blog. But glad to know it works again since his server is my favorite.
Of got it working in my blogsite, posted a few examples in my latest post, good stuff.
Cheers, Paul.
The LaTeX script twasn’t working today (Sunday), was working the past week OK. Can we get something more stable?
Cheers, Paul.
Yes, the mathtex server in cyberroadie.org is down again. Try the instruction here .
The mathtex server for this sctipt is more reliable but less flexible (it doesn’t support \newcommand ). Good luck!
Ok the equations are back up again however I’ve reverted to the script in the link you gave (the old one).
Cheers, Paul.
The owner of the cyberroadie.org emailed me. He said his mathtex server was down because he moved his server to a new server and said everything should be smooth from now on. Up to you you, you can use my old script or my new one.
Cheers
HI, it seems that the code with ” ‘ ” character doesnt works (due to conflict meaning with html ) for example
doesnt give me what i want.
You can use $\prime$ to get the same thing.
.
For example when you type $f^\prime (t)$ you get
Hello There,
I have some difficulty writing
on my blog.
See the last paragraph here http://akash-student-theory-cs.blogspot.com/2009/12/lattice-based-cryptography-getting.html
Hi, thank you for visiting my blog.
written in
. Can you tell me what was the browser that you used?
I checked the last paragraph as you suggested. From my browser (Firefox) I can see correctly the
Hello watchmath,
Its working fine. Actually it was a problem with the blog “template”. Tobe precise it was the template called scribe.
Thanks again.
And great work….you have done a great service to the human race. I mean it.