scragg0x / realms-wiki

Git based wiki inspired by Gollum
http://realms.io
GNU General Public License v2.0
833 stars 91 forks source link

Support math typesetting by KaTeX #189

Closed kivantium closed 7 years ago

kivantium commented 7 years ago

This pull request is a solution for #124.

I used KaTeX and Auto-render extension to display math formula. Please check my demo.

In this implimentation, expressions surrounded by $ or $$ is recognized as a math formula. Therefore it may cause unintended typesetting if there is $ in existing documents.

There are some things to do

Thank you, kivantium

gazpachoking commented 7 years ago

I think a cooler solution would be to somehow allow markdown-it extensions to be enabled by users. It looks like there is an extension for this already too https://github.com/waylonflinn/markdown-it-katex I'm not exactly sure a good way to allow this sort of runtime js dependency though.

kivantium commented 7 years ago

Thank you so much for your feedback. I'll close this PR, since it took so much time to implement.