michael-brade / LaTeX.js

JavaScript LaTeX to HTML5 translator
https://latex.js.org
MIT License
785 stars 59 forks source link

Design and implement an AST #10

Open michael-brade opened 6 years ago

michael-brade commented 6 years ago

Now that other projects start using this, it is about time to fix the one big limitation I should have thought about right from the start: the lack of an AST. It causes the following limitations:

However, I have quite a few more macros that I want to implement and/or finish first, so if anyone wants to help, this would be it: the most helpful and significant contribution I can imagine right now.

jankapunkt commented 6 years ago

I am not familiar with AST but I found this issue by using the search, since I was looking for custom font support. I also found this repo, maybe it is useful?

michael-brade commented 6 years ago

Wow, what an interesting repo! Thanks for finding it. I will take a look :)

seuliang commented 5 years ago

the node object in Luatex is related to this topic, see http://wiki.luatex.org/index.php/TeX_without_TeX

kskyten commented 5 years ago

This is very cool! Some immediate applications that come to mind are accessing the ecosystem of text processors implemented by unified.js and better version control of latex files with semantic merging.

michael-brade commented 5 years ago

very cool indeed! So I could create last to join the family of mdast, hast, and nlcst :-) Gee, lots of work ahead....

wooorm commented 5 years ago

Hey, author of unified etc here! 👋 I’m very interested in connecting more syntaxes to unist/unified, so do feel free to ping me if there are questions, we can help out. Ideas for unified can be posted here: https://github.com/unifiedjs/ideas (and for syntax-tree here: https://github.com/syntax-tree/ideas).

For previous work, see rebber. It only does mdast/markdown -> latex though

seuliang commented 5 years ago

http://www-sop.inria.fr/marelle/tralics/
Tralics: a LaTeX to XML translator maybe help to build AST