math-expressions icon indicating copy to clipboard operation
math-expressions copied to clipboard

LaTeX lexer

Open bergwerf opened this issue 9 years ago • 3 comments

A minimal TeX equation lexer would be very useful for me. I'm not sure if it's easy to add TeX subscript and fractions to the Lexer though.

bergwerf avatar Sep 08 '16 13:09 bergwerf

I can see how that could be useful, and a minimal TeX lexer supporting just a small subset shouldn't be too hard to implement. Which notations would be important for your use case?

Unfortunately I currently don't have much time to work on this, but might pick it up in the future. In the meantime - pull requests are welcome :)

fkleon avatar Sep 09 '16 08:09 fkleon

The only LaTeX features I often use and that might cost some extra effort to implement are fractions (because there are two {} groups, unlike most functions), and sub/superscript (e.g. \sin{3}^{10} is a power but `A_{10} is a variable).

I found I needed some advanced algebra features as well, so I'm now strongly considering SymPy for my project. It might be a good idea to keep this open though. Fun fact, SymPy currently also still lacks an official LaTeX parser ;-)

bergwerf avatar Sep 12 '16 20:09 bergwerf

Here is an example to render latex.

Shahxad-Akram avatar Feb 18 '19 10:02 Shahxad-Akram