This document describes how to compile and use Itex2MML on a Windows machine. 1. If you already have an ANSI C compiler on your system and know how to use it, skip this step and go to #2. Otherwise, I recommend MinGW. Go to http://www.mingw.org/download.shtml and under CURRENT files, there will be an entry labeled MinGW. The file should look like MinGW-X.exe, where X is the version. As of this writing, the filename is MinGW-3.1.0-1.exe. Download that file and run it. There’s no need to change any options during the setup, unless you would like to install the program in a different location. Once it has installed, you need to alter your system’s Path variable so that the compiler can be accessed on the command line from any directory. Specifically, the bin directory needs to be added to the path. If you used the default install directory, the directory will be “c:\mingw\bin”. If you have difficulty finding it, you can do a search for the file “gcc.exe” on your hard drive. In your control panel, double-click on the system icon. Click on the Advanced tab, and then on the Environment Variables button. In the System Variables area of the window, find the Path variable and click on the Edit button. Add the directory you found earlier to the list. (Again, the default is “c:\mingw\bin”). Note that you need to separate each directory in the Path variable with a semicolon. You can test your to see if setting the path variable worked by opening a new command prompt window and typing “gcc” and hitting enter. If you see: “gcc: no input files” then you have done it correctly, as long as you’re not in the directory where gcc is located. 2. Download the Itex2MML source code from http://pear.math.pitt.edu/mathzilla/itex2mml.html To uncompress the file, you will need a utility like Winzip. Extract the files wherever you’d like, but I recommend putting them relatively close to the root directory since you will have to get to the directory in the command prompt. 3. In the Itex2MML directory, you will see that 2 directories have been created, itex and tidyExp. These are two separate programs you will need to compile to convert itex/html to MathML. Go into the itex directory. To compile itex, you need to first delete the object files. This can be done with the command “del *.o” in the itex directory. Then type ‘mingw32-make’ and hit enter. You should see the following: gcc -c -o y.tab.o y.tab.c gcc -c -o lex.yy.o lex.yy.c gcc -o itex2MML y.tab.o lex.yy.o You should now see an itex2MML.exe file in your itex directory. You should also use the strip command to optimize the binary: “strip itex2mml.exe”. 4. In the tidyExp directory, you need to edit a file called ‘Makefile’. You can do this using Notepad or some other editor. Once you have it open, remove the flag “-lc” in the line after “tidy:” and save the file. Delete the object files by typing “del *.o” as you did in the itex directory. Then type ‘mingw32-make’ while in the tidyExp directory and hit enter. The following should result: gcc -O -c -o attrs.o attrs.c gcc -O -c -o istack.o istack.c gcc -O -c -o parser.o parser.c gcc -O -c -o tags.o tags.c gcc -O -c -o entities.o entities.c gcc -O -c -o lexer.o lexer.c gcc -O -c -o pprint.o pprint.c gcc -O -c -o clean.o clean.c gcc -O -c -o localize.o localize.c gcc -O -c -o config.o config.c gcc -O -c -o tidy.o tidy.c gcc -O -o tidy attrs.o istack.o parser.o tags.o entities.o lexer.o pprint.o clean.o localize.o config.o tidy.o You should now see a tidy.exe file in your itex directory. You should also use the strip command to optimize the binary: “strip tidy.exe” 5. Now that you have both programs compiled, you should add paths to their binaries (itex2mml.exe and tidy.exe) as you did with the compiler. 6. Using the command prompt, you can now convert itex/html files to MathML files in a two-step process. First, type “tidy -4mz temp.xhtml” to clean up the html and create the correct header, etc. Second, type itex2MML outputfile.xml to convert the embedded itex to MathML. Now outputfile.xml is an xhtml + MathML page viewable with Mozilla-based browsers. Written by Jeff Tackett with a little help from Paul Gartside (author of itex2MML).