Skip to content

ibipul/latex2html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Authors


  • Bipul Islam
  • HIrak Sarkar
  • Ritankar Mandal

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.

  • The converter is successful for moderately complex LaTeX files. Highly intricate preambles may cause the program to fail.
  • Mathematical expressions have been tackled in the sense the greek alphabets are represented in their true form in the Html files, however, all Complex mathematical expressions may not be successfully converted. Grammer still needs work.
  • Standard latex Tables have been implemented, but there is a chance varied tabular depictions may fail.
  • All shift-reduce, reduce reduce conflicts could not be completely removed. Implementation works reasonably well for the LaTeX files of the type of example .tex file that has been included.

#####Note: This was developed as a part of Second Year 1st semester Compiler design course assignment. 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 turin-in-html.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.

About

This is a simple project that used Flex and Bison to parse a latex file and generate the corresponding HTML representation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published