# Installing mathtex.cgi

In order to make and install mathtex.cgi, latex and dvipng are prerequisite. You need to install latex first and divpng will come along with it.

Following will show how I have done with it for example.

```# wget http://www.forkosh.com/mathtex.zip
# mkdir mathtex
# cd mathtex
# unzip ../mathtex.zip
# cc mathtex.c –DLATEX=\\"\$(which latex)\\" \\
–DDVIPNG=\\"\$(which dvipng)\\" –o mathtex.cgi
# cp mathtex.cgi /public_html/xxx.../cgi-bin/```

`www.example.com/cgi-bin/mathtex.cgi?x^2+y^2`

It will give you the gif image showing equation by latex syntax.

## 12 thoughts on “Installing mathtex.cgi”

1. Hello, Nice to meet you, I want to know that can you introduce a good & FREE host that provides the facilities to install mathtex on itself?

1. Hi, Vahid,

Thank you for interesting of this plug-in. Unfortunately, I don’t know which provider provides free hosting for the mathtex. I am using other vendor requiring a payment per yearly basis.

If you want, you can refer to http://blog.breadncup.com/yw-latex-wp-plugin/ to get free mathtex.cgi provider.

Thanks,

3. Hello, I have a question, how much web space is enough to install LaTeX and dvipng in order torun mathtex on my server?

1. Hi Vahid,

The tarball size: less than 2.0 MB
Uncompressed codes: less than 10.0 MB
Installing: Around 2.0 GB

Hope above information would help.

Thanks,