HaCkED By KaSpEr511

* +_+ KaSpEr Was Here +_+ *

 Contact O.K: UzI@Hotmail.Com  

 

 

How To Install Latex On Blogger/Blogspot

July 10th, 2009

The mathtex server is down. Change mathtex2.js on the script into mathtex3.js.

Mathtex3.js using the mathtex server of John Forkosh.

There were some people who moved from Blogger to WordPress because the later has a capability to render math formula/equation/symbols by using LaTeX syntax. I also observed that there are many math Blogger who faithfully stay with Blogger. I believe that given the some capability to write math formula as in WordPress will give more power to the blogger to express their idea and also to make the reader easier to grasp the ide on their article. Besides that of course having latex on your blog make your blog more beautiful :) . Ok without further ado here are the steps to enable latex on your blogger (thanks to John Forkosh for his mathtex public server and thanks to Randall Farmer for his replacemath javascript)

  1. Copy the following javascript code:
    <script src="http://www.watchmath.com/cgi-bin/mathtex3.js" type="text/javascript"></script>
    <script type="text/javascript">
    replaceMath( document.body );</script>
    <a href="http://www.watchmath.com">
    <img src="http://www.watchmath.com/images/formula.png" alt="" width="100" /></a>
     
    <a href="http://watchmath.com/vlog/?p=438">
    Math Formula?</a>
  2. Go to your Blogger dashboard  and select layout latex_layout
  3. Click Add a Gadget on your right sidebar (or left depending on your tempate) and add HTML/Javascript onto your sidebar latex_javascript
  4. Leave out the title and past the javascript that you copied in step 1 right into the content and then savelatex_post
  5. Thats it! You are done. Now you can type your latex code between two dollar signs to get the inline style math symbols or write it as or to get a display style math symbols (just play around to see their differences)

There are some notes regarding the above installation:

The javascript above will also produce on on your sidebar a logo an a link to this very post. The idea is that if a visitor of your blog also wants to install latex on her blog then she can follow the link to this post. The logo will look like this latex_formulaIf you don’t like it you can remove it by deleting this part:


<a href="http://www.watchmath.com">
<img src="http://www.watchmath.com/images/formula.png" alt="" width="100" /></a>
 
<a href="http://watchmath.com/vlog/?p=438">
Math Formula?</a>

