Latex2html
This is a simple project that used Flex and Bison to parse a latex file and generate the corresponding HTML representation.
Install / Use
/learn @ibipul/Latex2htmlREADME
Author
- Bipul Islam
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.
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
