Skip to content

Commit

Permalink
update readme, add supports for equation*
Browse files Browse the repository at this point in the history
  • Loading branch information
vanilla-extracts committed Mar 23, 2022
1 parent b047449 commit 1915362
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -23,6 +23,13 @@ The project currently translate *LaTeX* to human-readable HTML files (the line b
- `textbf` is replaced by `<b>`
- `newline`, `\\`, and `par` puts a `<br>`
- `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
Expand Down
2 changes: 2 additions & 0 deletions lib/mathgen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1915362

Please sign in to comment.