Tags:
create new tag
view all tags

SID-00428: itex2mml or itextomml (Windows XP)

Status: Unanswered Unanswered TWiki version: Perl version:
Category: Server OS: Last update: 16 years ago

I'm trying to install the [[http://twiki.org/cgi-bin/view/Plugins/LaTeXToMathMLPlugin ][LaTexToMathMLPlugin]] but as a prerequisite I need to install [[http://pear.math.pitt.edu/mathzilla/itex2mml.html ][itex2mml]. Unfortunately I'm not able to find a windows binary for this file. There use to be one here:

http://golem.ph.utexas.edu/~distler/blog/archives/000319.html

but the link seems no longer valid:

-- JohnCreighton - 2009-07-21

Discussion and Answer

I forgot to add, well I wait for a response, I am currently downloading a C compiler. This however scares me. Assuming I can compile it correctly, I'm not sure I"ll know how to configure it. For instance will I need to create any bat files or make any registry changes.

-- JohnCreighton - 2009-07-21

So anyway, I downloaded borland turbo C++. I'll still try to track down the binary but in the mean time I might try and learn a little about C.

Anyway, in the zip file supplied here: http://pear.math.pitt.edu/mathzilla/itex2mml.html

There is the following in the Make file:

http://www.opensource.apple.com/source/gnuzip/gnuzip-25/gzip/msdos/Makefile.bor


LEX = flex YACC = yacc

CC = gcc

itex2MML: y.tab.o lex.yy.o $(CC) -o itex2MML y.tab.o lex.yy.o

lex.yy.o: lex.yy.c y.tab.h

y.tab.c y.tab.h: itex2MML.y $(YACC) -d -v itex2MML.y

lex.yy.c: itex2MML.l $(LEX) itex2MML.l


Two issues I have. One, I'm wonder if the IDE is appropriate. Make files seem to be shell scripts and in the case of windows this would be a bat file. So maybe I should call the compiler from the command line (Sounds tricky). I don't know if I can get the compiler to use a make file from within the IDE. Also the shell commands from the last two dependencies seem to be lexical analyzers.

Here are some relevant links:

http://web.mit.edu/gnu/doc/html/flex_3.html http://www.debian.org/doc/manuals/debian-reference/ch12.en.html http://en.wikipedia.org/wiki/Lex_programming_tool

-- JohnCreighton - 2009-07-22

After some further thought since the output of lex is a generated c file, I don't think I need either flex or lex. But if I was to use them there seems to be some C sharp versions as mentioned by Wikipedia:

http://en.wikipedia.org/wiki/List_of_C_Sharp_lexer_generators

Or I could use the unix versions I suppose in windows by using Cygwin.

That said it is nice to know about these utilities. They sound quite powerful!

-- JohnCreighton - 2009-07-22

Okay, moving on. I don't quite know enough to compile it yet.

So I know, that lex.yy.o: is a lunix executable for a lexical analyzer which is compiled from the c file.

lex.yy.c with the header file: y.tab.h

The c file lex.yy.c is generated by using the lexical analizer generater "lex".

I know that y.tab.o is a lunix executable for a parser which is compiled from the c file:

y.tab.c with the header file: y.tab.h:

The c source y.tab.c is generated using the parser generator:

Yacc

http://en.wikipedia.org/wiki/Yacc

Now here is where I start to get uncertain.

In the make file the first shell command used to compile itex2MML is:

$(CC) -o itex2MML y.tab.o lex.yy.o

where $(CC)=gcc

http://cs.acadiau.ca/~jdiamond/comp2103/beginner-tutorials/LinuxTutorialGcc.html

The first argument to the compiler gcc, seems to be a lunix script file (lunix people please help) which uses the lunix shell http://linux.about.com/library/cmd/blcmdl1_sh.htm

Here what is in the file:

# /bin/sh

itex2tth <$1 >$1.tex

/home/paul/tth_linux/tth -r <$1.tex >$1.html

I presume $1 is the first input, so the script file takes, one input, there are two inputs passed to the compiler. I'm not sure how the compiler uses these inputs.

I believe that tth is a text to math math mark up language translator:

http://hutchinson.belmont.ma.us/tth/mml/

So does the compiler just generate a program, that links, a text to mathML translator, to a lexical analyzer and a parser? If so why? WHy not just use the tex to mathML translator directly. Also in the zip file there is a program called tidy, which can translate, a latex document into a math MML web page. Why not use this program directly. What am I missing?

-- JohnCreighton - 2009-07-22

Hmmmmmm.........Tidy seems to be a program to correct errors in HTML files:

http://en.wikipedia.org/wiki/HTML_Tidy http://tidy.sourceforge.net/

I'm not sure if it is used in itex2mml. I do neet to read more about "tth" though.

-- JohnCreighton - 2009-07-22

Forgot to add the link: http://hutchinson.belmont.ma.us/tth/

-- JohnCreighton - 2009-07-22

Okay, here is what I think. Tex is a lower level language then Latex.

http://en.wikipedia.org/wiki/LaTeX

and itex:

http://golem.ph.utexas.edu/~distler/blog/itex2MMLcommands.html

I think that the parsers in itex2mml translate itex into tex and then use the program "tth" to translate the tex into mathML.

What I don't understand is how the gcc compiler combines the tth with a parser and a lexical analyzer into a single program.

-- JohnCreighton - 2009-07-22

Thank you for providing extensive details.

Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the TWiki consultants if you need timely help. We invite you to get involved with the community, it is more likely you get community support if you support the open source project!

-- PeterThoeny - 2009-09-05

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Unanswered
Title itex2mml or itextomml (Windows XP)
SupportCategory

TWiki version

Server OS

Web server

Perl version

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2009-09-05 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.