svenkreiss / unicodeit

Converts LaTeX tags to unicode: \mathcal{H} → ℋ. Available on the web or as Automator script for the Mac.
https://www.unicodeit.net
Other
275 stars 35 forks source link

LaTeX parser for unicodeit #73

Open HDembinski opened 1 year ago

HDembinski commented 1 year ago

I developed the concept for a LaTeX parser for unicodeit here https://github.com/HDembinski/essays/blob/master/parse_latex.ipynb

It is a simple LaTeX parser written in EBNF. The parser is restricted to only be able to process the subset of LaTeX that we care about. It is more powerful than the search-and-replace approach that unicodeit uses currently. It handles several cases correctly that unicodeit does not handle, e.g.:

https://github.com/svenkreiss/unicodeit/issues/27

I am interested in contributing this parser for the Python package to unicodeit, where it would largely replace the implementation of the Python package. My draft implementation is not bug-free, I will work on this and the integration into unicodeit if I get a confirmation from you that you are willing to review a PR with such a major change.

I have little experience with Javascript, so I cannot offer to help with improving that implementation.

HDembinski commented 1 year ago

Today, I published a first release of unicodeitplus based on the concept. I am still open toward merging my project back into unicodeit. I fixed the bugs I still had in the concept code, it now works as expected.

I am also open to become co-maintainers of unicodeit, if you have no time to work on this project.

aur3l14no commented 1 year ago

Nice! Hope it will be merged.

Also, by directly exposing the CLI, it becomes compatible with pipx, which is a convenient feature.

HDembinski commented 1 year ago

@svenkreiss What do you think about this?