My task is to create a translator of \LaTeX\, subset to selected text format with focus on \LaTeX\, tables \\
I decided to change to translator of \LaTeX\, subset to HTML since I know \LaTeX\, very well and HTML relatively well, I decide to translate \LaTeX into HTML since HTML is easy, a little bit different than \LaTeX and popular which makes this translator a practical tool.
\subsection{Assumptions}
\begin{itemize}
\item No \LaTeX\, (\%) comments in the script
\item There are no extra packages in \LaTeX\, script (provided with \\\textbackslash usepackage keyword) besides ones distributed with \LaTeX
\item There are no extra classes in \LaTeX\, script besides ones distributed with \LaTeX
\item There is nothing between \textbackslash documentclass keyword and \\\textbackslash begin\{document\} keyword
\item No standard \LaTeX\, instructions are modified in the script
\item "Tables" will be represented using \LaTeX\,\emph{table} environment
The goal of the project is to transform .tex file to (working ) .html file if the subset of .tex file is within project scope or output error message explaining why the html could not be outputed
\item$\backslash$textit\{Text\}: Makes the text italic.
\item$\backslash$underline\{Text\}: Underlines the text.
\item$\backslash$begin\{itemize\}$\backslash$item Item 1 $\backslash$item Item 2 $\backslash$end\{itemize\}: Creates an unordered list with the given items.
\item$\backslash$begin\{enumerate\}$\backslash$item Item 1 $\backslash$item Item 2 $\backslash$end\{enumerate\}: Creates an ordered list with the given items.
\item$\backslash$begin\{center\} Text $\backslash$end\{center\}: Centers the text.
\item$\backslash$begin\{tabular\}\{|c|c|c|\}$\backslash$hline Column 1 \& Column 2 \& Column 3 $\backslash$$\backslash$hline Row 1, Column 1 \& Row 1, Column 2 \& Row 1, Column 3 $\backslash$ Row 2, Column 1 \& Row 2, Column 2 \& Row 2, Column 3 $\backslash$$\backslash$hline $\backslash$end\{tabular\}: Creates a table with the given columns and rows.
I decided to use Python as a language in which I will implement my solution \\
The reasons for using python are as follow:
\begin{enumerate}
\item It is the easiest language among those that I know
\item I know it enough to be confident in my ability to implement this solution in python
\item I want to learn python more through this project
\end{enumerate}
Negative aspects of python which is that it is very slow language do not bother me as I believe the project scope will not be big enough for this to become an issue
In case of errors error message will be outputed on the terminal \\
Input File path is entered as an argument to terminal with "-i" or "--input" flag for example:
\begin{lstlisting}[language=bash]
python main.py -i texFile.tex
\end{lstlisting}
Output file path can be named by user by using "-o" or "--output" flag:
\begin{lstlisting}[language=bash]
python main.py -i texFile.tex -o htmlFile.html
\end{lstlisting}
If no "-o" flag is issued the output file will have the same name as input file with changed extension to html (so in this example texFile.tex will become texFile.html) \\
If the path to file name consists of spaces, path name needs to be but in ""