hupili / evermd

Ever MarkDown! Solution Stacks for Markdown Usage
5 stars 1 forks source link

Recommend to use MathJax for mathematics #4

Closed cllu closed 11 years ago

cllu commented 12 years ago

Sorry I just missed your today's presentation. The project looks quite interesting. Once I also have this kind of idea, and later I find I am quite comfortable with MediaWiki. Emacs's org-mode is also fantastic if you live in Emacs.

Just a suggestion. For mathematical formula rendering, I strongly recommend MathJax. It is a client-side javascript engine, and really get popular these years. Two good example sites using MathJax are MathOverflow and Coursera. Give it a try and you will never regret ;)

hupili commented 12 years ago

Good pointers! I subscribed to too many repos... Just noticed this notification. I heard this from YX just now.

No wonder she's also using mediawiki~

In the survey, I once reached MathJax but later went to more self-contained compilation. If the final media is HTML, I think MathJax is of much higher quality. When you print a document containing MathJax from browser, those symbols will distort. It's still readable, but the appearance can be somewhat weird. Does anyone in the community address this problem?

cllu commented 12 years ago

I don't have problem with printing using MathJax, can you detail the problem? For MathJax, you can use their CDN or put the library on your own server. It also provides different rendering options.

hupili commented 12 years ago

I just uploaded two sample images here.

The screenshot of the formula presented on upper right corner of MathJax homepage.

http://photo.weibo.com/2862649054/photos/detail/photo_id/3509108091588311

The screenshot of the formula in printed pdf files:

http://photo.weibo.com/2862649054/photos/detail/photo_id/3509108087014899

For example, the integrator symbol is distorted.

cllu commented 12 years ago

Do you use Firefox? I have no problem with Chrome.

In Firefox, you can set Math Renderer to SVG to get proper printing. If you want the default more pretty HTML-CSS renderer, you may install STIX fonts and then Firefox can generate perfect PDF file. I think the problem is that Firefox can only use local fonts to generate PDF.

hupili commented 12 years ago

Yes, I use Firefox and Chrome at my side can also output proper pdf. It seems my firefox output uses unicode symbols to approximate the formula (you can use cursor to select them out). For Chrome, the corresponding part of output pdf seems an image.

Installing STIX fonts does not change the pdf output by Firefox. I'll look into more of the settings.

Overall, it looks great~

hupili commented 12 years ago

Now the default engine is Mathjax. One can use -i option to compile it to static images.

Mathjax renders much better formula. One drawback is that it requires network connection (I'm using the Mathjax CDN). If you want to read output document offline, you can use -i.