The other day I had to spend some time figuring out how to do the following things in org2blog:

display LaTeX properly

embed YouTube videos

clear org2blog keybindings

All are very easy, but took a little bit of digging, so here it is recorded for posterity.

First, there is a plethora of LaTeX plugins for WordPress. I favor the ones that use MathJax; after all, we live in the year 2012. Converting LaTeX to images is so 1990s. For MathJax support, you can use the excellent plugin by zhiqiang. Note that the syntax for inline vs display formulas is slightly different than what one might be used to (note the exclamation marks). On the org2blog side, you have to make sure to set

(setq org2blog/wp-use-wp-latex nil)

otherwise, the LaTeX syntax generated is incompatible with the plugin.

Finally, the default org2blog bindings are non-standards-compliant in that they use the C-c [letter] keys, which are reserved for the user. In particular, the bindings were interfering with parts of my setup. The solution was to clear the bindings and define my own. Clearing the bindings takes the following form:

Overall, I am very happy with org2blog. It allows me to blog right from within my preferred computing / brainstorming / writing environment. I like to think that I am not one of those Emacs users that tries to put every aspect of his or her life in some Emacs buffer somewhere, but this little lifehack is just too sensible to ignore.

One Response

Thanks for the nice post. Sorry for the non-standard keybindings. I wrote org2blog, as a way to learn elisp and get into the land of Emacs lisp programming. I wasn't aware that C-c [letter] keys are reserved for the user.