yoavram / markx

Markdown editor for scientific writing. Batteries included.
Other
319 stars 43 forks source link

Improve math handling. #47

Closed cben closed 10 years ago

cben commented 10 years ago
cben commented 10 years ago

Forgot to say I tested all 3 points running locally (python server.py).

cben commented 10 years ago

OK, checked that downloding works with all output formats, --mathjax is not a problem.


I got a reply about MathJax CDN plans:

... We will probably keep the old CDN online for 6-12 months, likely longer ...

It seems best at this point to rely on pandoc's default (currenty http://cdn.mathjax.org/mathjax which IIUC can be repointed; the provider they're testing is Google Cloud Storage which supports CNAME for http but not https). Especially if Markx is in low-maintanance - this way when the change becomes final all you have to do is update pandoc.


Tested preview on a long paper converted to \\(...\\) form (using https://gist.github.com/cben/9613755).

I see only one problem but it also exists (and is even worse!) for $ and $$ math: when formulas contain *, portions of the text crossing formula boundaries will be wrapped in <em>, thworing mathjax math detection off; with backslash-parens style the result is not too bad but with dollar style opening/closing delimiters get confused and innocent text gets rendered as math. Example:

for all \\(pk^*,c^*\\) there exists \\(x^*\\), such that for all \\(C\in\mathcal{C}\\) over \\({\left\lvert x^*\right\rvert}\\) variables \\(\Sim(1^\lambda,C(x^*))=^s \Eval(1^\lambda,pk^*,C,c^*)\\) (statistically indistinguishable).

for all $pk^*,c^*$ there exists $x^*$, such that for all $C\in\mathcal{C}$ over ${\left\lvert x^* \right\rvert}$ variables $\Sim(1^\lambda,C(x^*))=^s \Eval(1^\lambda,pk^*,C,c^*)$ (statistically indistinguishable). 

In any case it's better than no preview at all for double-backslash formulas.

cben commented 10 years ago

Bottom line: ready to merge.

yoavram commented 10 years ago

Hey, sorry for the delay, I hope I'll get to it soon.

cben commented 10 years ago

Friendly ping. Anything more I can help/test?

yoavram commented 10 years ago

I've merging and closing, will wait a while for updating http://markx.herokuapp.com/

yoavram commented 10 years ago

@cben , I'm sorry for dragging this so much. Thanks so much for your contribution and support!!

cben commented 9 years ago

It seems markx.herokuapp.com is still not updated.

yoavram commented 9 years ago

Correct. I've now updated it.