COP 701(Assignment 1)
COP701 Assignment 01
LaTeX to HTML converter
Problem statement
This is your
first assignment in the
COP 701
course.In this assignment your main objective is to convert a
LaTeX
document to an equivalent
HTML document.
In pursuance of this objective, you will have to write a LaTeX to
HTML converter from scratch.
The features(tags) of LaTeX which you all need to consider
are:-
- \section
- \subsection
- \par
- \label
- \ref
- \textbf
- \textit
- \underline
- \enumerate
- \item
- tabular environment
- figure environment
- \includegraphics
- \caption
- Math mode with $...$
- \frac{numerator}{denominator}
- \sqrt
- $\sum... $
- $\int... $
Some more commands, mathematical symbols, math-mode
operators(for extra credit)
Workflow and subtasks
The entire assignment can be divided into the following
sub-tasks:
- Learn about LaTeX in brief.
- Write a lexer i.e to do a lexical analysis of your LaTeX
code and generate a string of tokens. Programs that you can
use: flex, jflex
- Parse the sequence of tokens using parser such as yacc, CUP,
ANTLR, bison (C++ or Java)
- Generate an AST(Abstract Syntax Tree) of your LaTeX code. link
- Map it to an equivalent AST of HTML.
- Generate the equivalent HTML code which can be viewed in any
browser.
Links to important resources
Logistics
- The deadline for this assignment is 31/08/2018
at 11:59 pm.It is a hard deadline and will not be
extended.
- Any form of plagiarism will not be tolerated.
- Submission will be made on Moodle.
- You are free to code in any language.
- You will graded on the output of your code,the coding style
and your viva/presentation.