LaTeX support in WordPress

My recent proposal to do a workshop session on WordPress MU and BuddyPress at this year’s ALT conference was accepted on the condition of a couple of modifications. It’s been suggested that it should be run as a demonstration rather than workshop and that I offer more detail on what will be demonstrated. Fair enough. The reviewer of my proposal suggested that I might aim the session at “teachers of mathematics-intensive disciplines because of WordPress’ decent support of \textrm{\LaTeX{}} for processing mathematical formulae.”

This isn’t an area I would normally think to support (although I did write my MA dissertation in \textrm{\LaTeX{}}, using LyX – it produces beautiful typeset text, regardless of whether you use it for science-related work). Anyway, a quick search showed that indeed, WordPress has supported \textrm{\LaTeX{}}, on both wordpress.com and as a plugin for a couple of years. You can adjust the size and style of the output and enable it for comments, which, if discussing mathematical formulae with peers, could be of huge benefit.

Maxwell’s Equations

\nabla \cdot \mathbf{D} = \rho_f

\nabla \cdot \mathbf{B} = 0

\nabla \times \mathbf{E} = -\frac{\partial \mathbf{B}} {\partial t}

\nabla \times \mathbf{H} = \mathbf{J}_f + \frac{\partial \mathbf{D}} {\partial t}

4 Replies to “LaTeX support in WordPress”

  1. Tony Hirst just pointed me to MathTran, a web service which allows you to submit TeX to the service which returns a MathML image.

    For example, here’s Maxwell’s Equations, returned from the MathTran web service:

    These URIs

    http://www.mathtran.org/cgi-bin/mathtran?D=1;tex=\nabla%20\cdot%20\mathbf{D}%20=%20\rho_f
    http://www.mathtran.org/cgi-bin/mathtran?D=1;tex=\nabla%20\cdot%20\mathbf{B}%20=%200
    http://www.mathtran.org/cgi-bin/mathtran?D=1;tex=\nabla%20\times%20\mathbf{E}%20=%20-\frac{\partial%20\mathbf{B}}%20{\partial%20t}
    http://www.mathtran.org/cgi-bin/mathtran?D=1;tex=\nabla%20\times%20\mathbf{H}%20=%20\mathbf{J}_f%20+%20\frac{\partial%20\mathbf{D}}%20{\partial%20t}

    return these PNG images:




  2. Usual LaTeX plugins for WordPress suffer from incorrect formula positioning relative to surrounding text producing “jumpy” equations painful for eyes and decreasing overall readability of the web article.

    I’ve created special plugin named WP QuickLaTeX which solves this issue. Besides converting LaTeX code into image it provides information on how to position generated image on the web page properly so that the formula and surrounding text will blend together well.

    Plugin’s homepage:
    WP QuickLaTeX
    Example of web article powered by WP QuickLaTeX:
    Central Differences

Comments are closed.