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

Support multi-line equations #3

Open
cben opened this issue Jul 27, 2013 · 2 comments
Open

Support multi-line equations #3

cben opened this issue Jul 27, 2013 · 2 comments
Labels

Comments

@cben
Copy link
Owner

cben commented Jul 27, 2013

E.g.

$$\pi$$
works but

$$
\pi
$$
does not.

@cben
Copy link
Owner Author

cben commented Jan 23, 2014

Explanation: Currently I'm detectiong formulas by a stateless per-line regexp.
This made it easy to re-typeset only formulas in lines that were changed but expanding the regexp approach to handle multi-line formulas on change events would be tricky and fragile.

Therefore this is blocked on a rewrite that supports stateful parsing in a clean way - as described in #13.

@cben
Copy link
Owner Author

cben commented Apr 4, 2014

If I want to exactly replicate what pandoc does for single dollars, it will require lookahead beyond current line:

$20,000 and 
$30,000

is interpreted as text while

$20,000 and 
30,000$

is math. (The real rules for closing $ seems different than documented, with special treatment of numbers. $20,000 and 30,000 $ is still math, an even $20,000 and $b30,000 is math.)

One option is keeping $...$ restricted to one line. In any case (...), $$...$$, [...] will support multi-line.

However, it's not clear that I'm constrained by the fact CodeMirror modes can't lookahead to following line. Math is recognized from change hook which can look everywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant