Open michael-brade opened 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?
Wow, what an interesting repo! Thanks for finding it. I will take a look :)
the node object in Luatex is related to this topic, see http://wiki.luatex.org/index.php/TeX_without_TeX
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.
very cool indeed! So I could create last
to join the family of mdast
, hast
, and nlcst
:-) Gee, lots of work ahead....
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
http://www-sop.inria.fr/marelle/tralics/
Tralics: a LaTeX to XML translator maybe help to build AST
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:
\unskip
is very hard to implement (and thus still missing)\and
implementation - it ends the previoustabular
environment and begins a new one - LaTeX.js cannot do that without an ASTspan
that sets the right font is nice but flawed: relative spaces (e.g.em
s) that depend on the current font may thus depend on the wrong font. With an AST, this could be determined at the end and then done properly during the DOM creationHowever, 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.