Latex2html

LaTeX to Html converter, using Flex and Bison

View the Project on GitHub ibipul/latex2html

Project Members



Latex to Html Converter

Here flex (LEX) and bison (YACC) has been used to design a Html to Latex Converter. The parser part is tackled by a flex script, and the Bison takes care of the conversion grammer.

Note: This was developed as a part of Second Year, First semester Compiler design course assignment Indian Statistical Institute (Kolkata). Course was taken by Prof. Mandar Mitra.

Usage


flex latex2html.l
yacc -d -t latex2html.y
gcc -o latex2html y.tab.c lex.yy.c -lfl

or you can use the included command.sh shell script

$sh command.sh

This will generate an object file named: latex2html If for example we want to parse the example .tex file included we'll execute the following command

./latex2html sample-filename.html < turing.tex > log.txt

The .tex file has to be included within left (<) and right (>) angular brackets, they are used as the redirecting operators.

Log file will be useful for debugging, incase of errors, where exactly in the input .tex file the parsing had failed.