# On Writing Posts

One of the reasons I chose to put this blog on wordpress.com over say a google site or blogger.com was the support for math. Without such support it would be difficult to write a more theoretically programming blog that is not unreadable due to horrible formatting.

I write technical papers in LaTeX, and like to write other stuff using ReStructured Text (ReST, a markup language used by the Python docutils).

If you can host wordpress yourself, markdown or ReST can be used to edit posts directly by using plugins. However, if you are using the wordpress.com service this is not an option. WordPress.com has two modes of online input: “HTML” and “Visual”. Both support the $latex math-expression $ where math-expression is a LaTeX math expression. Unfortunately, the language that can be used in this construct is only a subset of LaTeX math, and is somewhat cumbersome to use.

Luca Trevisan wrote a python program that translates a subset of LaTeX into something that can be pasted directly into the HTML editor, for ease of use by habitual LaTeX’ers. It can be found here. An updated, single-file, version of this program, adding support for among others verbatim as preformatted text, as well as adjustment of vertical alignment of inline latex (since this is mostly broken in many wordpress themes), can be found here.

This allows easy writing of things like: The requirement for ${F}$ being submodular is that

$\displaystyle F(S \cup S') + F(S \cap S') \leq F(S) + F(S')$

for any ${S,S' \subseteq A}$.

Honestly, I would prefer to write blog posts using ReST. This would allow the posts to be translated to LaTeX, HTML, XML, ODT, Beamer slides, and other formats. However, this requires someone to write a particular HTML writer that outputs math $latex$ constructs. Maybe that is something I’ll look into at some point…