from the javascript code on step 1.

  • To see how does the latex looks like on a blogspot, checkout the address: http://www.watchmath.blogspot.com
  • Reblog this post [with Zemanta]

    Categories: Latex, Latex On Blogger

    Tags: , , , , Leave a comment

    Comments Feed48 Comments

    1. Math Teachers at Play #12 « The Number Warrior

      [...] Want to post math equations on Blogger/Blogspot like you’ve seen on WordPress? WatchMath has a solution. [...]

    2. Jaime

      Cool, very cool. And the amount of LaTeX commands available exceeds that of WordPress. Not enough though to have me undo my migration to WordPress from Blogspot: the biggest problem with math in Blogspot is not rendering LaTeX (there already exist other options, although this one probably exceeds them in functionality), but fear that the public servers be shut down, and months or years of writing then need to be redone….

    3. watchmath

      Well, actually in wordpress you also use latex public server which can be shut down too :) (but maybe wordpress will still live for a good number of years). There is nothing really save here. Also even you use self hosted wordpress and cache every single latex image (as in this blog) will you pay the hosting forever?
      I have a list of 10 maththex public server so that if one has a problem you can switch it to another one. Still not good enough? :D

    4. watchmath

      Actually you can use wordpress.com latex server in this script too. But of course with less of flexibility compare to mathtex server.

    5. reico

      How to input $ sign?

    6. watchmath

      Use ${\latexcode}$ or \[{\latexcode}\] to display latex source code use $!$ to write one single $ notation

    7. reico

      $ works fine. But I can not fully understand $\latexcode$ mean, does it simply mean input bracket {}?

      I input $\sum_{i=1}^n x_i$ in my blog test, it still shows the picture of the equation not the code.

      (http://reico-go.blogspot.com/2009/08/how-to-display-latex-code-in-blog-using.html)

    8. watchmath

      Yes, you just simply put bracket around your latex expression like what you did here in the comment.
      BTW, it seems the comment in your blog is not working. I can’t write comment on your blog.

    9. olomorph

      Hello, you can also use my site to display math formulas :

      http://www.openmaths.org/cgi-bin/mathtex.cgi?YOUR_MATH_FORMULA

      for example

      http://www.openmaths.org/cgi-bin/mathtex.cgi?(a+b)^2=a^2+2ab+b^2

      All LaTeX commands are accepted.

      In your xhtml pages, use the following tag:

      You can use it everywhere, not only in Blogger or WordPress : )

      Bye (if you could register to the forum… ^^)

      olomorph

    10. Stephen

      This will be very useful indeed, but I can’t get inline maths to display correctly. In case it is relevant, I am using IE8.

      In my test posting on http://constructionsitespl.blogspot.com/2009/08/test-replacemath.html the E = m c^2 equation appears on a separate line.

      The source text I used was:

      Here is an inline equation – – which should be just what it says on the tin, i.e. inline, but seems not to be so.

    11. Stephen

      … but my inline equation is displayed correctly inline in my comment on your blog …

    12. watchmath

      Hi,
      I couldn’t read your blog. It seems your blog is a private blog.

    13. Stephen

      Sorry about that. I have now set http://constructionsitespl.blogspot.com/ to be public.

    14. watchmath

      That is a css issue. Edit your html and locate the following:

      img {
      border:0 none;
      display:block;
      }

      and then delete the “display:block;” part.

    15. maxime

      Hi! This is very useful, thanks.

      But I’d like to have my equations a bit larger, without having to add \large every time. How could I do?

      Cheers,
      Maxime.

    16. maxime

      And more generally, where can I put my preamble commands etc?

      Cheers!

    17. New Installation : Latex on Blogger/Blogspot

      [...] the instruction here, but in step one copy and use instead the following script. <script [...]

    18. watchmath

      Hi, see the new intallation procedure here: http://watchmath.com/vlog/?p=1244

    19. hpngon

      Why I can’t install in my blog. I have done step by step as your guide

    20. Justin J Stark

      I made some modifications to your script and am using it on blogger. I adjusted the image margins so they fit better. I also made it so I can type LaTeX as \( latex stuff \) since using $ latex stuff $ is supposed to be deprecated.

      http://www.justinjstark.com/mathtex/mathtex3.js

    21. watchmath

      Hi, thanks for letting me know about your modification. Can you provide me with your blogger link so I can take a look how the modification works?

    22. Andreas Grech

      I have recently developed a jQuery plugin that allows you to easily add LaTeX to your website easily, given an equation.

      It’s called jsLaTeX and you can download it from here: http://knowledge-aholic.blogspot.com/2009/12/jslatex-jquery-plugin-to-directly-embed.html

      The plugin also allows you to change the default engine it uses to render the equation.

    23. watchmath

      Hi, that a nice code.

      Unfortunately at least for me it will be to much work to write every time we need to write math notation. Also I want the way we write latex on blog to be the same as the way we write latex in a notepad.

      By the way I didn’t see any example of latex in inline mode on your blog. Does it work for inline mode too?

    24. Armando

      Hi there!

      First of all thanks for a superb script. But some formulas don’t parse right on my blog: http://physicsfromthebottomup.blogspot.com/

      Do you have any idea why this is so?

      Thanks again!

    25. watchmath

      Hi, thank you for using the script.
      I visited your blog but I am not sure which symbols/formulas that don’t parse correctly.

    26. Armando

      Hi again!

      http://physicsfromthebottomup.blogspot.com/2010/01/some-solved-exercises.html

      Was the post I was having problems with but they were partially solved when I changed from the old script to the new script.

      What happened was that some formulas didn’t parse at all. They kept showing with the dollar signs. Now this doesn’t happen but I do have a formula that shows a symbol I didn’t input:

      The second step in the train of equations that precede the following text. “Where the last equality follows from the previous result” has a  that comes from nowhere.

      I also tried your script in my other blog: http://allthephysics.blogspot.com/ and in here we can see that sometimes some formulas aren’t parsed. I don’t understand why…

      Once again thanks for your script.

    27. watchmath

      The  bug is happened because of the white space. I have see this bug before, usually I just make sure that there are no necessary white space.

      For the allthephysics blog I couldn’t access it because it is for invited readers only.

    28. Armando

      Ok I’ll check out the unnecessary white spaces then.

      Sorry for the issue with my other blog. I had it as private blog because of this issue.

      I have another blog at wordpress.com because initially that was the only blog that I knew allowed a direct input of LateX expressions into the posts. Then I found out about your script and wanted things to blogger because Your script allows a lot more LateX functionalities.
      Another thing that I used is the script done by Luca Trevisan: http://lucatrevisan.wordpress.com/latex-to-wordpress/ that converts a text written in LateX to a friendly html.
      This is also a very powerful script and permits the blog text to be very reader friendly and allows one to spare a lot of time in witting blog posts.
      I had to change Luca’s script a little bit for it to be blogger compatible, but I still ended up with some issues as you can see here: http://physicsfromthebottomup.blogspot.com/2009/05/lucas-script-in-blogger.html (mainly because I never coded in Python before).

    29. ateixeira

      Hi there! I finally managed to figure out what was wrong in my blogger blog. For some some strange reason I have to give a space between one symbol formulas and the a a $ parses right.

      Any I think I’ll move my blog from wordpress.com to blogger since you’re script allows more versatility from LateX (and this together with Luca’s script will make life a lot easier for me.)

      One final question though and I understand perfectly if you don’t want to answer.
      I had to change Luca’s script a little bit in order for it to work in blogger, but for some strange reason hyperlinks don’t work in blogger. If I send you the files do you think you can try to help me out a little bit in ironing out this last detail?

    30. A new address « Climbing the Mountain

      [...] new address will be in blogger and I’m doing this because I found out a way of making equations in blogger that also uses LateX. It is a more powerful script than the one I have in [...]

    31. ateixeira

      One last question: Why doesn’t this script support the \displaystyle command?

    32. Joe

      Thank you very much !!

    33. nik

      hai tq for your hard work

      how to display math code in blogger (it like to display html) in the post section

    34. Shailesh Shirali

      Hi. I found your blog entry about writing math text on blogger using LaTeX, and immediately implemented the code you had given. You can see the results on my blog, http://joyofmathshirali.blogspot.com/

      Thanks a lot for putting the code on the web!

      I find some curious behavior: When I write a new post and “Preview” it, I see only the LaTeX code, but when I “Publish” it I do see the equation as it is supposed to be.

      However I have to press F5 (the refresh key) before I get the effect I want. Is this the experience that others have found as well? Or am I missing something?

    35. kleber

      WatchMatch é simplesmente fantástico! Parabéns! Gostaria de saber como inserir acentos em textos, por exemplo: Matemática

      Obrigado.

    36. David

      Hello watchmath,
      I would like to include “tabular” code but it doesn’t work on my blog : http://lesmathematiquesausecondaire.blogspot.com/2010/03/comment-utiliser-les-regles-de-calculs.html

      It’s like Latex failed because the code is too long … but I don’t know exactly.
      Could you tell me which codes are possible on Blogger-web site or an idea to fix my problem ?

      Thank you for your futur help…

      Regards.

    37. xfg

      Hello.

      I wrote:

      $ {(x^{(i)} , y^{(i)};i = 1,..,m)} %
      in a middle of a paragraph, and it is putting automatic line feed to the latex expression and puts it in the next line. Does anyone know how to get rid of this?

    38. kleber

      Hello,

      Use your script on my blog. I use Firefox. When I test with Internet Explorer 8, there is a failure in the script. Do you have any complaints about it? And if so, have any solutions?

      Thanks and a hug!

    39. watchmath

      Do you have any problem with the latex on watchmath.blogspot.com if you use IE 8 ?
      If there is no problem, try to use different template for your blog.

    40. watchmath

      Try to give a space between the dollar sign and the curly bracket.

    41. Escribir LaTeX en Blogger « Un Bioinformatiquillo

      [...] Math Formula in Blogger [...]

    42. Escribir LaTeX en Blogger « InstaCiencia

      [...] Math Formula in Blogger [...]

    43. Tito Eliatron

      Thank you very much for this wonderful plug-in. I’ve just installed in my blog (http://eliatron.blogspot.com) and it’s perfect.

      But I have only one question/request.

      Many of my readers says that it is a little problem when they read my blog through a Feed reader (like Google Reader).

      It is possible to make the script active in the RSS-feed?

    44. TJ

      How to increase textsize of the latex image???

    45. m

      Hello, this seemed nice but now the server seems to be refusing to render. Did I do something offensive or is this the default behavior ? if I recall correctly, I actually tried this service once before and it got turned off last time as well. Is this just a free trial deal ? I don’t have my own server space and was trying to use it for Blogger. Now everything is red boxes.

    46. Luis Diego

      Hi there,

      Yesterday I found this way to plug in or install LaTeX on my blog, as you explain on this page but, I wrote a part of an article to my students on http://www.matematiquemos.blogspot.com, an the formula didnt work. Can you help me with that?

      Thank you.

      Luis Diego from Costa Rica

    47. vv

      Is there a way to change the font of the equations from the default black color to white, since the background of my website is nearly black?

      Thanks in advance. ^^

    48. Alexia

      Hey, this seems to conflict with the use of colors in the editor, can this be fixed?

    Leave a comment

    Feed

    http://watchmath.com/vlog / How To Install Latex On Blogger/Blogspot