GladTeX for Windows

GladTeX is a utility for creating images of mathematics equations. This page describes a special version of GladTeX for Windows created by Erik Neumann, first released September 2004. See also these other pages:
     Displaying Math on the Web by Erik Neumann
     MyPhysicsLab physics simulations for examples of GladTeX usage

My version of gladTeX is based on gladtex 0.3 by Martin G. Gulbrandsen copyright (C) 1999-2002. Please see the readme file in gladtex 0.3 which spells out the GNU General Public License terms.

Here is an example of an equation produced by gladTeX. To see how this equation is created in gladTeX, see my page about math on the web.

\sum_{k=1}^\infty \frac{1}{k^2} = \frac{\pi^2}{6}

Differences To GladTeX 0.3

This version of gladTeX is different from gladTeX 0.3 in the following ways:

Obtaining and Installing GladTeX

Get the two files (that are part of this software release):
    eqn2img.exe  (compiled for Windows OS)
    gladtex.pl
and put them somewhere that can be found by the Windows command line. You can get these files from ftp://www.MyPhysicsLab.com/gladtex/. In addition you will need the following:

With this version of gladTeX, libpng is part of eqn2img.exe, so you don't need to install libpng on your own.

Before trying to use gladTeX, you should be able to run latex on a simple .tex file, and turn it into a .dvi file (try viewing it with a .dvi viewer like Yap which is part of MikTeX). You should also be able to give the commands listed above (perl, latex, dvips, grep, gswin32c) at the command line.

Usage

Put
     <eq>...latex code here....</eq>
in your .html file. But rename it to have the .htex extension. Then invoke gladtex by:
     perl gladtex.pl [options] myfile.htex
where [options] are described in gladtex.pl.

For inline equations use
     <eq inline=1>...latex code here...</eq>
This will result in special processing so that the equation image lines up with the other text on the line.

I have some additional examples of GladTeX usage available. Please see the official gladTeX site for additional usage information.

Source Code

The perl file gladtex.pl is a perl text file. The source code for eqn2img.c is provided at ftp://www.MyPhysicsLab.com/gladtex/ in case you want to try to build it yourself. There are some additional .h and .c files:

You will need to obtain libpng and zlib if you want to compile eqn2img.c. This is rather involved when using VisualC++ on Windows, see the accompanying file 'libpng notes.txt' for more information.

Changes to eqn2img

I've made various changes to eqn2img.c so that it compiles and works on Windows. In addition some other changes I made were:

This web page was first published September 2004.

Valid HTML 4.01!