This page is a collection of basic advice about using LaTeX in WordPress.

  1. Only  the in-line mode is available.  You can’t use any text formatting commands, or the displaymath mode.
  2. Creating a line of LaTeX in WordPress is similar to ordinary LaTeX – just enclose the code in $ symbols, as usual.  You also need to insert the word latex after the first $.  For instance,
    latexdisplays

    \chi(X')=k\chi(X).

  3. You can use LaTeX in the main text or in comments.
  4. Unfortunately, WordPress doesn’t provide a preview function for comments, so complicated LaTeX commands there often go awry.
  5. For more sophisticated pieces of LaTeX,  such as commutative diagrams, the only option is to compile the LaTeX oneself and upload it as an image.
  6. A useful resource for this is codecogs.  Just type the LaTeX code into the BLANK in http://www.codecogs.com/eq.latex?BLANK.  This produces a .gif which you can upload.  (Thanks to A. J. Tolland at the Secret Blogging Seminar for this tip.)

A comment on the appearance of LaTeX in WordPress.  LaTeX looks all right in many WordPress themes, and terrible in others.   The reason for this is quite simple.  LaTeX output is displayed as an image.  The CSS file of a WordPress theme determines how images are displayed.  Some themes automatically display images with a boundary or in a modified position.  This is a disaster.  Fortunately, it’s quite easy to resolve this problem, by editing the CSS file –  simply remove any default formatting for images in the body text.  WordPress allows you to edit the CSS of your theme for a modest fee ($15 pa).

Bloggers may like to check out my post on the first lecture (1 Free Groups) as a guide to formatting.  Roughly, the convention seems to be as follows.  Theorems, lemmas and exercises are all (independently) numbered, unless they have a name, in which case they go by that name.

Finally, here is a list of some latex commands that produce good looking mathematics.

  1. \smallsetminus is better than \backslash for set-difference.
  2. \langle and \rangle give much prettier angle brackets than < and >.