latex2wp: a tool for converting LaTeX to WordPress-ready HTML

Migrating my blog from Blogger to WordPress turned out to be more trouble than I hoped, because WordPress requires a particular syntax for latex, and several hacks I used to make things display nicely on Blogger just garbled things in WordPress. No one thing was actually complicated to migrate, but taken all together it was just tedious.

I ended up using Luca Trevisan’s latex2wp tool, which converts basic latex into HTML ready to be cut and paste into WordPress. This is great because I can now write and store all blog posts in basic latex, and just change the tool as necessary in the future if I need to move site again, or if WordPress changes its syntax, or whatever.

Since I found the tool so useful I decided to put my own tweaked version on github. As additional features, I’ve added

    • installation by pip,
    • a simple commandline entrypoint,
    • support for simple on-the-fly macros defined with \def.

And no doubt I will find myself adding more features as time goes on! Everything can be found at https://github.com/seaneberhard/latex2wp.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s