Equations on WordPress

WordPress.com just added support for using inline \textrm{\LaTeX{}} [Wikipedia], a freely available protocol for using typesetting and displaying mathematics and other technical information. It is powerful and not too difficult to learn the basics. Equations can now be placed within a paragraph, such as Einstein’s famous and world-changing E=mc^2. Of course, one could use regular HTML to display such an equation (E=mc2), but where \textrm{\LaTeX{}} really shines is for more complex formulas. For instance, the volume of a sphere (using a cylindrical coordinate system) is V=\int_0^{2\pi} \int_0^R \int_{-\sqrt{R^2-r^2}}^{\sqrt{R^2-r^2}} r \, dz \, dr \, d\theta = \frac{4}{3}\pi R^3. This is a very useful feature and I’m quite impressed that WordPress.com has offered it.

Update: WordPress.com has been busy! \textrm{\LaTeX{}} has now been enabled in comments as well. Furthermore, by using the\displaystyle command, one can have the equation display separately on its own line, instead of the vertically compact inline style used above. For instance, the volume equation I previously discussed would be displayed as follows:

\displaystyle V=\int_0^{2\pi} \int_0^R \int_{-\sqrt{R^2-r^2}}^{\sqrt{R^2-r^2}} r \, dz \, dr \, d\theta = \frac{4}{3}\pi R^3

For those unfamiliar with \textrm{\LaTeX{}} , it is really quite easy to learn. For reference, the code I have used here is as follows:

  • $latex \textrm{\LaTeX{}} $
  • $latex E=mc^2 $
  • $latex V=\int_0^{2\pi} \int_0^R \int_{-\sqrt{R^2-r^2}}^{\sqrt{R^2-r^2}} r \, dz \, dr \, d\theta = \frac{4}{3}\pi R^3 $
  • $latex \displaystyle V=\int_0^{2\pi} \int_0^R \int_{-\sqrt{R^2-r^2}}^{\sqrt{R^2-r^2}} r \, dz \, dr \, d\theta = \frac{4}{3}\pi R^3 $

Finally, \textrm{\LaTeX{}} is pronounced with a hard k sound at the end; it comes from the Greek letter Χ (chi). See Wikipedia for more information.

Any questions?