GladTeX for Windows

GladTeX is a utility for creating images of mathematics equations. This page describes an outdated version of GladTeX for Windows created by Erik Neumann, first released September 2004. See also Displaying Math on the Web.

As of 2017, GladTeX development has resumed at https://github.com/humenda/gladtex. please see that page for the current version. There is a Windows version at https://github.com/humenda/GladTeX/releases.

This 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 Displaying 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

As of 2017, GladTeX development has resumed at https://github.com/humenda/gladtex. please see that page for the current version. There is a Windows version at https://github.com/humenda/GladTeX/releases.

For archival purposes, you can access the outdated version of GladTeX. The rest of this page describes that outdated version.

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. 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 here 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.

previous next Valid HTML 4.01