Showing posts with label Extensions. Show all posts
Showing posts with label Extensions. Show all posts

Tuesday, February 21, 2012

LaTeX User Script Updates

I posted a minor update to the LaTeX for Blogger user script to fix it in Blogger's new editor.


\int_0^1 x^2 dx = \frac{1}{3}

Wednesday, April 27, 2011

Further LaTeX for Blogger Updates

Just threw a few more changes in.  Angle brackets should be handled better, and the image src is URI encoded so generally it should behave better around weird input.

Even more, I've thrown up installation instructions on the repository's GitHub wiki.

Supporting Blogger's New Editor

One of my annoyances with the user script for typesetting LaTeX in Blogger was how it just didn't work with the new editor (otherwise known as issue 7).

No more!


\int_0^1 x^2 dx = \frac{1}{3}

(This post was written in the new editor!)

Tuesday, April 26, 2011

LaTeX User Script Updates

Just so you know, I've been able to clean the code for the user script to the point where I think I can easily extend it: in particular, the double escaping is gone and there is much less string manipulation. The script now handles double quotes inside equations properly.

The issues list on GitHub shows what's remaining.

Thursday, April 21, 2011

Trying Out GitHub

I previously wrote about my trivial fix to a user script for LaTeX markup in Blogger.1  Now that I've explored more, I know more options, but I still haven't found a single solution which does everything I would like.

My primary requirement is to easily typeset math which can be read not only on the website, but also from the RSS feed.  To that end, the user script mostly works.  However, it doesn't look nearly as nice as MathJax.

So, long story short, I believe there are a few more changes I want to make to the user script.  I have decided to explore GitHub for code hosting.  It's early yet, but it has a very nice interface.

So if you want to follow along, see my new repository.

1Clicking on the original link failed to automatically install the user script.  I have fixed it.

Wednesday, January 19, 2011

Using LaTeX from Blogger

So, you've just moved to Blogger and you want to blog with properly typeset equations? That seems like a requirement for some sorts of blogs (possibly not possessing an astoundingly large audience).

Unfortunately, a web search only revealed no ready-made solutions. The most promising option was a Greasemonkey script from Wolverinex021. But, it used a web service to interpret
\LaTeX which is no longer supported. The second most promising option was the wonderful site CodeCogs. CodeCogs has many ways to render \LaTeX, a page on Blogger integration, and two JavaScript scripts to automatically render snippets in the page. There is only one problem with their suggested approach. Most readers use an RSS aggregator to follow feeds, and the JavaScript will be bypassed. But CodeCogs does have a CGI renderer just like the one used by the Greasemonkey script.

All that is needed then is to combine the two options. My trivial contribution to Blogger equation typesetting is this Greasemonkey script.2

The following has changed since the original script:
  • Use CodeCogs for rendering.
  • Use CodeCogs to render the icon in the Blogger editor.
  • Some formatting changes for readability.
  • Support for unrendering. This was a useful missing feature.
  • Added alt text for typeset equations.
Install it as you would any other Greasemonkey script. To install in Chrome, you can save the file and then drag it onto the browser window. In the Blogger rich editor for creating new posts or editing existing posts, there will be two new buttons labelled
\LaTeX and {\rm un}\LaTeX. They do what they say. \LaTeX equations should be included between double dollar signs, not single dollar signs or \(\) or \[\]. And the script will fail miserably if the equations contain double quotes.

Typeset away...


\int_0^1 x^2 dx = \frac{1}{3}

1 I believe this is his blog.
2 In Blogger settings, choose the "old" editor.