-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
Add equation syntax #314
Comments
Don't know enough about lexing + parsing to understand what is considered the cleaner approach / best practice. Let's say we have both of these inputs: [Equation]
y = \int x^2 dx
[/Equation] $$
y = \int x^2 dx
$$ Is it better practice to:
|
@hemu it would be best to add an additional rule in the lexer, similar for how we special case equation tags here: https://github.com/idyll-lang/idyll/blob/master/packages/idyll-compiler/src/lexer.js#L53-L66. The regex is a little hairy, but the same logic should be applicable to the new |
@mathisonian I've started working on this here #573, tests pass but so far haven't succeeded in testing this manually inside new idyll project/document - adding Edit: found the problem, it was regex. |
Thanks for the work on this @michaltakac! Also saw your comment on #314, I think that would be awesome to add - we should discuss syntax for that as well. I'm totally in favor of getting changes in to improve the equation/latex experience, but it will probably will be a couple days before I can do a close review.
A tale as old as time. Arguments for |
Feeling that |
Note that there's also other latex syntax: |
It would be great to write
$...$
or$$...$$
instead of[equation]...[/equation]
[equation display:true]...[/equation]
The text was updated successfully, but these errors were encountered: