Skip to content

archaic-magnon/HTML-TO-LATEX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTML-TO-LATEX

Lex file: HtmlLexer.g4 Grammer file: Html.g4

Requirement: ANTLR Parser Generator Version 4.7.2 Antlr version should be 4.7.2

For making parse tree, run below command after ./run.sh [arg1][arg2] command: grun Html root -gui sample.html (sample.html is input html file)

To run lexer file antlr4 HtmlLexer.g4

To run grammer file antlr4 Html.g4

Compile generated grammer javac -cp antlr-4.7.2-complete.jar *.java

Convert html to latex java Main sample.html sample.tex

To view parse tree grun Html root -gui sample.html

(replace smaple.html with input html file name)

User created files are: HtmlLexer.g4 Html.g4 Main.java LatexTranslateListner.java CustomMethods.java

HtmlLexer.g4 has all the lexical rules Html.g4 has all the parsing rules Main.java is used to parse the input html file LatexTranslateListner.java has all the code needed to translate html to latex CustomMethods.java has user defined function for specific tasks

About

Convert HTML file to its equivalent LaTeX file

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published