diff --git a/README.md b/README.md index b1c9a45..ad79928 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ translates TeX Books (simple one like stories kind of book) to HTML. I use this ## What this project *is not* The purpose of this project **is not** and never will be a kind of "TeX To HTML" compiler, I do *not* intend to implement the full TeX -and LaTeX specification. As such the support of mathematics is likely **never to be** included here. This is a tool mainly done *for me* for my usage, that is publishing my book on ScribbleHub and the web. I'm sure you can find real compilers if you want to support +and LaTeX specification. This is a tool mainly done *for me* for my usage, that is publishing my book on ScribbleHub and the web. I'm sure you can find real compilers if you want to support the full specification of TeX and LaTeX ## Support @@ -23,6 +23,13 @@ The project currently translate *LaTeX* to human-readable HTML files (the line b - `textbf` is replaced by `` - `newline`, `\\`, and `par` puts a `
` - `bigskip` closes the paragraph and open another one. +- Some math + - Inline math with `$` + - Math env + - Align* + - Align + - Equation + - Equation* ## Near Future TODO List * parsing glossary entries from a glossary file and printing the `gls` with a link to the glossary diff --git a/lib/mathgen.ml b/lib/mathgen.ml index 4c86eb4..d7a30a2 100644 --- a/lib/mathgen.ml +++ b/lib/mathgen.ml @@ -42,6 +42,8 @@ let re_calculate_env ast = -> aux (Math(Printf.sprintf "\\begin{align*}%s\\end{align*}" (generate_latex n))::acc) q | Env (s,n)::q when s="equation" -> aux (Math(Printf.sprintf "\\begin{equation}%s\\end{equation}" (generate_latex n))::acc) q + | Env (s,n)::q when s="equation*" + -> aux (Math(Printf.sprintf "\\begin{equation*}%s\\end{equation*}" (generate_latex n))::acc) q | Env(s,n)::q -> let ast = aux [] n in let ast = List.rev ast