Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TeX-like syntax #6

Closed
aslakr opened this issue Mar 29, 2016 · 1 comment
Closed

TeX-like syntax #6

aslakr opened this issue Mar 29, 2016 · 1 comment

Comments

@aslakr
Copy link
Contributor

aslakr commented Mar 29, 2016

This might be outside of your project scope for this, but I wonder if it would be interesting to make version of the parser that uses TeX instead of AsciiMath, but with similar capabilities as AsciiMath for converting to MathML?

This might be useful for some C based Markdown implementation that for the moment uses client side MathJax to render math in browser. This is something that might be attractive for e.g. fletcher/MultiMarkdown-5#15 and maybe Discount Orc/discount#127

@camoy
Copy link
Owner

camoy commented Mar 29, 2016

Yeah implementing a TeX parser is definitely beyond the scope of this repository. There are several existing TeX to MathML libraries written in C which would provide this functionality, although I don't know if they are of any quality. I think many are written in bison which is certainly not as nice as a PEG. Although if you want to fork amath as a starting point for a TeX to MathML parser I encourage you to do so!

In fact the reason I wrote this library was precisely to compile mathematical expressions in Markdown ahead of time to avoid client side parsing. I picked AsciiMath over TeX because it fits within the general philosophy of Markdown.

The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions.

I think AsciiMath certainly fits better within this framework than TeX. Unfortunately AsciiMath is nowhere near as popular as TeX and the existing parser is difficult to understand. I hope this project will rectify the latter problem by providing a clean implementation. And if Markdown parsers support AsciiMath natively, maybe it will gain wider adoption.

@camoy camoy closed this as completed Mar 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants