This site is a showcase for using LatexRender for mathematics in WordPress

# Using LaTeX in WordPress

## Monday 11th February 2008

Filed under: — Steve @ 11:35 am

LaTeX Equation Editor is an innovative editor with a symbol table for those who are not sure of the LaTeX code as well as allowing the code to be typed directly. It uses Ajax so that the page does not need to be refreshed to see the rendered image.

This equation editor can be used in a number of ways:

1. Create the equation and then copy and paste the image into your website;
2. Fetch the code directly from CodeCogs site and use in your website like this
<img src="http://www.codecogs.com/eq.latex?\tiny \int_{-\infty }^{\infty }e^{-x^{2}}\;dx=\sqrt{\pi }" /> which gives
$\tiny \int_{-\infty }^{\infty }e^{-x^{2}}\;dx=\sqrt{\pi }$
3. Incorporate the visual editor into your text box (for example in a forum such as phpBB) or the FCK Editor;
4. Install the complete system on your server.

Method 1 does not require any code, method 2 only requres a small amount of HTML and is particularly suitable for example for Blogger. Method 3 needs some PHP code on your site and method 4 requires LaTeX and other software to be installed on your server. Full instructions are provided at Installing the CodeCogs Equation Editor v2

Please note that if you use method 3 you should display the following banner on your page  and if you use methods 2 or 3 then do please contact CodeCogs first at CodeCogs Services.
Do let CodeCogs know of any customisations or innovative uses that you make of their equation editor.

1. One problem with this service i couldnt overcome is that wordpress crashes when, for example, trying to fetch an image from codecogs (as in #2) with the characters

WordPress parses them as html tags and attempts to complete them given what you’ve written in your post.

Comment by Deus Ith — Tuesday 19th January 2010 5:26 am #

2. I found a bug in this codecogs type input.
“f_{ab}^{~~c}=A_{a}A_{b}B^{c}”

This double-use of super-and sub-script always makes an error.
I don’t have any reason and solution for this.

Comment by john — Tuesday 8th June 2010 12:51 pm #

3. It works for me as this image shows $f_{ab}^{~~c}=A_{a}A_{b}B^{c}$

Comment by Steve — Tuesday 8th June 2010 1:55 pm #

4. Any idea how can I change font of CodeCogs output to Courier or Courier New. The examples link gives keywords for only a limited number of fonts and it doesn’t include Courier/Courier New.

Comment by Kumar Vijay Mishra — Thursday 22nd July 2010 1:49 am #

5. Courier/Courier New are not LaTeX maths fonts so you can’t use them. Also any font change would mean recompiling CodeCogs. If you want to use Courier then you should use it for text outside the mathematics CodeCogs produces.

Comment by Steve — Thursday 22nd July 2010 9:43 am #